/* Vanguard Epoxy Systems. Quiet-luxury pass (v2).
   Mobile first: designed at 375px, enhanced with min-width queries.
   Two themes from one markup: dark (default) and light ("Newport"), switched by html[data-theme]. */

:root {
  /* DARK (default) */
  --bg: #0a0a0d;
  --bg-soft: #111115;
  --text: #ece8df;
  --muted: #a9a499;
  --gold: #c9a45c;           /* hairlines, small labels, primary button fill */
  --gold-text: #d3b270;      /* gold used as text */
  --hair: rgba(201,164,92,.42);
  --hair-soft: rgba(201,164,92,.2);
  --field: rgba(236,232,223,.38);
  --btn-bg: #c9a45c;
  --btn-ink: #14110a;
  --btn-bg-hover: #d9b873;
  --focus: #8cb8ff;
  --danger: #ff9b9b;
  --ok: #8fd9ae;
  --veil: rgba(10,10,13,.92);
  --glow: radial-gradient(60% 40% at 50% 0%, rgba(124,58,237,.10), transparent 70%);

  --tap: 48px;
  --dock-h: 56px;
  --gutter: 28px;
  --section: 112px;          /* vertical rhythm between ideas, mobile */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --bg: #faf7f0;
  --bg-soft: #f2eee4;
  --text: #1b1914;
  --muted: #5d584d;
  --gold: #a7843c;
  --gold-text: #7f6220;      /* contrast-safe on ivory */
  --hair: rgba(167,132,60,.55);
  --hair-soft: rgba(167,132,60,.28);
  --field: rgba(27,25,20,.42);
  --btn-bg: #8c6c25;
  --btn-ink: #fffdf7;
  --btn-bg-hover: #7a5d1d;
  --focus: #1d4ed8;
  --danger: #a32121;
  --ok: #1d6b43;
  --veil: rgba(250,247,240,.94);
  --glow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 1.0625rem/1.85 var(--sans);
  letter-spacing: .01em;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  min-width: 320px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-color: var(--hair); text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.12; margin: 0 0 .6em; letter-spacing: .005em; }
h1 { font-size: clamp(2.35rem, 10vw, 3.4rem); }
h2 { font-size: clamp(1.9rem, 7.6vw, 2.6rem); }
h3 { font-size: 1.5rem; font-weight: 400; }
p { margin: 0 0 1.4em; max-width: 34ch; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
/* small tracked label */
.label, .legend, .nav a, .btn, .dock a, .chat-btn, .foot h2, .more, .chip {
  font-family: var(--sans);
}
.label { display: block; font-size: .72rem; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 20px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.skip { position: absolute; left: 8px; top: -80px; background: var(--btn-bg); color: var(--btn-ink); padding: 12px 16px; z-index: 100; }
.skip:focus { top: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), 66rem); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 34rem); margin-inline: auto; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.section { padding: var(--section) 0; }
.hair { display: block; width: 40px; height: 1px; background: var(--gold); border: 0; margin: 0 auto 36px; opacity: .8; }
.hair.left { margin-left: 0; }

/* ---------- Header ---------- */
.top { padding: 22px 0 0; text-align: center; position: relative; z-index: 5; }
.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; min-height: var(--tap); justify-content: center; gap: 6px; }
.brand-name { font: 400 1.35rem/1 var(--serif); letter-spacing: .5em; padding-left: .5em; color: var(--text); }
.brand-sub { font: 400 .62rem/1 var(--sans); letter-spacing: .38em; padding-left: .38em; text-transform: uppercase; color: var(--gold-text); }
.nav { display: grid; grid-template-columns: repeat(5, 1fr); margin: 10px 0 0; }
.nav a { display: flex; align-items: center; justify-content: center; min-height: var(--tap); font-size: .72rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 18px; margin-left: -9px; height: 1px; background: var(--gold); }
.top-phone { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 34px; border: 1px solid transparent; border-radius: 0;
  font-size: .78rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .5s ease, border-color .5s ease, color .5s ease;
}
.btn-gold { background: var(--btn-bg); color: var(--btn-ink); }
.btn-gold:hover { background: var(--btn-bg-hover); color: var(--btn-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--hair); }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }
.btn-violet { background: transparent; color: var(--text); border-color: var(--hair); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-row { display: grid; gap: 14px; justify-items: center; }
.btn svg { width: 16px; height: 16px; flex: none; }
.more { display: inline-flex; align-items: center; min-height: var(--tap); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); text-decoration: none; border-bottom: 1px solid var(--hair-soft); }
.more:hover { border-bottom-color: var(--gold); color: var(--gold-text); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; margin-top: 14px; }
.hero-img { position: relative; height: 54svh; min-height: 380px; max-height: 640px; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to bottom, transparent, var(--bg)); }
.hero-body { text-align: center; padding: 0 0 var(--section); margin-top: -64px; position: relative; z-index: 2; }
.hero-body h1 { margin-bottom: .5em; }
.hero-body p { margin-inline: auto; color: var(--muted); }

