/* ==========================================================================
   ELORIA SECRETS — base.css
   Design tokens, reset, typography, layout primitives, buttons, forms.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Colour — v3.1 soft pink: blush-white surfaces, baby-pink panels, a deep rose accent, near-black text */
  --c-blush: #F9DCE5;         /* baby pink (selection, soft fills, badges) */
  --c-blush-soft: #FDF1F5;    /* palest pink panel */
  --c-rose: #F4BFCF;          /* light pink (decorative lines, hover fills) */
  --c-dusty: #E596AE;         /* soft pink (non-text accents) */
  --c-deep: #A63D62;          /* deep rose for text/links/CTA on light (≈6.1:1 on white) */
  --c-warm: #FFFAFB;          /* page background, a breath of pink */
  --c-white: #FFFFFF;
  --c-cream: #FCEEF2;         /* pink panel / image well */
  --c-ink: #1F1A1C;
  --c-ink-2: #433A3E;
  --c-muted: #6E6267;         /* body-secondary (≈5.8:1 on page bg) */
  --c-line: #F2DFE6;
  --c-line-strong: #E5C7D2;
  --c-success: #3F6B54;
  --c-error: #A3283F;

  /* Type — readable high-contrast display serif + clean geometric sans */
  --f-serif: "Prata", "Playfair Display", Georgia, "Times New Roman", serif;
  --f-sans: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --fs-display: clamp(2.4rem, 1.5rem + 3.8vw, 4.75rem);
  --fs-h1: clamp(2.05rem, 1.5rem + 2.3vw, 3.5rem);
  --fs-h2: clamp(1.7rem, 1.35rem + 1.5vw, 2.65rem);
  --fs-h3: clamp(1.25rem, 1.12rem + .55vw, 1.6rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.02rem, .98rem + .2vw, 1.125rem);
  --fs-body: .9375rem;
  --fs-sm: .84375rem;
  --fs-xs: .78125rem;
  --fs-eyebrow: .71875rem;

  --lh-tight: 1.06;
  --lh-head: 1.14;
  --lh-body: 1.65;

  --ls-eyebrow: .18em;
  --ls-ui: .12em;

  /* Space (8pt rhythm) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 2.5rem; --s-8: 3rem; --s-9: 4rem; --s-10: 5rem; --s-11: 6.5rem;
  --section: clamp(3.5rem, 2.3rem + 4.8vw, 7.5rem);
  --section-sm: clamp(2.75rem, 2rem + 2.6vw, 4.75rem);

  /* Layout */
  --container: 1440px;
  --container-narrow: 860px;
  --gutter: clamp(1.125rem, .5rem + 2.6vw, 3rem);
  --header-h: 76px;
  --ann-h: 36px;

  /* Shape & depth */
  --r-0: 0;
  --r-1: 2px;
  --r-pill: 999px;
  --shadow-soft: 0 18px 50px -30px rgba(23, 21, 21, .22);
  --shadow-drawer: -20px 0 50px -30px rgba(23, 21, 21, .3);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .18s;
  --t-med: .35s;
  --t-slow: .7s;

  --z-header: 50; --z-drawer: 80; --z-modal: 90; --z-toast: 100;
}

@media (max-width: 1023px) { :root { --header-h: 64px; } }

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--c-blush); color: var(--c-ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-deep);
  outline-offset: 3px;
}
.on-dark :focus-visible, .hero-overlay :focus-visible { outline-color: var(--c-white); }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--c-ink); color: var(--c-white);
  padding: var(--s-3) var(--s-5); font-size: var(--fs-sm); letter-spacing: var(--ls-ui);
}
.skip-link:focus { top: var(--s-4); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Typography ---------- */
.display, .h1, .h2, .h3, h1, h2, h3 {
  font-family: var(--f-serif);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: var(--lh-head);
  font-optical-sizing: auto;
  text-wrap: balance;
  color: var(--c-ink);
}
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -.02em; }
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-family: var(--f-sans); font-size: var(--fs-h4); font-weight: 500; line-height: 1.35; letter-spacing: 0; }
.display em, h1 em, h2 em, h3 em, .h1 em, .h2 em { font-style: italic; color: inherit; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--f-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-muted);
}
.eyebrow--line::before { content: none; }
.eyebrow--muted { color: var(--c-muted); }

