/* Tiptop Hair Designs — concept site
   Warm ivory / espresso / muted burgundy editorial direction.
   Plain CSS, mobile-first, no framework. */

/* ---------- Design tokens ---------- */
:root {
  --color-cream: #f8f2e7;
  --color-cream-alt: #efe4d1;
  --color-espresso: #33241a;
  --color-espresso-soft: #6b5645;
  --color-burgundy: #7a2331;
  --color-burgundy-dark: #5c1a24;
  --color-brass: #a9803f;

  /* Test accent, sampled directly from the real "Tip Top" logo artwork —
     not a full re-theme, applied only to a few small hover/link accents so
     it can be compared against the burgundy used everywhere else (buttons,
     Visit, Contact, Services). */
  --color-accent-blue: #002b99;
  --color-accent-blue-dark: #002072;
  --color-line: rgb(51 36 26 / 16%);
  --color-surface: #fffdf9;
  --font-serif: "Fraunces", georgia, "Times New Roman", serif;
  --font-sans: "Work Sans", helvetica, arial, sans-serif;
  --container-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 4px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-espresso);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--color-espresso);
}

p {
  margin: 0;
}

button {
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section--alt {
  background: var(--color-cream-alt);
}

.section--compact {
  padding-block: clamp(2rem, 4.5vw, 3.75rem);
}

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.section-head p {
  margin-top: 1rem;
  color: var(--color-espresso-soft);
  font-size: 1.05rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-burgundy);
  color: var(--color-cream);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-burgundy);
  color: var(--color-cream);
  border-color: var(--color-burgundy);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-burgundy-dark);
  border-color: var(--color-burgundy-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-espresso);
  border-color: var(--color-espresso);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-espresso);
  color: var(--color-cream);
}

.btn-on-dark {
  background: var(--color-cream);
  color: var(--color-burgundy-dark);
  border-color: var(--color-cream);
}

.btn-on-dark:hover,
.btn-on-dark:focus-visible {
  background: transparent;
  color: var(--color-cream);
  border-color: var(--color-cream);
}

.btn-outline-on-dark {
  background: transparent;
  color: var(--color-cream);
  border-color: var(--color-cream);
}

.btn-outline-on-dark:hover,
.btn-outline-on-dark:focus-visible {
  background: var(--color-cream);
  color: var(--color-burgundy-dark);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(248 242 231 / 96%);
  backdrop-filter: saturate(140%) blur(4px);
  border-bottom: 1px solid var(--color-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-decoration: none;
}

/* The real "Tip Top" storefront logo artwork, used as-is rather than
   recreated in CSS type. Height-constrained, width auto, so it scales
   cleanly without distorting the artwork's own proportions. */
.nav-logo-mark {
  height: 2.5rem;
  width: auto;
  display: block;
}

.nav-logo-secondary {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brass);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-espresso-soft);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-accent-blue);
  border-bottom-color: var(--color-accent-blue);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  border-color: var(--color-accent-blue);
}

.lang-option {
  color: var(--color-espresso-soft);
}

.lang-option.is-active {
  color: var(--color-espresso);
}

.lang-divider {
  color: var(--color-line);
}

.nav-call {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

/* Narrow phones: logo + language toggle + phone button + menu button is a
   tight fit in one row. Tighten spacing/padding rather than changing what
   each control contains. */
@media (max-width: 400px) {
  .nav-right {
    gap: 0.4rem;
  }

  .lang-toggle {
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
  }

  .nav-call {
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-espresso);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-panel {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--color-line);
  padding: 1rem var(--gutter) 1.5rem;
  gap: 0.9rem;
}

.nav-mobile-panel.is-open {
  display: flex;
}

.nav-mobile-panel a {
  text-decoration: none;
  color: var(--color-espresso);
  font-size: 1rem;
  padding-block: 0.35rem;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile-panel {
    display: none !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-espresso);
  color: var(--color-cream);
}

/* At the ~820px+ breakpoint below, the hero's height tracks the actual
   storefront photo's aspect ratio (3840x2111, ~1.82:1) instead of a flat
   px cap. A flat cap (760px) doesn't scale with viewport width, so on a
   full-bleed hero it made object-fit: cover crop progressively MORE off
   the photo the wider the screen got — badly so at real desktop sizes
   like 1920x1080, where a 760px-tall box is far short/wide of the photo's
   own proportions and cover had to cut off the top of the storefront
   (including the Tip Top sign) and a lot of width just to fill it. Sizing
   the box to width / (2111/3840) keeps it close to the photo's native
   ratio at any width, so cover crops only a little regardless of screen
   size; 92vh remains the ceiling so the hero never grows taller than the
   viewport itself on very wide/short windows. Below this breakpoint the
   container is already far taller/narrower than the photo, so cover
   crops horizontally instead and is already showing the image's full
   height; mobile keeps its original, unchanged height. */
@media (min-width: 820px) {
  .hero {
    min-height: min(92vh, calc(100vw * 2111 / 3840));
  }
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* 26% -> 34%: nudges the crop anchor down a little so less of the
     storefront's lower half is cropped away, while still favoring the top
     (the sign and awning) over dead center. */
  object-position: 50% 34%;
  display: block;
}

/* A small constant overscan gives the scroll parallax (see js/main.js) room
   to shift the image without ever exposing an edge. This was 1.14 (14%
   overscan) — on top of an object-fit: cover crop that's already close to
   lossless (the hero's own ~1.9:1 box nearly matches the photo's native
   ~1.9:1 ratio), that extra 14% zoom was the main reason the storefront
   looked noticeably more cropped/zoomed than a plain render of the same
   photo — and stretching the same source pixels over 14% more screen area
   softened it slightly too. 1.05 is the smallest overscan that still keeps
   a few px of parallax headroom (see maxTravel() in js/main.js, which is
   kept in sync with this value). Keep this in sync with HERO_SCALE there.
*/
@media (min-width: 820px) {
  .hero-img {
    transform: scale(1.05);
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img {
    transform: none !important;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgb(51 36 26 / 30%) 0%,
    rgb(51 36 26 / 45%) 45%,
    rgb(51 36 26 / 82%) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-top: clamp(2.5rem, 8vw, 5rem);
  padding-bottom: clamp(2.5rem, 8vw, 5rem);
  max-width: 42rem;
}

/* A bit more room below the buttons than above the kicker, so the taller
   hero (see .hero above) reads as more visible photo beneath the content
   rather than just a bigger dark gradient. Top padding is left exactly as
   it was, so the headline still starts in the same place. */
@media (min-width: 820px) {
  .hero-content {
    padding-bottom: clamp(4rem, 10vw, 7rem);
  }
}

.hero-kicker {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cream);
  opacity: 0.85;
  margin-bottom: 0.9rem;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 6vw, 3.75rem);
  line-height: 1.1;
  color: var(--color-cream);
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgb(248 242 231 / 92%);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

/* ---------- Services ---------- */
.services-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--color-line);
}

