:root {
  color-scheme: dark;
  --ink: #100e0b;
  --ink-2: #171410;
  --ink-3: #1f1b15;
  --paper: #f4ecdd;
  --paper-dim: #cfc4ab;
  --paper-faint: #a89a7d;
  --gold: #c9a24d;
  --gold-bright: #e3c26e;
  --gold-deep: #8f6f27;
  --line: rgba(201, 162, 77, 0.28);
  --line-soft: rgba(244, 236, 221, 0.12);
  --field: #0c0a08;
  --error: #e89a8a;
  --radius: 4px;
  --inset: clamp(1.25rem, 3vw, 2.25rem);
  --contact-gap: clamp(2rem, 6vw, 4.5rem);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--ink); }
a { color: var(--gold-bright); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.brandmark {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--paper); text-decoration: none;
}
.brandmark .seal {
  flex: none; width: 3.35rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 0.42rem 0.52rem;
  font-family: var(--serif); font-weight: 700; color: var(--gold-bright); line-height: 1;
}
.brandmark .seal .seal-row { display: flex; justify-content: space-between; }
.brandmark .seal .seal-letters { font-size: 1.02rem; }
.brandmark .seal .seal-numeral {
  font-size: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.3rem;
}
.soon-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.42rem 0.9rem;
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.portrait-frame { position: relative; max-width: 400px; margin: 0 auto; }
.portrait-frame::before {
  content: ""; position: absolute; inset: 0;
  transform: translate(14px, 14px);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
}
.portrait-frame img {
  position: relative; display: block; width: 100%; height: auto;
  border-radius: var(--radius);
  filter: saturate(0.96);
}
.portrait-caption {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper-faint);
}
.portrait-caption strong { color: var(--paper-dim); font-weight: 600; }

.hero-copy { text-align: center; }

.hero-copy .kicker {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold-bright); margin: 0 0 1.1rem;
}
h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.9rem, 6.5vw, 4.6rem);
  line-height: 1.02; letter-spacing: 0.005em;
  margin: 0 0 0.6rem;
}
h1 .iii { color: var(--gold-bright); }
.hero-title {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--paper-dim); margin: 0 0 1.8rem;
}
.hero-quote {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.22;
  margin: 0 auto 1.6rem;
  padding-left: 0;
  border-left: none;
}
.hero-quote .q-line { display: block; }
.hero-lede { color: var(--paper-dim); max-width: 34rem; margin: 0 auto 0.9rem; }
.hero-lede strong { color: var(--paper); font-weight: 600; }
.hero-close {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.3rem; color: var(--paper-dim);
  margin: 0 auto 2rem;
}

.contact-row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; cursor: pointer;
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--gold);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-solid { background: var(--gold); color: var(--ink); }
.btn-solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-solid:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-solid:disabled:hover { background: var(--gold); border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--gold-bright); }
.btn-ghost:hover { background: rgba(201, 162, 77, 0.12); }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- services ---------- */
.services {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 3.8rem) 0;
}
.section-head { max-width: 44rem; margin: 0 auto 2.2rem; text-align: center; }
.section-head .line-2 { display: block; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; margin: 0 0 0.7rem;
}
.section-head p { color: var(--paper-dim); margin: 0; }
.service-list { list-style: none; margin: 0 var(--inset); padding: 0; border-top: 1px solid var(--line-soft); }
.service-list li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1rem; align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.service-num {
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--gold);
}
.service-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.15; margin: 0;
}
.service-desc { color: var(--paper-dim); margin: 0; }

/* ---------- contact ---------- */
.contact {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--contact-gap);
  align-items: start;
}
/* The left column reads as everything left of the form card: the grid
   gap and the form's left inset sit inside that visual column, so the
   info block's box extends across both. Its content then centers over
   the column the eye sees — from the section's left edge to the form
   card — instead of over the narrower grid track alone. */
.contact-info { margin-right: calc(-1 * (var(--contact-gap) + var(--inset))); }
.contact-info h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; margin: 0 0 0.8rem;
  text-align: center; text-wrap: balance;
}
.contact-info > p { color: var(--paper-dim); margin: 0 auto 1.8rem; max-width: 26rem; text-align: center; }
.info-lines { list-style: none; margin: 0 var(--inset); padding: 0; }
.info-lines li { padding: 0.9rem 0; border-top: 1px solid var(--line-soft); }
.info-lines li:last-child { border-bottom: 1px solid var(--line-soft); }
.info-label {
  display: block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 0.2rem;
}
.info-value { font-size: 1.12rem; font-weight: 600; color: var(--paper); text-decoration: none; }
a.info-value:hover { color: var(--gold-bright); }

form { background: var(--ink-3); border: 1px solid var(--line-soft); border-radius: 6px; padding: clamp(1.4rem, 3vw, 2rem); margin-left: var(--inset); margin-right: var(--inset); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field label .opt { color: var(--paper-faint); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--paper);
  background: var(--field);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}
