/* Maison Enamiass. Copied from design/site.css (the comp); keep the two in step.
   Tokens live on :root. Everything else reads from them.

   Design read: event furniture rental for families and couples, warm luxury, native CSS.
   Dials: variance 7, motion 4, density 3.
   Shapes: surfaces --r-surface, fields --r-field, controls (buttons, chips, filters) are pills. */
:root {
  /* Palette from reference.jpeg: ivory room, champagne gold, espresso lettering, olive foliage.
     --gold is ornament only (2.7:1 on ivory). Gold text uses --gold-text. */
  --bg: #fbf7ef;
  --surface: #ffffff;
  --band: #f1e8d6;
  --ink: #2a2118;
  --muted: #6b5d4d;
  --line: #e4d9c4;
  --brand: #2a2118;
  --brand-hover: #45372a;
  --on-brand: #fbf7ef;
  --gold: #b8924a;
  --gold-text: #8a6a2b;
  --olive: #5c6b45;
  --ph: #eadfc8;
  --shadow: 42 33 24;
  --r-surface: 16px;
  --r-field: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--line) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); accent-color: var(--brand); caret-color: var(--gold-text); }
::selection { background: var(--gold); color: #15110c; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.015em; line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0; color: var(--muted); text-wrap: pretty; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: 104px 0; }
.lead { font-size: 1.1rem; max-width: 56ch; }
.center { text-align: center; }
.center .lead { margin: 12px auto 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 1.3rem; text-decoration: none; white-space: nowrap; }
.brand img { height: 40px; width: auto; }
.sm-only { display: none; }
.logo-chip { display: inline-block; border-radius: var(--r-field); }
.brand-full { display: block; width: 200px; height: auto; }
.nav { display: flex; gap: 22px; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 .95rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--band); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn:focus-visible, .pick:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .filters button:focus-visible, a:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Photos: img with width and height set, srcset in the markup. .ph is a slot waiting for a photo. */
.photo { position: relative; overflow: hidden; border-radius: var(--r-surface); background: var(--ph); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
a:hover > .photo img, figure:hover > .photo img { transform: scale(1.03); }
.ph { position: relative; background: var(--ph); border-radius: var(--r-surface); aspect-ratio: 4 / 3; display: flex; align-items: flex-end; padding: 14px; overflow: hidden; }
.ph small { font-size: .8rem; color: var(--muted); background: var(--surface); padding: 4px 8px; border-radius: 8px; }
.ph.tall { aspect-ratio: 3 / 4; }
.ph.wide { aspect-ratio: 16 / 9; }

/* Hero: text left, one tall photo right, fits the first viewport */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(32px, 5vw, 56px); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lead { margin-top: 20px; }
.hero-photo { height: min(66vh, 560px); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 36px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); overflow: hidden; }
.card .ph, .card .photo { border-radius: 0; aspect-ratio: 4 / 3; }
.card .body { padding: 16px 18px 20px; }
.card .body p { font-size: .92rem; margin-top: 6px; }
.card h2 { font-size: 1.25rem; }
.families { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 36px; border-top: 1px solid var(--gold); }
.family { display: block; padding: 24px 24px 28px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.family + .family { padding-left: 24px; border-left: 1px solid var(--line); }
.family p { margin-top: 10px; font-size: .95rem; }
.family .go { display: inline-block; margin-top: 18px; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.family:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.tag { display: inline-block; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 10px 6px 0 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; counter-reset: s; }
.steps li { list-style: none; border-top: 1px solid var(--gold); padding-top: 18px; }
.steps li::before { counter-increment: s; content: "0" counter(s); display: block; font: 500 .85rem var(--sans); color: var(--gold-text); margin-bottom: 8px; }

/* Band */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Teaser mosaic: two tall photos, unequal widths */
.mosaic { display: grid; grid-template-columns: 5fr 4fr; gap: 18px; margin-top: 36px; height: clamp(480px, 72vh, 640px); }
.mosaic figure { display: flex; flex-direction: column; margin: 0; min-height: 0; }
.mosaic .photo { flex: 1; min-height: 0; }
.mosaic figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 32px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); border-radius: var(--r-field); padding: 12px 14px; min-height: 48px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.picked { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 48px; background: var(--bg); border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--r-field); padding: 8px 10px; }
.chip { font-size: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; display: inline-flex; gap: 6px; align-items: center; }
.form-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); max-width: 46ch; }