.service-row:last-child {
  border-bottom: 1px solid var(--color-line);
}

.service-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.service-icon {
  width: 20px;
  height: 20px;
  color: var(--color-burgundy);
  flex-shrink: 0;
}

.service-name {
  font-size: 1.4rem;
}

.service-items {
  font-size: 1.02rem;
  color: var(--color-espresso-soft);
  font-weight: 400;
}

@media (min-width: 780px) {
  .service-row {
    grid-template-columns: minmax(0, 15rem) 1fr;
    align-items: center;
    gap: 2.5rem;
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--wide img {
  aspect-ratio: 4 / 3;
}

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

  .gallery-item--wide {
    grid-column: span 2;
  }
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  align-items: center;
}

.about-media {
  max-width: 260px;
  margin-inline: auto;
}

.about-media img {
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-copy h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.about-copy p {
  font-size: 1.02rem;
  color: var(--color-espresso-soft);
  margin-bottom: 0.75rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

@media (min-width: 860px) {
  .about-layout {
    grid-template-columns: minmax(200px, 260px) 1fr;
  }

  .about-media {
    max-width: none;
    margin-inline: 0;
  }
}

/* ---------- Visit ---------- */
.visit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
}

.visit-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.visit-block {
  margin-bottom: 1.75rem;
}

.visit-block:last-child {
  margin-bottom: 0;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.hours-table td {
  padding: 0.4rem 0;
  border-top: 1px solid var(--color-line);
}

.hours-table tr:first-child td {
  border-top: none;
}

.hours-table td:last-child {
  text-align: right;
  color: var(--color-espresso-soft);
}

.hours-table td.is-closed {
  color: var(--color-espresso-soft);
  font-style: italic;
}

.visit-address,
.visit-phone {
  font-size: 1.05rem;
  color: var(--color-espresso-soft);
}

.visit-phone a {
  text-decoration: none;
  color: var(--color-burgundy);
  font-weight: 600;
}

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

@media (min-width: 860px) {
  .visit-layout {
    grid-template-columns: 1fr 1fr;
  }

  .map-frame {
    aspect-ratio: auto;
    height: 100%;
    min-height: 360px;
  }
}

/* ---------- Reviews ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.review-card {
  margin: 0;
  padding: 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.review-stars {
  color: var(--color-brass);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.9rem;
}

.review-quote {
  margin: 0 0 1.1rem;
  padding: 0;
  border: none;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-espresso);
}

.review-author {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--color-burgundy);
}

.review-source {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-espresso-soft);
}

@media (min-width: 780px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Contact CTA band ---------- */
.contact-band {
  background: var(--color-burgundy);
  color: var(--color-cream);
  text-align: center;
}

.contact-band h2 {
  color: var(--color-cream);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.9rem;
}

.contact-band p {
  color: rgb(248 242 231 / 88%);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}

.contact-phone {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--color-cream);
  text-decoration: none;
  margin-bottom: 1.75rem;
}

.contact-band .btn-group {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-cream-alt);
  border-top: 1px solid var(--color-line);
  padding-block: 3rem;
  font-size: 0.92rem;
  color: var(--color-espresso-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-espresso);
  margin-bottom: 0.5rem;
}

.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: 0.6rem;
}

.footer-col p,
.footer-col a {
  color: var(--color-espresso-soft);
  text-decoration: none;
  display: block;
  margin-bottom: 0.35rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--color-accent-blue);
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.82rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
