/* Excede Finishing: shared styles (tokens, type, grid, header, footer, buttons, forms) */

:root {
  --plaster: #f3eee6;
  --linen: #e9e1d4;
  --paper: #faf7f2;
  --ink: #1f1813;
  --ink-2: #463a31;
  --muted: #776a5e;
  --line: rgba(31, 24, 19, 0.12);
  --line-2: rgba(31, 24, 19, 0.24);
  --oxblood: #7b1a18;
  --oxblood-2: #5f1210;
  --brass: #a8834a;
  --walnut: #1f1712;
  --walnut-2: #2e231c;
  --on-dark: #f3ece1;
  --on-dark-2: rgba(243, 236, 225, 0.68);
  --line-dark: rgba(243, 236, 225, 0.16);

  --f-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* kept for older rules; labels now use the body face */
  --f-mono: var(--f-body);

  /* One grid for every page: 12 columns inside a centred container */
  --margin: clamp(20px, 4.4vw, 72px);
  --gap: clamp(12px, 1.5vw, 24px);
  --max: 1600px;
  --edge: max(var(--margin), calc((100vw - var(--max)) / 2));
  --gutter: var(--margin);
  --head-h: 76px;
  --ease: cubic-bezier(0.22, 0.8, 0.22, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink-2);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
::selection { background: #e8cfc4; color: var(--ink); }
.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; }

/* ---------- Grid ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- Type ---------- */
.display, h1, h2 {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 0.98;
}
h1 { font-size: clamp(3.1rem, 7.6vw, 8.6rem); }
h2 { font-size: clamp(2.3rem, 4.5vw, 4.6rem); line-height: 1.01; letter-spacing: -0.024em; }
h1 em, h2 em { font-style: italic; }
h3 { font-family: var(--f-display); font-weight: 350; font-size: clamp(1.45rem, 1.9vw, 1.95rem); line-height: 1.14; letter-spacing: -0.012em; }
.lede { font-size: clamp(1.04rem, 1.25vw, 1.18rem); line-height: 1.6; color: var(--ink-2); max-width: 34em; }
.small { font-size: 14px; line-height: 1.5; }
/* Quiet label: small, sentence case, no tracking. Used for captions and form context, never above headlines. */
.mono, .label-sm { font-family: var(--f-body); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.eyebrow { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---------- Links and buttons ---------- */
.link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15.5px; color: var(--ink); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.5s var(--ease);
}
.link:hover { animation: underline 0.7s var(--ease); }
@keyframes underline { 0% { background-size: 100% 1px; background-position: 100% 100%; } 45% { background-size: 0 1px; background-position: 100% 100%; } 46% { background-position: 0 100%; } 100% { background-size: 100% 1px; background-position: 0 100%; } }
.link svg { width: 14px; height: 14px; transition: transform 0.35s var(--ease); }
.link:hover svg { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--ink); }
.link-arrow svg { width: 14px; height: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  min-height: 54px; padding: 0 28px;
  border: 0; border-radius: 2px;
  background: var(--oxblood); color: #fbf4ec;
  font: 600 15px/1 var(--f-body); letter-spacing: 0.005em; text-decoration: none;
  cursor: pointer; transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--oxblood-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: rgba(31, 24, 19, 0.05); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--light { background: var(--plaster); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--ghost-light { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1px rgba(243, 236, 225, 0.4); }
.btn--ghost-light:hover { background: rgba(243, 236, 225, 0.08); box-shadow: inset 0 0 0 1px var(--on-dark); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14.5px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  height: var(--head-h);
  background: rgba(243, 238, 230, 0.9);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.site-head.is-scrolled { border-bottom-color: var(--line); }
.site-head.is-hidden { transform: translateY(-100%); }
.site-head .wrap { height: 100%; display: flex; align-items: center; gap: 40px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { display: block; height: 40px; width: auto; }
.logo--plate { padding: 12px 16px; border-radius: 4px; background: var(--plaster); }
.logo-tag { padding-left: 14px; margin-left: 2px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .logo img { height: 32px; } }
.nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }
.nav a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.head-cta { margin-left: 4px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: 4px; }
.menu-btn span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 6px auto; transition: transform 0.35s var(--ease), opacity 0.2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .head-cta { display: none; }
  .nav {
    position: fixed; inset: var(--head-h) 0 auto 0; height: calc(100dvh - var(--head-h));
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--plaster);
    padding: 12px var(--margin) 32px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .menu-open .site-head { transform: none; }
  .nav a { font: 300 clamp(2rem, 8vw, 3rem)/1.1 var(--f-display); letter-spacing: -0.02em; color: var(--ink); padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: auto; font: 600 15px/1 var(--f-body); letter-spacing: 0; border: 0; padding: 0 24px; color: #fbf4ec; }
}
@media (min-width: 1101px) { .nav .btn { display: none; } }

/* ---------- Sections (finishing page and builder) ---------- */
.section { padding: clamp(80px, 11vw, 168px) 0; }
.section--linen { background: var(--linen); }
.section--dark { background: var(--walnut); color: var(--on-dark-2); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head > :first-child { grid-column: 1 / span 7; }
.section-head > :last-child:not(:first-child) { grid-column: 9 / span 4; }
.section-head .eyebrow { display: none; }
@media (max-width: 900px) { .section-head > :first-child, .section-head > :last-child:not(:first-child) { grid-column: 1 / -1; } }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Vision board frame (builder) ---------- */
.board {
  position: relative; background: var(--paper); border-radius: 4px; padding: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 4px rgba(42, 31, 24, 0.06), 0 40px 70px -36px rgba(42, 31, 24, 0.55);
}
.board__bar { display: flex; justify-content: space-between; gap: 16px; padding: 4px 4px 12px; color: var(--muted); }
.board__bar b { color: var(--ink); font-weight: 500; }
.board__render { position: relative; aspect-ratio: 1200 / 780; border-radius: 2px; overflow: hidden; background: #e4dccf; }
.board__render > .layer { position: absolute; inset: 0; transition: opacity 0.45s ease; }
.board__render > .layer svg, .board__render > .layer img { width: 100%; height: 100%; display: block; object-fit: cover; }
.board__render > .layer.is-out { opacity: 0; }
.board__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px 2px; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .board__bar > span:first-child, .board__foot .mono { display: none; }
  .board__bar { justify-content: flex-end; }
}

/* ---------- Footer ---------- */
.site-foot { background: var(--linen); color: var(--ink-2); padding: clamp(72px, 9vw, 128px) 0 32px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; }
.foot-brand { grid-column: 1 / span 4; }
.foot-brand .logo img { height: 46px; }
.foot-tag { margin-top: 22px; max-width: 22em; font: 300 clamp(1.3rem, 1.6vw, 1.6rem)/1.25 var(--f-display); color: var(--ink); letter-spacing: -0.01em; }
.foot-col { grid-column: span 2; }
.foot-brand + .foot-col { grid-column: 7 / span 2; }
.foot-grid h4 { font: 500 14px/1 var(--f-body); color: var(--muted); margin-bottom: 18px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-grid a { text-decoration: none; color: var(--ink); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
.foot-grid a:hover { background-size: 100% 1px; }
.foot-grid p { line-height: 1.6; }
.foot-base { margin-top: clamp(64px, 8vw, 112px); padding-top: 24px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); }
/* legacy footer markup on other pages */
.foot-grid > div:not([class]) { grid-column: span 2; }
.foot-grid > div:not([class]):first-child { grid-column: 1 / span 4; }
.foot-grid > div:not([class]):nth-child(2) { grid-column: 7 / span 2; }
@media (max-width: 900px) {
  .foot-brand, .foot-grid > div:not([class]):first-child { grid-column: 1 / -1; }
  .foot-col, .foot-brand + .foot-col, .foot-grid > div:not([class]), .foot-grid > div:not([class]):nth-child(2) { grid-column: span 6; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Forms (shared by Vision Builder and Finishing sheet) ---------- */
.field { display: grid; gap: 8px; }
.field > span, .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field small, .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--paper);
  font: 400 16px/1.4 var(--f-body); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(123, 26, 24, 0.14); }
.field.has-error input, .field.has-error textarea { border-color: var(--oxblood); }
.err, .field > .err { display: none; font-size: 13px; color: var(--oxblood); font-weight: 500; }
.has-error .err, .err.show { display: block; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .fields-2 { grid-template-columns: 1fr; } }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--paper);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover span { border-color: var(--ink); }
.pill input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--plaster); }
.pill input:focus-visible + span { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.pill input:disabled + span { opacity: 0.7; }

.drop {
  position: relative; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 26px 16px; border: 1.5px dashed var(--line-2); border-radius: 4px; background: rgba(250, 247, 242, 0.6);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.is-over { border-color: var(--ink); background: var(--paper); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 26px; height: 26px; color: var(--oxblood); }
.drop b { color: var(--ink); font-weight: 600; font-size: 15px; }
.drop small { font-size: 13px; color: var(--muted); }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.files li { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 13px; max-width: 100%; }
.files img, .files .doc { width: 34px; height: 34px; border-radius: 2px; object-fit: cover; flex: none; }
.files .doc { display: grid; place-items: center; background: var(--linen); font: 600 9px/1 var(--f-body); color: var(--oxblood); }
.files span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