/* Quote modal */
dialog.quote { border: 0; border-radius: var(--r-surface); padding: 0; width: min(920px, calc(100% - 32px)); max-height: 88vh; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgb(var(--shadow) / .45); }
dialog.quote::backdrop { background: rgb(21 17 12 / .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); background: var(--surface); }
.modal-body { padding: 22px 26px; overflow: auto; max-height: calc(88vh - 150px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; color: var(--ink); transition: background-color .2s var(--ease); }
.filters button:hover { background: var(--band); }
.filters button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pick { position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-field); padding: 12px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.pick:hover { border-color: var(--gold); }
.pick .ph, .pick .thumb { width: 56px; height: 56px; aspect-ratio: 1; flex: none; padding: 0; border-radius: 10px; overflow: hidden; }
.pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.pick small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.pick[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.pick .mark { margin-left: auto; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); display: grid; place-items: center; }
.pick .mark::after { content: ""; width: 5px; height: 10px; border: solid var(--on-brand); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); opacity: 0; }
.pick[aria-pressed="true"] .mark { background: var(--brand); border-color: var(--brand); }
.pick[aria-pressed="true"] .mark::after { opacity: 1; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.modal-foot .count { font-size: .95rem; color: var(--ink); }
.modal-foot .count b { font-weight: 600; }

/* Gallery */
.gallery { columns: 3; column-gap: 18px; margin-top: 36px; }
.gallery figure { margin: 0 0 18px; break-inside: avoid; }
.gallery .photo img { height: auto; }
.gallery figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* FAQ */
.faq { max-width: 760px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.25rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--ink); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin-top: 12px; max-width: 64ch; }

