/* OES Dresses — restrained, photo-led, readable. Base styles use :where() to keep specificity at zero. */

:root {
  --ink: #1d1a1b;
  --muted: #4c4648;
  --paper: #ffffff;
  --cream: #f6f2ec;
  --stone: #e9e3da;
  --line: #857c7f;          /* 3.9:1 on white: UI borders */
  --accent: #6b1f3a;        /* deep burgundy, 11:1 on white */
  --accent-dark: #4f1129;
  --accent-tint: #f4e9ed;
  --gold: #9a7a2e;          /* decorative only */
  --ok: #1d5a32;
  --ok-tint: #e7f2ea;
  --err: #a01b1b;
  --err-tint: #fbeaea;
  --focus: #0b5cad;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --radius: 6px;
  --gutter: 16px;
  --maxw: 1180px;
  color-scheme: light;
}

/* ---------- Base ---------- */
:where(*, *::before, *::after) { box-sizing: border-box; }
:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
:where(body) {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
:where(h1, h2, h3, h4) {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
}
:where(h1) { font-size: clamp(2rem, 1.6rem + 2vw, 2.9rem); }
:where(h2) { font-size: clamp(1.55rem, 1.35rem + 1vw, 2.05rem); }
:where(h3) { font-size: 1.3rem; }
:where(p, ul, ol, dl, table, figure) { margin: 0 0 1em; }
:where(ul, ol) { padding-left: 1.4em; }
:where(li) { margin-bottom: 0.35em; }
:where(a) { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(a:hover) { color: var(--accent-dark); text-decoration-thickness: 2px; }
:where(img) { max-width: 100%; height: auto; display: block; }
:where(table) { border-collapse: collapse; width: 100%; }
:where(th, td) { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
:where(th) { font-weight: 700; }
:where(strong, b) { font-weight: 700; }
:where(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
:where(input, select, textarea, button) { font: inherit; font-size: max(1rem, 1em); color: inherit; }
:where(main:focus) { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

.icon { flex: none; }
.small { font-size: 1rem; color: var(--muted); }
.lede { font-size: 1.25rem; color: var(--muted); max-width: 46rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius);
  font-weight: 700; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--accent); }
.btn-secondary:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-large { min-height: 56px; padding: 14px 28px; font-size: 1.15rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #fff; font-size: 1rem; }
.topbar p { margin: 0; padding: 8px 0; text-align: center; }
.topbar a { color: #fff; font-weight: 700; }
.header-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 48px; }
.brand-mark { color: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.brand-tag { font-size: 0.95rem; color: var(--muted); }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; font-weight: 700; cursor: pointer;
}
.nav-toggle[hidden] { display: none; }
.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-nav li { margin: 0; border-top: 1px solid var(--stone); }
.site-nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 4px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.site-nav .nav-cta a { color: var(--accent); }
.js .site-nav.is-collapsed { display: none; }

@media (min-width: 1100px) {
  .nav-toggle { display: none !important; }
  .site-nav, .js .site-nav.is-collapsed { display: block; width: auto; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
  .site-nav li { border: 0; }
  .site-nav a { padding: 8px 2px; }
  .site-nav .nav-cta a {
    background: var(--accent); color: #fff; border-radius: var(--radius); padding: 10px 18px; text-decoration: none;
  }
  .site-nav .nav-cta a:hover, .site-nav .nav-cta a[aria-current="page"] { background: var(--accent-dark); color: #fff; text-decoration: underline; }
}

/* ---------- Page sections ---------- */
.page-head { padding-block: 40px 16px; }
.page-head .lede { margin-bottom: 0; }
.section { padding-block: 40px; }
.section-alt { background: var(--cream); }
.section h2 { margin-bottom: 0.4em; }
.section-intro { max-width: 46rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 1rem; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumb a { display: inline-block; padding-block: 4px; }

/* Hero */
.hero { background: var(--cream); }
.hero-grid { display: grid; gap: 28px; padding-block: 32px 40px; align-items: center; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 20%; border-radius: var(--radius); }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { color: var(--ink); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.05fr; padding-block: 56px; } }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { margin: 0; padding: 20px; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius); counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 10px;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin: 0; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Cards */
.card-grid { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { margin: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden; position: relative; }
.card-media { aspect-ratio: 4 / 5; background: var(--stone); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: 1.2rem; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { text-decoration: underline; color: var(--accent); }
.card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-title a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; text-decoration: underline; text-decoration-thickness: 2px; color: var(--accent-dark); background: #e8f0fa; }
.card-price { margin: 0; font-weight: 700; }
.card-meta { margin: 0; color: var(--muted); font-size: 1rem; }
.family-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Two-column text + photo */
.split { display: grid; gap: 28px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

.quote { margin: 0; padding: 20px 24px; border-left: 4px solid var(--accent); background: #fff; }
.quote p { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.4em; }
.quote figcaption { color: var(--muted); font-size: 1rem; }

.facts { list-style: none; padding: 0; display: grid; gap: 12px; }
.facts li { padding-left: 32px; position: relative; margin: 0; }
.facts li .icon { position: absolute; left: 0; top: 4px; color: var(--accent); }

/* Prose */
.prose { max-width: 46rem; padding-bottom: 40px; }
.prose h2 { margin-top: 1.4em; }

/* Help box (same place on every page) */
.help-box { background: var(--stone); padding-block: 28px; margin-top: 40px; }
.help-box h2 { font-size: 1.4rem; }
.help-box p { margin: 0; }
.help-box a { font-weight: 700; }

/* Footer */
.site-footer { background: var(--ink); color: #fff; padding-top: 40px; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding-block: 6px; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.footer-h { color: #fff; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.footer-base { border-top: 1px solid #5d5557; margin-top: 32px; padding-block: 16px; font-size: 1rem; }
.footer-base p { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label, .group-legend { font-weight: 700; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: 1rem; }
.hint { margin: 0; color: var(--muted); font-size: 1rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, .copy-row input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .copy-row input:focus-visible { border-color: var(--focus); }
.field-error { margin: 0; color: var(--err); font-weight: 700; font-size: 1rem; display: flex; gap: 6px; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--err); color: #fff; font-size: 0.85em; margin-top: 0.15em; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err) !important; }
.field-row { display: grid; gap: 22px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.choice-group { display: grid; gap: 8px; }
.choice-group > legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px;
  border: 2px solid var(--stone); border-radius: var(--radius); background: #fff; cursor: pointer;
}
.choice:hover { border-color: var(--line); }
.choice input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.choice .choice-label { flex: 1; }
.choice .choice-price { font-weight: 700; white-space: nowrap; }
.choice-cols { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.swatch {
  display: inline-block; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--swatch, #fff); border: 2px solid var(--ink); box-shadow: inset 0 0 0 2px #fff; vertical-align: middle;
}
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; min-height: 32px; cursor: pointer; }
.checkbox input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.error-summary { border: 3px solid var(--err); background: var(--err-tint); padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; }
.error-summary h2 { font-size: 1.3rem; color: var(--err); }
.error-summary ul { margin: 0; }
.error-summary a { color: var(--err); font-weight: 700; }
.notice { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; border-left: 6px solid var(--ok); background: var(--ok-tint); }
.notice h2 { font-size: 1.4rem; }
.notice > :last-child { margin-bottom: 0; }
.notice-info { border-left-color: var(--accent); background: var(--accent-tint); }
.notice:focus { outline: 3px solid var(--focus); outline-offset: 3px; }

.form-status { min-height: 1.6em; font-weight: 700; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* ---------- Customizer ---------- */
.steps-indicator { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 24px; font-size: 1rem; }
.steps-indicator li { margin: 0; color: var(--muted); }
.steps-indicator li[aria-current="step"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; text-decoration-color: var(--accent); }

.customizer { display: grid; gap: 32px; align-items: start; }
.customizer .panel { border-top: 2px solid var(--ink); padding-top: 20px; display: grid; gap: 20px; }
.customizer .panel > h2 { margin: 0; }
.chosen-style { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.chosen-style img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); }
.chosen-style p { margin: 0; }
.summary { background: var(--cream); border: 1px solid var(--stone); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.summary h2 { font-size: 1.4rem; margin: 0; }
.summary-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); background: #fff; }
.photo-note { font-size: 1rem; color: var(--muted); margin: 0; }
.price-big { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; margin: 0; line-height: 1.1; }
.price-big small { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--muted); display: block; margin-top: 4px; }
.submit-area { display: grid; gap: 12px; }
@media (min-width: 1000px) {
  .customizer { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 48px; }
  .customizer .summary { grid-column: 2; grid-row: 1 / span 6; position: sticky; top: 16px; }
  .customizer .panel, .customizer .submit-area, .customizer .error-summary { grid-column: 1; }
}

.spec { margin: 0; display: grid; gap: 0; }
.spec > div { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--stone); }
.spec dt { font-weight: 700; }
.spec dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spec .swatch { width: 22px; height: 22px; }

/* Design card (member + manage pages) */
.design-card { display: grid; gap: 20px; background: var(--cream); border-radius: var(--radius); padding: 20px; }
.design-photo img { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); }
@media (min-width: 760px) { .design-card { grid-template-columns: 300px 1fr; } }

.progress { margin: 0 0 20px; }
.progress-text { margin: 0 0 8px; font-size: 1.15rem; }
.bar { height: 14px; background: var(--stone); border-radius: 7px; overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; background: var(--accent); }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 1rem; border: 2px solid currentColor; }
.status-open { color: var(--ok); }
.status-closed { color: var(--muted); }

.copy-link { display: grid; gap: 6px; }
.copy-link label { font-weight: 700; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 260px; font-size: 1rem; }
.copy-status { margin: 0; min-height: 1.5em; color: var(--ok); font-weight: 700; }

.table-wrap { position: relative; overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--stone); border-radius: var(--radius); }
.table-wrap:focus-visible { outline: 3px solid var(--focus); }
.table-wrap table { margin: 0; min-width: 640px; }
.table-wrap th { background: var(--cream); }
.sizes-table { max-width: 420px; }
.sizes-table table { min-width: 0; }
.sizes-table td:last-child, .sizes-table th:last-child { text-align: right; }

details.confirm summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; cursor: pointer;
  border: 2px solid var(--err); color: var(--err); border-radius: var(--radius); font-weight: 700; list-style: none;
}
details.confirm summary::-webkit-details-marker { display: none; }
details.confirm[open] summary { margin-bottom: 8px; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { background: #7b1414; border-color: #7b1414; color: #fff; }

.two-col { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.link-list a { font-weight: 700; }

/* ---------- Product page ---------- */
.product-layout { display: grid; gap: 32px; padding-bottom: 24px; }
@media (min-width: 900px) { .product-layout { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.gallery-main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); background: var(--stone); }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.thumbs li { margin: 0; }
.thumbs button, .thumbs a { display: block; padding: 0; border: 2px solid var(--stone); border-radius: var(--radius); background: none; cursor: pointer; overflow: hidden; width: 100%; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); border-width: 3px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
.price-line { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.color-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.color-list li { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.desc { max-width: 40rem; }

/* ---------- Size guide / FAQ ---------- */
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 1.15rem; min-height: 48px; display: flex; align-items: center; }
.faq-list details[open] summary { color: var(--accent); }
.faq-list details > p { margin: 0 0 16px; max-width: 46rem; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .choice, .card { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .help-box, .skip-link, .btn, .copy-row button { display: none !important; }
  body { font-size: 12pt; }
}
@media (forced-colors: active) {
  .swatch { forced-color-adjust: none; }
  .btn, .choice { border: 2px solid ButtonText; }
}
