/* SUGNO Barbershop - Stage 1. Mobile-first, vanilla CSS, no build step. */

:root {
  --bg: #0e0e0d;
  --bg-alt: #171614;
  --panel: #1d1c1a;
  --panel-2: #242220;
  --border: #34322e;
  --fg: #f5f4f1;
  --fg-muted: #aca9a2;
  --fg-faint: #78756f;
  --white: #ffffff;
  --focus: #e8c88a;
  --danger: #e26a5c;
  --radius-sm: 3px;
  --radius: 6px;
  --max-width: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; }
address { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: #111;
  padding: 0.75rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section__head h2 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.75rem); margin-bottom: 0.6rem; }
.section__head p { color: var(--fg-muted); font-size: 1.05rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-weight: 700;
  margin-bottom: 1rem;
}

.notice {
  color: var(--fg-muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), opacity 0.15s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: var(--white); color: #111; }
.btn--primary:hover { transform: translateY(-1px); background: #e7e5e0; }
.btn--ghost { border-color: var(--border); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg-muted); }
.btn--text { color: var(--fg-muted); padding: 0.6rem 0; text-decoration: underline; text-underline-offset: 3px; }
.btn--text:hover { color: var(--fg); }
.btn--small { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 13, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.brand__logo { height: 22px; width: auto; }
.site-nav { display: none; }
.site-nav a { color: var(--fg-muted); font-size: 0.92rem; padding: 0.5rem 0.75rem; }
.site-nav a:hover { color: var(--fg); }
.site-header__cta { display: none; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  font-size: 0.82rem;
}
.lang-switch__link { color: var(--fg-faint); }
.lang-switch__link:hover { color: var(--fg-muted); }
.lang-switch__link.is-active { color: var(--fg); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; }
  .site-header__cta { display: inline-flex; }
  .lang-switch { margin-left: 1.5rem; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 10vw, 8rem) clamp(3rem, 8vw, 6rem); }
.hero__title {
  font-size: clamp(2.4rem, 5vw + 1rem, 4.75rem);
  max-width: 16ch;
  margin-bottom: 1.1rem;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 1.2vw + 0.7rem, 1.35rem);
  color: var(--fg-muted);
  max-width: 40ch;
  margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.75rem; }
.hero__address {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}
.hero__address:hover { color: var(--fg); border-color: var(--fg-muted); }

/* ---------- Services ---------- */
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--bg);
  padding: 1.25rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 0.75rem;
}
.service-card__name { font-size: 1.1rem; font-weight: 700; }
.service-card__meta { color: var(--fg-faint); font-size: 0.85rem; }
.service-card__price { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .service-list { grid-template-columns: 1fr 1fr; }
}

/* ---------- Team ---------- */
.team-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.team-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
}
.team-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin-inline: auto;
  margin-bottom: 0.9rem;
  max-width: 140px;
}
.team-card__name { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.6rem; }
.team-card__cta {
  font-size: 0.82rem;
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.team-card__cta:hover { color: var(--fg); }

@media (min-width: 700px) {
  .team-list { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Portfolio ---------- */
.portfolio-track {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: 1.25rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.portfolio-track::-webkit-scrollbar { height: 6px; }
.portfolio-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.portfolio-item {
  flex: 0 0 auto;
  width: 68vw;
  max-width: 320px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.portfolio-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.portfolio-item:hover img { transform: scale(1.03); }

.portfolio-follow { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

@media (min-width: 900px) {
  .portfolio-item { width: 22vw; max-width: 280px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 6, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 88vw; border-radius: var(--radius-sm); }
.lightbox__close, .lightbox__nav {
  position: absolute;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  padding: 0.75rem;
}
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav:hover, .lightbox__close:hover { color: var(--fg-muted); }

/* ---------- Booking widget ---------- */
.booking-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.booking-progress li {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--fg-faint);
}
.booking-progress li.is-active { border-color: var(--white); color: var(--white); }
.booking-progress li.is-done { background: var(--white); color: #111; border-color: var(--white); }

.booking-widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  max-width: 42rem;
}

.booking-step { display: none; }
.booking-step.is-active { display: block; animation: step-in 0.25s var(--ease); }
.booking-step h3 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.booking-step--success { text-align: center; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.option-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: left;
  background: var(--panel-2);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.option-card:hover { border-color: var(--fg-muted); }
.option-card.is-selected { border-color: var(--white); background: #2c2a26; }
.option-card__title { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.option-card__meta { display: block; font-size: 0.82rem; color: var(--fg-faint); }
.option-card--barber { display: flex; align-items: center; gap: 0.75rem; text-align: left; }
.option-card--barber img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.hint { color: var(--fg-faint); font-size: 0.88rem; margin-bottom: 1rem; }

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.time-slot {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--panel-2);
}
.time-slot:hover { border-color: var(--fg-muted); }
.time-slot.is-selected { background: var(--white); color: #111; border-color: var(--white); }

@media (min-width: 480px) {
  .time-slots { grid-template-columns: repeat(4, 1fr); }
}

.booking-summary {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--fg-muted);
}
.booking-summary strong { color: var(--fg); }
.booking-summary--success { text-align: left; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
}
.field input:focus { border-color: var(--fg-muted); }
.field input.is-invalid { border-color: var(--danger); }
.field__hint { display: block; font-size: 0.78rem; color: var(--fg-faint); margin-top: 0.35rem; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-error {
  background: rgba(226, 106, 92, 0.12);
  border: 1px solid rgba(226, 106, 92, 0.4);
  color: #f2a89d;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.booking-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.booking-step--success .booking-actions { justify-content: center; margin-top: 1.5rem; }
.success-address { color: var(--fg-muted); margin-top: 0.25rem; }

/* ---------- Location ---------- */
.location address { color: var(--fg-muted); margin: 0.9rem 0; line-height: 1.7; }
.hours { font-weight: 700; margin-bottom: 1.25rem; }
.location__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 46rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--panel);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--fg-faint); margin-left: 1rem; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { color: var(--fg-muted); margin-top: 0.85rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem; padding-bottom: calc(2.5rem + 72px); }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; color: var(--fg-faint); font-size: 0.88rem; }
.site-footer__social { display: flex; gap: 1rem; }
.site-footer__social a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__rights { color: var(--fg-faint); }

@media (min-width: 900px) {
  .site-footer { padding-bottom: 2.5rem; }
}

/* ---------- Sticky mobile action bar ---------- */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(14, 14, 13, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fg-muted);
  border-right: 1px solid var(--border);
}
.sticky-bar__btn:last-child { border-right: 0; }
.sticky-bar__icon { font-size: 1.15rem; }
.sticky-bar__btn--primary { color: var(--white); }

@media (min-width: 900px) {
  .sticky-bar { display: none; }
  .site-footer { padding-bottom: 2.5rem; }
}

/* ---------- Scroll reveal (class added by main.js) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-reveal-index="1"] { transition-delay: 60ms; }
.reveal[data-reveal-index="2"] { transition-delay: 120ms; }
.reveal[data-reveal-index="3"] { transition-delay: 180ms; }