.field input::placeholder, .field textarea::placeholder { color: #6f6450; }
.field textarea { resize: vertical; min-height: 6.5rem; }
.field .err { display: none; color: var(--error); font-size: 0.88rem; margin-top: 0.3rem; }
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.field.invalid .err { display: block; }
.agree { display: flex; gap: 0.65rem; align-items: flex-start; margin: 1.2rem 0 1.4rem; }
.agree input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; flex: none; accent-color: var(--gold); }
.agree label { font-size: 0.92rem; color: var(--paper-dim); }
.agree .err { display: none; color: var(--error); font-size: 0.88rem; margin-top: 0.3rem; }
.agree.invalid .err { display: block; }
.thanks {
  display: none;
  border: 1px solid var(--gold); border-radius: 6px;
  background: rgba(201, 162, 77, 0.08);
  padding: clamp(1.4rem, 3vw, 2rem);
  margin-left: var(--inset); margin-right: var(--inset);
}
.thanks.show { display: block; }
.thanks h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; margin: 0 0 0.5rem; }
.thanks p { color: var(--paper-dim); margin: 0; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-soft); padding: 1.8rem 0 2.4rem; }
.footer-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; align-items: baseline; justify-content: space-between;
  font-size: 0.9rem; color: var(--paper-faint);
}
.footer-row .fname { font-family: var(--serif); font-size: 1.05rem; color: var(--paper-dim); }
.footer-legal { text-align: center; margin-top: 1.1rem; font-size: 0.85rem; color: var(--paper-faint); }
.footer-legal a { color: var(--paper-dim); text-decoration: none; }
.footer-legal a:hover { color: var(--gold-bright); text-decoration: underline; }

/* ---------- entrance motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s ease both; }
.rise-1 { animation-delay: 0.08s; }
.rise-2 { animation-delay: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .portrait-frame { max-width: 300px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { margin-right: 0; }
  .service-list li { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .service-desc { grid-column: 2; }
}
@media (max-width: 430px) {
  .topbar { flex-wrap: wrap; }
  .btn { width: 100%; justify-content: center; }
}

/* ---------- production additions (not in concept) ---------- */
/* was the inline style attribute on the concept's send button */
#send-btn { width: 100%; justify-content: center; }
/* anti-spam honeypot: off-screen, never visible or focusable */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* send-failure state: same panel treatment as the concept's thank-you */
.send-failed { display: none; }
.send-failed.show { display: block; }
.send-failed .retry { margin-top: 0.75rem; }
/* panel headings balance their line breaks */
.thanks h3 { text-wrap: balance; }
/* thank-you panel: every line centered; heading set as two lines */
#thanks { text-align: center; }
#thanks h3 .line { display: block; }
#thanks .thanks-now { margin-top: 0.9rem; }
/* note under Send, shown only while Send is disabled */
.send-hint { margin: 0.6rem 0 0; font-size: 0.88rem; color: var(--paper-faint); text-align: center; }
.send-hint[hidden] { display: none; }
#thanks h3 { line-height: 1.25; }
#thanks p { text-wrap: balance; }
.contact-note {
  grid-column: 1 / -1;
  margin: 0 var(--inset);
  font-size: 0.9rem; color: var(--paper-faint);
  text-align: center; text-wrap: balance;
}

.info-value .nw {
  white-space: nowrap;
}

/* ---------- corrective round (META directive 2026-10-24) ---------- */
/* services lists: one line with slashes where it fits, else a centered stack without slashes */
.kicker.svc-line { container-type: inline-size; white-space: nowrap; }
@container (max-width: 27.75rem) {
  .kicker .svc { display: block; white-space: normal; }
  .kicker .sep { display: none; }
}
/* no intro line is ever left holding a single word, whatever the font */
.section-head p, .section-head .l1 { text-wrap: balance; }
/* contact: parallel headings over both columns */
.contact-form-col h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1;
  text-align: center; text-wrap: balance;
}
.contact-info h2, .contact-form-col h2 { margin: 0 0 1.6rem; }
/* phone: fixed +1 prefix inside the field */
.phone-input { position: relative; --cc-w: 1.6em; --cc-gap: 0.3em; }
/* fixed-width +1 box (fits the widest fallback face); the number starts after it plus a fixed gap */
#f-phone-cc { display: inline-block; width: var(--cc-w); text-align: right; white-space: nowrap; }
.phone-prefix {
  position: absolute; top: 0; bottom: 0; left: 0.85rem;
  display: flex; align-items: center; gap: 0.4rem;
  pointer-events: none; color: var(--paper); font-weight: 600;
}
.phone-prefix .flag { display: block; width: 1.3rem; height: auto; border-radius: 1px; }
.field .phone-input input { padding-left: calc(0.85rem + 1.3rem + 0.4rem + var(--cc-w) + var(--cc-gap)); }
@media (max-width: 860px) {
  .topbar { flex-direction: column; justify-content: center; gap: 0.75rem; }
  .section-head .l1 { display: block; }
  .footer-row { flex-direction: column; align-items: stretch; gap: 0.5rem; text-align: center; }
  .footer-row .fname-name, .footer-row .svc-line { display: block; }
  .footer-row .fname-dash { display: none; }
  .footer-row .svc-line { container-type: inline-size; white-space: nowrap; }
}
@container (max-width: 19.875rem) {
  .footer-row .svc { display: block; white-space: normal; }
  .footer-row .sep { display: none; }
}

