/* ==========================================================================
   Downtown Tan + Boutique — styles.css
   Design system: warm ivory / ink black / oak-tan accent / soft blush
   Type: Fraunces (display) · Karla (body) · Sacramento (script accents)
   Mobile-first. Breakpoints: 641px, 1025px, 1441px
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Palette */
  --ink:    #1a1714;   /* sign black */
  --paper:  #fbf9f6;   /* warm ivory (tin ceiling / storefront) */
  --paper-2:#f4efe8;   /* tinted section background */
  --oak:    #a97f4f;   /* antique oak / "tan" accent */
  --oak-dark:#8a6539;
  --blush:  #e9c9cf;   /* soft pink from their marketing */
  --line:   #e2dacd;   /* hairline borders */
  --white:  #ffffff;
  --error:  #b3423a;
  --success:#4f7350;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
  --font-script: "Sacramento", cursive;

  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lead: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --text-h1: clamp(2.6rem, 1.8rem + 4vw, 5rem);
  --text-h2: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  --text-h3: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);

  /* Spacing scale (8px base) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;

  --container: 1240px;
  --radius: 2px;                 /* near-square: storefront geometry */
  --shadow: 0 10px 30px -12px rgba(26, 23, 20, 0.18);
  --transition: 220ms ease-out;

  --header-h: 88px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* belt-and-braces: no horizontal scroll at any breakpoint */
}

/* [hidden] must always win over component display rules */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* subtle warm grain so backgrounds aren't dead-flat */
  background-image: radial-gradient(rgba(169, 127, 79, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--s-2);
  letter-spacing: -0.01em;
}
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin: 0 0 var(--s-2); }
ul { margin: 0 0 var(--s-2); padding-left: 1.2rem; }
address { font-style: normal; }

a { color: var(--oak-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--transition); }
a:hover { color: var(--ink); }

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

/* Anchored sections clear the sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--s-2); top: -100px;
  background: var(--ink); color: var(--white);
  padding: 0.6rem 1rem; z-index: 200; border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: var(--s-2); color: var(--white); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oak-dark);
  margin-bottom: var(--s-2);
}
.script {
  font-family: var(--font-script);
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--oak-dark);
  line-height: 1;
}
.lead { font-size: var(--text-lead); max-width: 46ch; }
.note { font-size: 0.9rem; color: #5c5348; }
.placeholder { background: var(--blush); padding: 0 0.35em; border-radius: var(--radius); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.6rem;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--oak-dark); border-color: var(--oak-dark); color: var(--white); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 0.55rem 1.1rem; min-height: 40px; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), transform 260ms ease-out;
}
/* auto-hide on scroll down (mobile/tablet only; JS toggles the class) */
@media (max-width: 1024px) {
  .site-header.is-hidden { transform: translateY(-100%); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -14px rgba(26,23,20,0.25);
}
.header-inner {
  display: flex; align-items: center; gap: var(--s-3);
  height: var(--header-h);
}

/* Logotype: the shop's actual mark (ink version on light header) */
.logotype {
  display: flex; align-items: center;
  text-decoration: none;
  margin-right: auto;
}
.logotype img { width: 150px; height: auto; max-height: calc(var(--header-h) - 10px); object-fit: contain; transition: opacity var(--transition); }
.logotype:hover img { opacity: 0.75; }

.site-nav { display: none; }
.nav-list { display: flex; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.nav-list a {
  text-decoration: none; color: var(--ink); font-weight: 500;
  padding: 0.4rem 0; position: relative;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--oak);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.nav-list a:hover::after, .nav-list a:focus-visible::after { transform: scaleX(1); }

.header-cta { display: none; }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer;
}
.menu-bar { display: block; height: 2px; background: var(--ink); transition: transform var(--transition), opacity var(--transition); }

/* ---------- Mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 150; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(26,23,20,0.45); }
.mobile-menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--paper);
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
  box-shadow: -12px 0 40px -20px rgba(26,23,20,0.4);
  transform: translateX(100%);
  transition: transform 260ms ease-out;
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-close {
  position: absolute; top: var(--s-2); right: var(--s-2);
  width: 44px; height: 44px; font-size: 1.6rem; line-height: 1;
  background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  color: var(--ink);
}
.mobile-menu-panel ul { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.mobile-menu-panel li + li { border-top: 1px solid var(--line); }
.mobile-menu-panel ul a {
  display: block; padding: 0.9rem 0.25rem;
  font-family: var(--font-display); font-size: 1.3rem;
  text-decoration: none; color: var(--ink);
}
.mobile-menu-panel ul a:hover { color: var(--oak-dark); }

/* ---------- Hero (light, floral corner accent) ---------- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 6vw, 5.5rem);
  overflow: clip;
  background:
    radial-gradient(70rem 34rem at 90% -20%, rgba(233, 201, 207, 0.28), transparent 60%),
    radial-gradient(50rem 26rem at -10% 40%, rgba(169, 127, 79, 0.10), transparent 60%);
}
/* generated line-art flourish: bottom-left corner, desktop only */
.hero-deco {
  display: none;
  position: absolute;
  left: -36px; bottom: -10px;
  width: clamp(220px, 20vw, 330px);
  height: auto;
  opacity: 0.55;
  mix-blend-mode: multiply; /* renders cleanly even if the PNG has a white background */
  pointer-events: none;
  z-index: 0;
}
.hero-grid { display: grid; gap: var(--s-5); align-items: center; position: relative; z-index: 1; }

.hero-title { font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.6rem); max-width: 14ch; margin-bottom: var(--s-2); }
.hero-eyebrow .script { color: var(--oak-dark); font-size: 2.1rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

/* storefront photo: clean white print border */
.hero-photo { position: relative; margin: 0; }
.hero-photo img {
  border: 5px solid var(--white);
  box-shadow: 0 22px 50px -22px rgba(26, 23, 20, 0.45);
}

/* Facts strip: brand-black band */
.facts-strip {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--ink); color: var(--paper);
  position: relative; z-index: 1;
}
.facts-inner {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: var(--s-2) 0; text-align: center;
}
.facts-inner p { margin: 0; font-size: 0.95rem; letter-spacing: 0.02em; }
.facts-inner strong { color: var(--blush); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: var(--s-6) 0; }
.section-tint { background: var(--paper-2); }