/* About */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.values div { border-top: 1px solid var(--gold); padding-top: 16px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.info dt { font-size: .85rem; color: var(--muted); margin-top: 22px; }
.info dd { margin: 4px 0 0; font-size: 1.05rem; }
.info a { text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .92rem; align-content: flex-start; }
footer nav a { text-decoration: none; color: var(--muted); }
footer nav a:hover { color: var(--ink); }
footer small, footer address { color: var(--muted); font-style: normal; font-size: .92rem; }
footer address { margin-top: 12px; line-height: 1.7; }

/* Motion: one moment on load (hero), one on scroll (blocks rise into view). Both are skipped
   under prefers-reduced-motion, and nothing is hidden if animations are unsupported. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes unveil { from { clip-path: inset(0 0 14% 0); opacity: 0; } }
  @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
  .hero h1, .hero .lead, .hero .row { animation: rise .8s var(--ease) both; }
  .hero .lead { animation-delay: .08s; }
  .hero .row { animation-delay: .16s; }
  .hero-photo { animation: unveil 1.1s var(--ease) .1s both; }
  dialog.quote[open] { animation: pop .3s var(--ease); }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}

@media (max-width: 960px) {
  .gallery { columns: 2; }
  .values { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .sm-only { display: inline; }
  .brand { font-size: 1.15rem; gap: 10px; }
  .brand img { height: 34px; }
  .top .wrap { height: 64px; }
  section { padding: 56px 0; }
  .nav { display: none; }
  .hero .wrap, .split, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { height: auto; aspect-ratio: 4 / 3; }
  .hero .row .btn { flex: 1 1 auto; }
  .form { grid-template-columns: 1fr; padding: 20px; }
  .gallery { columns: 1; }
  .mosaic { display: flex; flex-direction: column; height: auto; }
  .mosaic .photo { flex: none; aspect-ratio: 4 / 5; }
  .families { grid-template-columns: 1fr; }
  .family, .family + .family { padding: 20px 0; border-left: 0; }
  dialog.quote { width: 100%; height: 100%; max-height: none; max-width: none; border-radius: 0; margin: 0; }
  dialog.quote[open] { display: flex; flex-direction: column; }
  .modal-body { max-height: none; flex: 1; overflow: auto; }
  .picks { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pick { flex-direction: column; padding: 10px; }
  .pick .ph, .pick .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .pick .mark { position: absolute; top: 18px; right: 18px; margin: 0; }
  .modal-foot .btn { width: 100%; }
  .modal-foot .count { width: 100%; text-align: center; }
  .modal-foot { position: sticky; bottom: 0; }
}

/* App additions (not in the mockups): form errors and flash messages. */
:root { --danger: #9b2c1c; }
.field .error { font-size: .85rem; color: var(--danger); margin-top: 6px; font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.flash { margin: 20px 0 0; padding: 12px 16px; border-radius: var(--r-field); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.flash-error { border-color: var(--danger); color: var(--danger); }

/* Admin (not drawn in the mockups): same tokens, denser layout. */
.admin-login { min-height: 100vh; display: grid; place-content: center; gap: 28px; padding: 32px 16px; justify-items: center; }
.admin-login .form { width: min(440px, calc(100vw - 32px)); grid-template-columns: 1fr; }
.admin-login h1 { font-size: 1.8rem; }
.admin-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
.admin-nav a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--gold); }
main.admin { padding: 40px 0 80px; }
main.admin h1 { font-size: 2rem; margin-bottom: 20px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
main.admin .admin-bar h1 { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; min-height: 32px; }
.link-btn:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 2px; }
.link-btn.danger { color: var(--danger); }
.empty { padding: 32px; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .admin-top .wrap { height: auto; padding-block: 12px; flex-wrap: wrap; }
}

/* Public filters are links (they work without JavaScript); same look as the mockup buttons. */
.filters a { font-size: .88rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); transition: background-color .2s var(--ease); }
.filters a:hover { background: var(--band); }
.filters a[aria-current="page"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.empty-state { padding: 48px 0 8px; text-align: center; margin: 0 auto; }
.label-like { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field .check { display: flex; font-weight: 400; margin: 0; gap: 10px; align-items: center; min-height: 48px; font-size: .95rem; }
.field .check input { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; }
.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; }
.photo-field { border: 1px solid var(--line); border-radius: var(--r-field); padding: 16px; margin: 0; display: grid; gap: 14px; }
.photo-field legend { font-size: .88rem; font-weight: 600; padding: 0 6px; }
.current-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.current-photo img { width: 160px; height: auto; border-radius: var(--r-field); }
.field input[type="file"] { padding: 10px; }

/* Quote form: the picker needs JavaScript; without it the checkbox list shows instead. */
.js .no-js-only { display: none; }
html:not(.js) .js-only { display: none; }
.picker-fallback { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.pick[hidden] { display: none; }
.chip-x { border: 0; background: none; font: inherit; font-size: 1.1rem; line-height: 1; color: var(--muted); cursor: pointer; min-width: 28px; min-height: 28px; border-radius: 50%; }
.chip-x:hover { color: var(--ink); background: var(--band); }
.chip-x:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 1px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .flash { margin: 0; }
.tag-danger { color: var(--danger); border-color: var(--danger); }
.requests { display: grid; gap: 12px; }
.request { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 16px 20px; }
.request summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
.request summary:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 4px; }
.request-meta { color: var(--muted); font-size: .9rem; }
.request-meta .tag { margin: 0 0 0 8px; }
.request-detail { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0 0; }
.request-detail dt { color: var(--muted); font-size: .9rem; }
.request-detail dd { margin: 0; }
.request-detail ul { margin: 0; padding-left: 18px; }
.pre { white-space: pre-wrap; }
@media (max-width: 760px) { .request-detail { grid-template-columns: 1fr; } .request-detail dd { margin-bottom: 8px; } }
/* Home teaser shows one to three gallery photos. */
.mosaic-1 { grid-template-columns: 1fr; }
.mosaic-3 { grid-template-columns: 5fr 4fr 4fr; }
.admin-photos { display: grid; gap: 12px; margin-top: 28px; }
.admin-photo { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 14px; }
.admin-photo img { width: 120px; height: auto; border-radius: 10px; }
.admin-photo form.inline { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) {
  .admin-photo, .admin-photo form.inline { grid-template-columns: 1fr; }
}