/* ---------- Works / figures ---------- */
.work { margin: 0 0 var(--section); }
.work:last-child { margin-bottom: 0; }
.work img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.work figcaption, .shot figcaption { margin-top: 22px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); line-height: 1.7; }
.work figcaption::before, .shot figcaption::before { content: ""; display: block; width: 28px; height: 1px; background: var(--gold); margin-bottom: 16px; opacity: .8; }

/* ---------- Page heads ---------- */
.page-head { padding: 88px 0 0; text-align: center; }
.page-head p { margin-inline: auto; color: var(--muted); font-size: 1.08rem; }
.page-head + .section, .page-head + .wrap, .page-head + section { padding-top: 80px; }

/* ---------- Lists (services, FAQ, finishes) ---------- */
.rows { margin: 0; padding: 0; list-style: none; }
.row { padding: 40px 0; border-top: 1px solid var(--hair-soft); }
.row:last-child { border-bottom: 1px solid var(--hair-soft); }
.row h3 { margin-bottom: .35em; }
.row p { margin: 0; color: var(--muted); }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 6px 0; text-decoration: none; border-top: 1px solid var(--hair-soft); font-family: var(--serif); font-size: 1.4rem; font-weight: 300; }
.row-link:last-child { border-bottom: 1px solid var(--hair-soft); }
.row-link span { font: 400 .68rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); }
.row-link:hover span { color: var(--text); }
details.faq { border-top: 1px solid var(--hair-soft); }
details.faq:last-of-type { border-bottom: 1px solid var(--hair-soft); }
details.faq summary { min-height: 64px; display: flex; align-items: center; cursor: pointer; font-family: var(--serif); font-size: 1.3rem; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq p { margin: 0 0 28px; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: var(--section); }
.shot { margin: 0; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
dialog.lightbox { border: 0; background: var(--bg); color: var(--text); padding: 20px; width: min(96vw, 60rem); max-height: 94vh; overflow: auto; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.88); }
dialog.lightbox img { width: 100%; max-height: 68vh; object-fit: contain; }
dialog.lightbox p { margin: 14px 0 18px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); max-width: none; }

/* ---------- Notices ---------- */
.banner { margin: 0 0 56px; padding: 0; border: 0; background: none; text-align: center; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); max-width: none; line-height: 1.7; }
.banner::before { content: ""; display: block; width: 28px; height: 1px; background: var(--gold); margin: 0 auto 14px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 40px; }
.field { display: grid; gap: 6px; }
.field > label, .legend { font-size: .72rem; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.opt { text-transform: none; letter-spacing: .04em; opacity: .85; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; max-width: 36ch; line-height: 1.6; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 0; font: 300 1.125rem/1.4 var(--sans); /* 18px: no iOS zoom */
  color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--field); border-radius: 0; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23a9a499' stroke-width='1.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; padding-right: 30px; }
select option { background: var(--bg); color: var(--text); }
textarea { min-height: 112px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-bottom-color: var(--gold); box-shadow: 0 1px 0 0 var(--gold); }
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea { border-bottom-color: var(--danger); }
.err { color: var(--danger); font-size: .92rem; margin: 0; display: none; }
.field[data-invalid="true"] .err { display: block; }
.two { display: grid; gap: 40px; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 16px; align-items: start; cursor: pointer; padding: 6px 0; }
.check input { width: 24px; height: 24px; margin: 8px 0 0; accent-color: var(--gold); }
.check .hint { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 24px 0 0; border-top: 1px solid var(--hair-soft); margin-top: 36px; }
.status[hidden] { display: none; }
.status.ok { border-top-color: var(--ok); }
.status.bad { border-top-color: var(--danger); }
.status h3 { margin-bottom: .3em; }
.status p:last-child { margin-bottom: 0; }
.panel { background: none; border: 0; padding: 0; }
.panel h2 { font-size: 1.9rem; }
.est-summary { text-align: center; padding: 0 0 48px; margin-bottom: 56px; border-bottom: 1px solid var(--hair-soft); }
.est-summary .muted { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); }
.est-summary strong { font: 300 2.6rem/1.1 var(--serif); color: var(--text); display: block; margin: 12px 0; }
.est-summary p { margin: 0 auto .6em; color: var(--muted); font-size: .98rem; }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 64px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.legend { padding: 0; margin-bottom: 18px; display: block; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 14px; }
.chip { min-height: var(--tap); border: 0; border-bottom: 1px solid var(--hair-soft); background: transparent; color: var(--muted); font: 400 1rem/1 var(--sans); letter-spacing: .06em; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--gold); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.tiles.one { grid-template-columns: 1fr; }
.tile { position: relative; display: block; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile span { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--hair-soft); font-size: 1.02rem; line-height: 1.3; color: var(--muted); transition: color .4s ease, border-color .4s ease; }
.tile small { font-size: .84rem; opacity: .85; }
.tile input:checked + span { color: var(--text); border-bottom-color: var(--gold); }
.tile input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.result { padding: 56px 0 0; text-align: center; border-top: 1px solid var(--hair); margin-top: 24px; }
.result .range { font: 300 clamp(2.5rem, 12vw, 3.6rem)/1.1 var(--serif); color: var(--text); margin: 10px auto 14px; max-width: none; }
.result .sum { color: var(--muted); margin: 0 auto 10px; font-size: .98rem; }
.result .fine { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin: 22px auto 36px; max-width: 30ch; line-height: 1.8; }
.result .empty { color: var(--muted); margin: 0 auto 28px; }
.result .btn { width: 100%; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--hair-soft); margin-top: var(--section); padding: 72px 0 56px; text-align: center; color: var(--muted); font-size: .96rem; }
.foot .brand { margin-bottom: 26px; }
.foot p { margin: 0 auto .5em; }
.foot a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; }
.foot small { display: block; margin: 28px auto 0; max-width: 34ch; font-size: .82rem; line-height: 1.7; }
.foot-links { display: flex; justify-content: center; gap: 28px; margin-top: 12px; }
.foot-links a { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- Dock (slim thumb bar) + chat ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--veil); border-top: 1px solid var(--hair-soft); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.dock a { min-height: var(--dock-h); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; }
.dock .btn { min-height: var(--dock-h); padding: 0; border-radius: 0; }
.dock .btn-ghost { border: 0; color: var(--text); }
.dock svg { width: 15px; height: 15px; }