.section-head { max-width: 62ch; margin-bottom: var(--s-4); }
.section-sub { font-size: var(--text-lead); }

.split { display: grid; gap: var(--s-4); align-items: center; }
.split-copy > :last-child { margin-bottom: 0; }

.photo-frame { position: relative; margin: 0; }
.photo-frame img { border: 1px solid var(--ink); box-shadow: var(--shadow); }

.photo-tab {
  position: absolute; left: 0; bottom: 0;
  background: var(--ink); color: var(--paper);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.45rem 0.9rem;
}

.check-list { list-style: none; padding: 0; }
.check-list li {
  position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem;
}
.check-list li::before {
  content: "+";
  position: absolute; left: 0; top: -1px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--oak);
}

/* ---------- Boutique gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.gallery-item { margin: 0; position: relative; overflow: hidden; }
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--ink);
  transition: transform 400ms ease-out;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 1.6rem 0.8rem 0.6rem;
  background: linear-gradient(to top, rgba(26,23,20,0.72), transparent);
  color: var(--paper);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}

/* Sale card */
.sale-card {
  display: grid; gap: var(--s-3);
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  padding: var(--s-3);
}
.sale-photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.sale-photos img { aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); }
.sale-copy > :last-child { margin-bottom: 0; }
.sale-copy .eyebrow { color: var(--oak-dark); }

/* ---------- Event ---------- */
.photo-frame-tall img { max-width: min(420px, 100%); margin-inline: auto; }
.event-when { font-size: var(--text-lead); }

/* ---------- About ---------- */
.about-photos {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2);
  margin-top: var(--s-3);
}
.about-photos img { border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Visit ---------- */
.visit-grid { display: grid; gap: var(--s-3); }

.visit-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--s-4);
  box-shadow: var(--shadow);
}
.visit-card > :last-child { margin-bottom: 0; }

