/* ==========================================================================
   Medilume — main stylesheet (mobile-first)
   ========================================================================== */

:root {
  --cream: #faf6f2;      /* off-white background */
  --blush: #f4e7e2;      /* soft rosé surface */
  --nude: #ead9cc;       /* nude surface */
  --rose: #d9b2a8;       /* rosé accent */
  --espresso: #3a2a24;   /* dark accent / headings */
  --text: #4a3830;       /* body text */
  --muted: #6b5850;      /* secondary text (AA on cream) */
  --line: #e6d8cf;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --container: 1160px;
  --gutter: 20px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--espresso); text-underline-offset: 3px; }
a:hover { color: #7a4a3e; }
:focus-visible { outline: 2px solid var(--espresso); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--espresso);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); }
h2 { font-size: clamp(2rem, 6vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--espresso); color: var(--cream); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: var(--cream); }

.eyebrow {
  font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 30px; border-radius: 999px;
  background: var(--espresso); color: var(--cream);
  font: 500 .95rem/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  transition: background-color .25s ease, transform .25s ease;
}
.btn:hover { background: #523b32; color: var(--cream); transform: translateY(-1px); }

.section { padding: 72px 0; }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 242, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.wordmark {
  font-family: var(--serif); font-size: 1.85rem; font-weight: 500; letter-spacing: .02em;
  color: var(--espresso); text-decoration: none; line-height: 1;
}

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; color: var(--espresso);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--cream); border-bottom: 1px solid var(--line);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.site-nav a {
  display: block; padding: 14px 0; text-decoration: none; color: var(--espresso);
  font-family: var(--serif); font-size: 1.5rem; border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 64px; background: linear-gradient(180deg, var(--cream) 0%, var(--blush) 100%); }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-copy .lead { font-size: 1.1rem; color: var(--muted); max-width: 30rem; margin-bottom: 1.75rem; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 160px 160px var(--radius) var(--radius); }

/* ---------- Collections ---------- */
.card-grid { display: grid; gap: 28px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--nude); }
.card-body { padding: 22px 22px 26px; }
.card-body p { color: var(--muted); margin-bottom: 1.1rem; }
.card-link { font-size: .9rem; font-weight: 500; letter-spacing: .04em; }

/* ---------- Why ---------- */
.why { background: var(--blush); }
.feature-grid { display: grid; gap: 32px; list-style: none; margin: 0; padding: 0; }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; background: var(--cream); color: var(--espresso); margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.45rem; margin-bottom: .3em; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 36px; align-items: center; }
.about-media img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--radius); }
.about-copy p { font-size: 1.08rem; }
.about-copy .signature { font-family: var(--serif); font-size: 1.4rem; color: var(--espresso); font-style: italic; margin-top: 1.5rem; }

/* ---------- Contact ---------- */
.contact { background: var(--espresso); color: #f1e6df; text-align: center; }
.contact h2 { color: var(--cream); }
.contact .eyebrow { color: #d8c3b8; }
.contact p { color: #e3d3ca; max-width: 34rem; margin-inline: auto; }
.contact-email {
  display: inline-block; margin: 8px 0 28px; font-family: var(--serif); font-size: clamp(1.6rem, 6vw, 2.4rem);
  color: var(--cream); text-decoration-color: var(--rose); text-decoration-thickness: 1px;
}
.contact-email:hover { color: var(--rose); }
.contact address { font-style: normal; color: #e3d3ca; line-height: 1.7; }
.contact address strong { color: var(--cream); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--cream); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; gap: 28px; }
.site-footer address { font-style: normal; }
.footer-address { margin-top: 14px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--espresso); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- Legal pages ---------- */
.legal { padding: 48px 0 80px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2.3rem, 8vw, 3.4rem); }
.legal h2 { font-size: 1.7rem; margin-top: 2.2em; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.legal ul, .legal ol { padding-left: 1.2rem; }
.legal li { margin-bottom: .4em; }
.legal address { font-style: normal; }

/* ---------- Reveal on scroll (JS-enhanced only) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 76px; }
  .section { padding: 112px 0; }

  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .site-nav ul { display: flex; gap: 36px; padding: 0; }
  .site-nav a { padding: 6px 0; border: 0; font-family: var(--sans); font-size: .92rem; letter-spacing: .06em; }
  .site-nav a:hover { color: #7a4a3e; }

  .hero { padding: 64px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 64px; }
  .card-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: .9fr 1.1fr; gap: 80px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