.lead { font-size: var(--fs-lead); line-height: 1.75; color: var(--c-ink-2); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }
.serif-italic { font-family: var(--f-serif); font-style: italic; }

.prose { max-width: 68ch; color: var(--c-ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-top: 2.2em; color: var(--c-ink); }
.prose h3 { font-size: 1.35rem; margin-top: 1.8em; color: var(--c-ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }
.prose a { color: var(--c-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.container--wide { max-width: 1680px; }
.section { padding-block: var(--section); }
.section--sm { padding-block: var(--section-sm); }
.section--flush-top { padding-top: 0; }
.bg-blush { background: var(--c-blush-soft); }
.bg-cream { background: var(--c-cream); }
.bg-white { background: var(--c-white); }
.bg-ink { background: var(--c-ink); color: var(--c-warm); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.5rem); }
.section-head__title { max-width: 42rem; }
.section-head__title .eyebrow { margin-bottom: var(--s-4); }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center p { max-width: 52ch; margin-top: var(--s-4); }
@media (max-width: 767px) { .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-4); } .section-head--center { align-items: center; } }

.stack > * + * { margin-top: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ---------- 5. Buttons & links ---------- */
.btn {
  --btn-bg: var(--c-ink); --btn-fg: var(--c-white); --btn-bd: var(--c-ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 0 2.25rem;
  font-family: var(--f-sans); font-size: .78125rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  border-radius: var(--r-0);
  overflow: hidden; isolation: isolate;
  transition: color var(--t-med) var(--ease), border-color var(--t-med) var(--ease), background-color var(--t-med) var(--ease);
  white-space: nowrap;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-deep);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-med) var(--ease-out);
}
.btn:hover::after { transform: scaleX(1); transform-origin: left; }
.btn:hover { border-color: var(--c-deep); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--accent { --btn-bg: var(--c-deep); --btn-bd: var(--c-deep); }
.btn--accent::after { background: var(--c-ink); }
.btn--accent:hover { border-color: var(--c-ink); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-bd: var(--c-ink); }
.btn--outline:hover { color: var(--c-white); }
.btn--outline::after { background: var(--c-ink); }
.btn--outline:hover { border-color: var(--c-ink); }
.btn--light { --btn-bg: var(--c-white); --btn-fg: var(--c-ink); --btn-bd: var(--c-white); }
.btn--light::after { background: var(--c-ink); }
.btn--light:hover { color: var(--c-white); border-color: var(--c-ink); }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: var(--c-white); --btn-bd: rgba(255,255,255,.7); }
.btn--ghost-light::after { background: var(--c-white); }
.btn--ghost-light:hover { color: var(--c-ink); border-color: var(--c-white); }
.btn--block { width: 100%; }
@media (max-width: 479px) { .btn { max-width: 100%; padding-inline: 1.5rem; white-space: normal; text-align: center; line-height: 1.3; } }
.btn--sm { min-height: 44px; padding: 0 1.4rem; font-size: .71875rem; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 50%; top: 50%; margin: -9px 0 0 -9px;
  border: 1.5px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent;
  border-radius: 50%; animation: spin .8s linear infinite; z-index: 2;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-line {
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding-bottom: 6px;
}
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform-origin: right; transition: transform var(--t-med) var(--ease-out);
}
.link-line:hover::after { transform: scaleX(0); }
.link-line:hover { color: var(--c-deep); }
.link-line svg { width: 14px; height: 14px; transition: transform var(--t-med) var(--ease-out); }
.link-line:hover svg { transform: translateX(4px); }

.text-link { color: var(--c-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--c-ink); }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; color: var(--c-ink);
  transition: color var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--c-deep); }
