/* ============================================================
   CURCUMELLI ANTIQUES — base.css (scaffold, frozen)
   Tokens, reset, typography, buttons, grid, section heads, forms, modal, a11y.
   Brand palette (Brand Guidelines 2026): primary #951b20, secondary #faae40, detail #f6921e, black.
   ============================================================ */

:root {
  --ivory: #f7f5f0;
  --paper: #fffdf9;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-mute: #6f685f;      /* small print: 5.0:1 on ivory, 5.4:1 on paper (WCAG AA) */
  --line: #e3ded4;
  --bronze: #951b20;        /* brand red: accent on light surfaces */
  --bronze-dark: #6e1317;
  --gold: #faae40;          /* brand gold: accent on dark surfaces */
  --gold-deep: #f6921e;
  --footer: #121010;
  --footer-ink: #cfc8ba;
  --dark-soft: #a9a291;
  --dark-line: #2a2619;
  --tile: #ece7dc;
  --ok: #4a5240;
  --error: #9b1c1c;
  --serif: "GFS Didot", "Cormorant Garamond", Georgia, serif;
  --sans: "Commissioner", "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --maxw: 1280px;
  --gutter: 28px;
  --header-h: 86px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul[class], ol[class] { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; text-wrap: balance; }
.icon { width: 19px; height: 19px; flex: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- accessibility ---------- */
.screen-reader-text, .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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: var(--ivory); padding: 10px 18px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.on-dark :focus-visible, .dark :focus-visible { outline-color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- typography helpers ---------- */
.display { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: .01em; }
.eyebrow {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .32em;
  text-transform: uppercase; color: var(--bronze);
}
.on-dark .eyebrow { color: var(--gold); }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; text-transform: none; }
.section-title { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); font-weight: 400; letter-spacing: .04em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-head .more {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 4px; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.section-head .more:hover { color: var(--bronze); border-color: var(--bronze); }
.section-head.center { justify-content: center; text-align: center; }

/* ---------- buttons ---------- */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 34px; min-height: 48px;
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  border: 1px solid var(--ink); background: var(--ink); color: var(--ivory);
  transition: background .25s, color .25s, border-color .25s; cursor: pointer; text-align: center;
}
.btn:hover, .button:hover { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn.light { background: transparent; border-color: #8f886f; color: #f4efe4; }
.btn.light:hover { background: #f4efe4; border-color: #f4efe4; color: var(--ink); }
.btn.gold, .btn.primary { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.btn.gold:hover, .btn.primary:hover { background: var(--bronze-dark); border-color: var(--bronze-dark); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--bronze); color: var(--bronze); padding-bottom: 5px;
}
.link-arrow:hover { color: var(--bronze-dark); border-color: var(--bronze-dark); }
.link-arrow .icon { width: 14px; height: 14px; }

/* ---------- sections & grid ---------- */
section.block { padding: 88px 0; }
section.block.tint { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 34px 26px; }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 58px 0; text-align: center; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 400; letter-spacing: .06em; }
.page-hero .crumb { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.page-hero .crumb a:hover { color: var(--bronze); }
.page-hero .crumb .sep { margin: 0 6px; color: var(--ink-mute); }
.page-hero .lead { max-width: 60ch; margin: 16px auto 0; color: var(--ink-soft); }
.page-hero .lead p + p { margin-top: 12px; }
.page-hero .lead a { color: var(--bronze); text-decoration: underline; }

/* ---------- forms ---------- */
.cform label, .field-label {
  display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase;
  margin: 22px 0 8px; color: var(--ink-soft);
}
.cform input[type="text"], .cform input[type="email"], .cform input[type="tel"], .cform input[type="search"],
.cform textarea, .cform select, .input {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); background: var(--paper);
  font-family: var(--sans); font-size: 14px; color: var(--ink); outline: none; border-radius: 0;
}
.cform input:focus, .cform textarea:focus, .cform select:focus, .input:focus { border-color: var(--bronze); }
.cform .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 12.5px; color: var(--ink-soft); text-transform: none; letter-spacing: 0; }
.cform .consent input { margin-top: 3px; accent-color: var(--bronze); width: 16px; height: 16px; flex: none; }
.cform .consent a { text-decoration: underline; }
.cform .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform .field-error { color: var(--error); font-size: 12px; margin-top: 6px; }
.cform .form-message { margin-top: 18px; font-size: 14px; }
.cform .form-message.is-error { color: var(--error); }
.cform .form-message.is-success { color: var(--ok); }
.cform [aria-invalid="true"],
.cform input[aria-invalid="true"], .cform select[aria-invalid="true"], .cform textarea[aria-invalid="true"] { border-color: var(--error); }
.cform .form-actions { margin-top: 26px; }
.form-success { padding: 26px 0; font-family: var(--serif); font-size: 20px; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(18, 16, 16, .62); z-index: 900;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-back.open { display: flex; }
.modal {
  position: relative; background: var(--paper); max-width: 520px; width: 100%;
  max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 44px 40px; border-top: 3px solid var(--bronze);
}
.modal h2, .modal h3, .modal h4 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin-bottom: 10px; }
.modal .modal-close { position: absolute; top: 14px; right: 14px; padding: 8px; color: var(--ink-soft); }
.modal .modal-close:hover { color: var(--bronze); }
body.modal-open { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid.c4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid.c4, .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c2 { grid-template-columns: 1fr; }
  /* no iOS focus zoom: same selectors (and specificity) as the 14px base rule above */
  .cform input[type="text"], .cform input[type="email"], .cform input[type="tel"], .cform input[type="search"],
  .cform input[type="password"], .cform input[type="number"], .cform textarea, .cform select, .input { font-size: 16px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .grid.c4, .grid.c3 { gap: 22px 14px; }
  section.block { padding: 60px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .modal { padding: 36px 22px; }
}