.hours-table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-2); }
.hours-table th, .hours-table td {
  text-align: left; padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.hours-table td { text-align: right; }
.hours-tanning { color: var(--oak-dark); }
.visit-address { margin-bottom: var(--s-1); }
.visit-phone { margin-bottom: var(--s-2); }
.visit-phone a { font-weight: 700; text-decoration: none; }
.visit-phone a:hover { text-decoration: underline; }
.visit-actions { margin: var(--s-2) 0; }

.social-links { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.social-links a { font-weight: 700; }

/* Map */
.visit-map { min-height: 380px; display: grid; }
#map {
  width: 100%; height: 100%; min-height: 380px;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--paper-2);
}
/* keep required © attribution readable but quiet */
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(251, 249, 246, 0.8) !important;
  color: #5c5348 !important;
}

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s-2); }
.field label {
  display: block; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.04em; margin-bottom: 0.35rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--oak);
  box-shadow: 0 0 0 3px rgba(169, 127, 79, 0.18);
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.85rem; margin: 0.35rem 0 0; }
.form-intro { font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding: var(--s-6) 0 var(--s-3);
  margin-top: var(--s-6);
}
.footer-grid { display: grid; gap: var(--s-4); }
.footer-brand img { width: 200px; margin-bottom: var(--s-2); }
.footer-brand p { color: #cfc8bd; max-width: 34ch; }
.site-footer h4 {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--blush);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--blush); text-decoration: underline; }
.footer-legal {
  margin-top: var(--s-4); padding-top: var(--s-3);
  border-top: 1px solid rgba(251,249,246,0.15);
  font-size: 0.85rem; color: #a89f92;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(26,23,20,0.5);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: min(440px, calc(100vw - 2.5rem));
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  padding: var(--s-4);
  text-align: center;
  animation: modal-in 260ms ease-out;
}
.modal-card .eyebrow { margin-bottom: var(--s-1); }
.modal-close {
  position: absolute; top: var(--s-1); right: var(--s-1);
  width: 40px; height: 40px; font-size: 1.4rem; line-height: 1;
  background: none; border: none; cursor: pointer; color: var(--ink);
  border-radius: var(--radius);
}
.modal-close:hover { background: var(--paper-2); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.modal-open { overflow: hidden; }

/* ---------- Toasts ---------- */
.toast-region {
  position: fixed; bottom: var(--s-2); right: var(--s-2); z-index: 400;
  display: flex; flex-direction: column; gap: var(--s-1);
}
.toast {
  background: var(--ink); color: var(--paper);
  border-left: 3px solid var(--oak);
  padding: 0.8rem 1.1rem;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  animation: toast-in 260ms ease-out;
  max-width: 320px;
}
.toast.toast-error { border-left-color: var(--error); }
.toast.toast-success { border-left-color: var(--success); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 220ms, transform 220ms; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* stagger siblings inside grids */
.gallery .reveal:nth-child(2), .split .reveal:nth-child(2) { transition-delay: 90ms; }
.gallery .reveal:nth-child(3), .visit-grid .reveal:nth-child(2) { transition-delay: 140ms; }
.gallery .reveal:nth-child(4), .visit-grid .reveal:nth-child(3) { transition-delay: 200ms; }
.gallery .reveal:nth-child(5) { transition-delay: 250ms; }
.gallery .reveal:nth-child(6) { transition-delay: 300ms; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-item img, .btn, .mobile-menu-panel, .site-header { transition: none; }
  .modal-card, .toast { animation: none; }
}

/* Small screens: compact header + logo */
@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .logotype img { width: 128px; }
}

/* ==========================================================================
   Tablet ≥ 641px
   ========================================================================== */
@media (min-width: 641px) {
  .facts-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
  .sale-card { grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--s-4); }
  .visit-grid { grid-template-columns: 1fr 1fr; }
  .visit-map { grid-column: 1 / -1; min-height: 420px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ==========================================================================
   Laptop ≥ 1025px
   ========================================================================== */
@media (min-width: 1025px) {
  .hero-deco { display: block; }
  .site-nav { display: block; }
  .header-cta { display: inline-block; }
  .menu-toggle, .mobile-menu { display: none; }

  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: var(--s-6); }
  .split { grid-template-columns: 1fr 1.1fr; gap: var(--s-6); }
  .split-reverse { grid-template-columns: 0.8fr 1.2fr; }

  .visit-grid { grid-template-columns: 0.9fr 1.3fr 1fr; }
  .visit-map { grid-column: auto; min-height: 100%; }
}

/* ==========================================================================
   Large ≥ 1441px
   ========================================================================== */
@media (min-width: 1441px) {
  :root { --container: 1360px; }
  .section { padding: var(--s-7) 0; }
}