.chat-btn { position: fixed; right: 14px; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px) + 14px); z-index: 60; min-height: var(--tap); padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--hair); background: var(--veil); color: var(--text); font: 400 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chat-btn svg { width: 17px; height: 17px; }
.chat-btn[aria-busy="true"] { opacity: .6; }
#vx-chat .vx-fallback { position: fixed; right: 14px; left: 14px; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px) + 74px); z-index: 70; background: var(--bg); border: 1px solid var(--hair); padding: 28px 24px; }
#vx-chat .vx-fallback h2 { font-size: 1.5rem; }
#vx-chat .vx-fallback .btn-row { margin-top: 12px; }

/* ---------- Fade-ins (slow, opacity only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transition: opacity 1.6s cubic-bezier(.2,.6,.2,1); }
  .js .reveal.in { opacity: 1; }
  .hero-img img { animation: soft-in 2.2s ease both; }
  @keyframes soft-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 40px; --section: 144px; }
  .two { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles.four { grid-template-columns: repeat(4, 1fr); }
  .tiles.one { grid-template-columns: 1fr; }
  .presets { grid-template-columns: repeat(6, 1fr); }
  .nav a { font-size: .76rem; }
  #vx-chat .vx-fallback { left: auto; width: 24rem; }
  .btn-row { grid-auto-flow: column; justify-content: center; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --section: 176px; --gutter: 48px; }
  body { padding-bottom: 0; font-size: 1.125rem; }
  .dock { display: none; }
  .top { padding-top: 36px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(100% - 96px, 76rem); margin-inline: auto; text-align: left; }
  .top .brand { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1; grid-row: 1; margin: 0; display: flex; justify-content: flex-start; gap: 8px; }
  .nav a { padding: 0 16px 0 0; font-size: .74rem; }
  .nav a[aria-current="page"]::after { left: 0; margin-left: 0; bottom: 8px; width: 18px; }
  .top-phone { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; min-height: var(--tap); font-size: .8rem; letter-spacing: .2em; color: var(--muted); text-decoration: none; gap: 10px; }
  .top-phone svg { width: 15px; height: 15px; }
  .top.wrap { width: min(100% - 96px, 76rem); }
  h1 { font-size: clamp(3rem, 4.6vw, 4.2rem); }
  h2 { font-size: 3rem; }
  p { max-width: 38ch; }
  .chat-btn { bottom: 28px; right: 28px; }
  #vx-chat .vx-fallback { right: 28px; bottom: 92px; }
  .hero { margin-top: 28px; }
  .hero-img { height: 78vh; min-height: 560px; max-height: 760px; }
  .hero-body { margin-top: -96px; }
  .hero-body h1 { margin-bottom: .6em; }
  .page-head { padding-top: 128px; }
  /* editorial works: staggered, never a grid */
  .works { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: start; }
  .works .work:nth-child(1) { grid-column: 2 / 7; margin-bottom: 0; }
  .works .work:nth-child(2) { grid-column: 8 / 12; margin-top: 168px; margin-bottom: 0; }
  .gallery { gap: 176px; }
  .shot { width: 62%; }
  .shot:nth-child(even) { margin-left: auto; }
  .shot:nth-child(3n) { width: 48%; margin-left: 12%; }
  .calc-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 120px; align-items: start; }
  .calc-layout .result-col { position: sticky; top: 40px; }
  .result { margin-top: 0; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 120px; align-items: start; }
  .row { padding: 48px 0; }
}

/* tap-size safety for inline contact links */
main p > a:not(.btn):not(.more) { display: inline-flex; align-items: center; min-height: var(--tap); }
.foot a { min-height: var(--tap); }