/* ---------- final round: OR divider (design source tools/divider-sample-v2.html) ---------- */
.or-divider { display: flex; align-items: center; width: 72%; margin: 0 auto; }
.or-divider .seg { display: block; flex: 1; }
.or-divider .seg-h { height: 3px; }
.or-divider .seg-v { display: none; }
.or-divider .or {
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1;
  letter-spacing: 0.35em; padding: 0 0.95rem 0 1.3rem; color: var(--gold-bright);
}
@media (min-width: 861px) {
  /* a zero-width middle track between two half gaps: both columns keep their exact positions */
  .contact-grid { grid-template-columns: minmax(0, 5fr) 0 minmax(0, 6fr); column-gap: calc(var(--contact-gap) / 2); }
  .or-divider { flex-direction: column; width: auto; margin: 0; justify-self: center; align-self: center; height: 76%; }
  .or-divider .seg-h { display: none; }
  .or-divider .seg-v { display: block; width: 3px; }
  .or-divider .or { padding: 0.9rem 0 0.9rem 0.35em; }
  .contact-info { margin-right: 0; }
}

/* placeholders shown in full: app.js sets --ph-size only where a placeholder would not fit */
.field input::placeholder { font-size: var(--ph-size, 1em); }

/* ---------- Footer & Column v1.0 (desktop only, above 860px) ---------- */
@media (min-width: 861px) {
  /* footer (v1.1): row 1 name-and-services centered; one line's space; row 2 © left / CA LIC center / rights right */
  .footer-row { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 2rem; row-gap: 1.6em; row-gap: 1lh; align-items: baseline; }
  .footer-row > *, .footer-row .copy > * { white-space: nowrap; }
  .footer-row .fname { grid-column: 1 / -1; justify-self: center; }
  .footer-row .copy { display: contents; }
  .footer-row .copy-dot { display: none; }
  .footer-row .copy-a { grid-row: 2; grid-column: 1; justify-self: start; }
  .footer-row > .lic { grid-row: 2; grid-column: 2; }
  .footer-row .copy-b { grid-row: 2; grid-column: 3; justify-self: end; }
  /* Contact James column: centered text; equal gaps sized by app.js (licence center level with Send) */
  .contact-info h2 { margin-bottom: var(--info-gap, 1.6rem); }
  .contact-info .info-lines { display: flex; flex-direction: column; gap: var(--info-gap, 0px); text-align: center; }
}

/* ---------- Final Refinements v1.0: mobile footer divider (<=860px only) ---------- */
.footer-row .ft-rule { display: none; }
@media (max-width: 860px) {
  /* block flow: the flex column over-measured the services line (stacked at min-content), adding ~2 blank lines */
  .footer-row { display: block; }
  .footer-row .fname, .footer-row .lic, .footer-row .copy { display: block; }
  .footer-row .copy { margin-top: 0.5rem; }
  .footer-row .ft-rule { display: block; width: 40%; height: 2px; margin: 1.6em auto; margin: 1lh auto; }
  .footer-row .ft-rule svg { display: block; width: 100%; height: 100%; }
}

/* ---------- pause-motion control (estate reference: Meet with DA) ---------- */
#motion-toggle {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: calc(0.75rem + env(safe-area-inset-right, 0px));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 .75rem;
  background: transparent;
  border: none;
  border-radius: 2px;
  font-family: inherit;
  font-style: italic;
  font-size: .75rem;
  letter-spacing: .04em;
  color: #b9c0cd;
  cursor: pointer;
  transition: color .18s ease;
}
#motion-toggle:hover, #motion-toggle:focus-visible { color: #e8eefc; }
#motion-toggle:focus-visible { outline: 2px solid #e8eefc; outline-offset: 3px; }
#motion-toggle::before { content: ""; width: 9px; height: 9px; border: 1px solid currentColor; border-radius: 50%; flex: none; }
html.motion-paused #motion-toggle::before { background: currentColor; }
html.motion-paused { scroll-behavior: auto !important; }
html.motion-paused *, html.motion-paused *::before, html.motion-paused *::after {
  animation: none !important;
  transition: none !important;
}