.icon-btn svg { width: 20px; height: 20px; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 6. Forms ---------- */
.field { display: flex; flex-direction: column; gap: .45rem; }
.field + .field { margin-top: 0; }
.label { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink-2); }
.label .opt { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--c-muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: .85rem 1rem;
  font-size: 1rem; /* ≥16px avoids iOS zoom */
  background: var(--c-white); color: var(--c-ink);
  border: 1px solid var(--c-line-strong); border-radius: var(--r-1);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #7D7377; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-ink); box-shadow: 0 0 0 3px rgba(138, 74, 94, .14); outline: none; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select {
  padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23292326' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px;
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--c-error); }
.field-error { display: none; align-items: center; gap: .4rem; font-size: var(--fs-sm); color: var(--c-error); }
.field.has-error .field-error { display: flex; }
.field-hint { font-size: var(--fs-sm); color: var(--c-muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }

.check { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; font-size: var(--fs-sm); line-height: 1.5; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1px solid var(--c-line-strong); background: var(--c-white); border-radius: var(--r-1);
  display: grid; place-items: center; transition: all var(--t-fast) var(--ease);
}
.check__box svg { width: 12px; height: 12px; stroke: var(--c-white); stroke-width: 2.4; fill: none; opacity: 0; }
.check input:checked + .check__box { background: var(--c-ink); border-color: var(--c-ink); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--c-deep); outline-offset: 2px; }
.check--radio .check__box { border-radius: 50%; }
.check--radio input:checked + .check__box { background: var(--c-white); box-shadow: inset 0 0 0 5px var(--c-ink); }

.form-status {
  display: none; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.15rem; font-size: var(--fs-sm); line-height: 1.55;
  border: 1px solid var(--c-line); background: var(--c-white);
}
.form-status.is-visible { display: flex; }
.form-status--success { border-color: #BCD1C3; background: #F3F8F4; color: #2E5240; }
.form-status--error { border-color: #E5BFC5; background: #FCF3F4; color: var(--c-error); }
.form-status svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* Demo notice */
.demo-note {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; font-size: var(--fs-sm); line-height: 1.55;
  background: var(--c-cream); border-left: 2px solid var(--c-dusty); color: var(--c-ink-2);
}
.demo-note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--c-deep); }
.demo-tag {
  display: inline-block; padding: .2rem .5rem; font-size: .625rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  background: var(--c-cream); color: var(--c-muted); border: 1px dashed var(--c-line-strong);
}

/* ---------- 7. Media ---------- */
.media { position: relative; overflow: hidden; background: var(--c-blush-soft); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-tall { aspect-ratio: 3 / 4; }
.ratio-square { aspect-ratio: 1; }
.ratio-wide { aspect-ratio: 16 / 9; }
/* Fallback when a remote image fails to load (temporary placeholder) */
img.is-broken { opacity: 0 !important; }
.has-broken {
  background:
    radial-gradient(120% 80% at 70% 20%, rgba(255,255,255,.7), transparent 60%),
    linear-gradient(160deg, var(--c-blush) 0%, var(--c-rose) 100%);
}
.media.has-broken::after, .card__media.has-broken::after, .hero__media.has-broken::after, .cat-tile__media.has-broken::after, .coll__media.has-broken::after, .split__media.has-broken::after, .gallery-pdp__slide.has-broken::after {
  content: "Image placeholder"; position: absolute; inset: auto 0 1rem 0; text-align: center;
  font-size: .625rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-ink-2); opacity: .7;
}

/* ---------- 8. Reveal (progressive — content visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal-mask { clip-path: inset(0 0 100% 0); }
.js .reveal-mask.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.2s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal, .js .reveal-mask { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
