/* ==========================================================================
   Aurora Commerce
   Theme everything from the :root block below — the rest of the file only
   ever references these custom properties.
   ========================================================================== */

:root {
  --accent: #5b5bd6;
  --accent-dark: #4a4ab8;
  --accent-soft: #eeeefb;

  --ink: #16181d;
  --ink-2: #454b58;
  /* Darkened so muted text clears AA on the tinted alternate surface too,
     not just on the primary one. */
  --ink-3: #69707e;

  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #eeeff2;
  --border: #e4e5ea;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(22, 24, 29, 0.08);
  --shadow-lg: 0 20px 50px rgba(22, 24, 29, 0.14);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --container: 1180px;
  --gutter: 24px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

:focus-visible { outline: 3px solid rgba(91, 91, 214, 0.35); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

h1, h2, h3 { margin: 0; line-height: 1.14; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 5.4vw, 4rem); letter-spacing: -0.01em; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.06rem; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 84px; }
.section--alt { background: var(--surface-2); }
.stack > * + * { margin-top: 14px; }

.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: .94rem; font-weight: 550;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { padding: 8px 16px; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------- header */

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.88); backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; }
.logo span { color: var(--accent); }

.menu { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.menu a { padding: 8px 12px; border-radius: 999px; font-size: .92rem; color: var(--ink-2); font-weight: 500; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--surface-3); color: var(--ink); }

.cart-btn { position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 9px 16px; cursor: pointer; font-size: .9rem; font-weight: 550; }
.cart-btn__count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .68rem; font-weight: 700; display: grid; place-items: center;
}
/* `display: grid` above outranks the [hidden] attribute's own display:none,
   so an empty cart would otherwise show a "0" badge. */
.cart-btn__count[hidden] { display: none; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; cursor: pointer; }

/* ------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding-block: 96px 84px; }
.hero::after {
  content: ""; position: absolute; inset: -30% -20% 30% 45%;
  background: radial-gradient(circle at 40% 50%, var(--accent-soft), transparent 65%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero p { margin-top: 18px; font-size: 1.14rem; color: var(--ink-2); max-width: 46ch; }
.hero__actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero__stats b { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }
.hero__stats span { font-size: .8rem; color: var(--ink-3); }

.hero__art {
  aspect-ratio: 4/5; border-radius: 22px; overflow: hidden; position: relative;
  background: linear-gradient(150deg, var(--accent-soft), #fdf0f4 55%, #eef6f4);
  box-shadow: var(--shadow-lg);
}
.hero__art svg { width: 100%; height: 100%; }

/* ------------------------------------------------------------- marquee */

.marquee { border-block: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.marquee__track { display: flex; gap: 48px; padding: 16px 0; white-space: nowrap; animation: slide 28s linear infinite; }
.marquee span { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 550; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; justify-content: center; flex-wrap: wrap; white-space: normal; } }

/* ------------------------------------------------------------- products */

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head p { color: var(--ink-3); margin-top: 8px; max-width: 52ch; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .86rem; font-weight: 550; color: var(--ink-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.filter:hover { border-color: var(--ink-3); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px; }

.product { display: flex; flex-direction: column; }
.product__media {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-3); margin-bottom: 14px;
}
.product__media svg { width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.product:hover .product__media svg { transform: scale(1.05); }
.product__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: .68rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
}
.product__add {
  position: absolute; inset: auto 12px 12px 12px; z-index: 2;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.product:hover .product__add, .product__add:focus-visible { opacity: 1; transform: translateY(0); }
.product__name { font-weight: 550; font-size: .98rem; }
.product__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 4px; }
.product__price { font-weight: 650; font-variant-numeric: tabular-nums; }
.product__cat { font-size: .78rem; color: var(--ink-3); }

.empty { padding: 56px 20px; text-align: center; color: var(--ink-3); grid-column: 1 / -1; }

/* ------------------------------------------------------------- cart drawer */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(22,24,29,.42);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(420px, 100%);
  background: var(--surface); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.3,1);
  box-shadow: var(--shadow-lg);
}
.drawer[data-open="true"] { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer__foot { padding: 20px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer__close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px 8px; }

.line { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--border); }
.line__media { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.line__name { font-weight: 550; font-size: .92rem; }
.line__price { font-size: .84rem; color: var(--ink-3); }
.qty { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty button { width: 26px; height: 26px; border: 0; background: var(--surface); cursor: pointer; color: var(--ink-2); }
.qty button:hover { background: var(--surface-3); }
.qty output { min-width: 24px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.line__remove { background: none; border: 0; cursor: pointer; color: var(--ink-3); font-size: .78rem; text-decoration: underline; padding: 0; }

.totals { display: grid; gap: 6px; font-size: .92rem; margin-bottom: 16px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.1rem; font-weight: 650; padding-top: 8px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------- editorial */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__art { aspect-ratio: 5/4; border-radius: 20px; overflow: hidden; background: linear-gradient(140deg, #f3efe9, var(--accent-soft)); }
.split__art svg { width: 100%; height: 100%; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.value__num { font-family: var(--font-display); font-size: 1.8rem; color: var(--accent); }

/* ------------------------------------------------------------- newsletter */

.signup { background: var(--ink); color: #fff; border-radius: 22px; padding: 56px 48px; text-align: center; }
.signup h2 { color: #fff; }
.signup p { color: rgba(255,255,255,.72); margin-top: 12px; max-width: 44ch; margin-inline: auto; }
.signup form { display: flex; gap: 10px; max-width: 420px; margin: 26px auto 0; flex-wrap: wrap; }
.signup input {
  flex: 1; min-width: 200px; padding: 13px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font: inherit;
}
.signup input::placeholder { color: rgba(255,255,255,.5); }
.signup input:focus { outline: none; border-color: #fff; }
.signup .btn { background: #fff; color: var(--ink); border-color: #fff; }
.signup [data-status] { margin-top: 14px; font-size: .86rem; min-height: 1.2em; color: #9ff5d0; }

/* ------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--border); padding-block: 56px 32px; margin-top: 84px; background: var(--surface-2); }
.footer__grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 32px; }
.footer h4 { margin: 0 0 12px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer a { font-size: .9rem; color: var(--ink-2); }
.footer a:hover { color: var(--accent); }
.footer__base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }

/* ------------------------------------------------------------- reveal */

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- product page */

.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.pdp__gallery { display: grid; gap: 12px; }
.pdp__main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-3); }
.pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pdp__thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); border: 2px solid transparent; cursor: pointer; padding: 0; }
.pdp__thumb[aria-pressed="true"] { border-color: var(--accent); }
.pdp__info { position: sticky; top: 92px; }
.pdp__price { font-size: 1.7rem; font-weight: 650; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.accordion { border-top: 1px solid var(--border); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion summary { padding: 16px 0; cursor: pointer; font-weight: 550; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--ink-3); }
.accordion details[open] summary::after { content: "−"; }
.accordion p { padding-bottom: 16px; color: var(--ink-2); font-size: .92rem; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .hero__inner, .split, .pdp { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { max-width: 460px; }
  .values { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .pdp__info { position: static; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .section { padding-block: 60px; }
  .hero { padding-block: 56px 48px; }
  .menu-toggle { display: inline-flex; }
  .menu {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 18px; box-shadow: var(--shadow);
  }
  .menu[data-open="true"] { display: flex; }
  .header__inner { gap: 12px; position: relative; }
  .signup { padding: 40px 24px; }
  .footer__grid { grid-template-columns: 1fr; }
}
