/* Goldleaf Capital — gold leaf on lacquer.
   One typeface (Archivo, variable weight + width). The width axis does the
   expressive work: wide for the wordmark and headings, narrow for the quote. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2-variations"),
       url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel-latin.woff2") format("woff2-variations"),
       url("fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --lacquer: #100d0a;      /* page ground: warm black lacquer */
  --lacquer-raised: #1a1511;
  --rule: #2f2923;
  --ivory: #ede6d7;        /* primary text */
  --muted: #a69d8e;        /* secondary text, ~7:1 on lacquer */
  --gold: #cfa95f;         /* flat gold for interactive accents */
  --gold-ink: #1b140b;     /* text set on the foil */
  --danger: #e59a84;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Cinzel", "Trajan Pro", Georgia, serif;   /* matches the office wall logo */
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --section: clamp(5rem, 11vw, 9.5rem);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--lacquer);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ul, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--gold-ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ivory);
  color: var(--lacquer);
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem);
}
.grid > * { grid-column: 1 / -1; }

/* ---------- Top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: var(--ivory);
  background: rgba(16, 13, 10, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.bar.is-over-hero {
  color: var(--gold-ink);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.bar__mark {
  font-family: var(--font-mark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: opacity .35s ease;
}
.bar.is-over-hero .bar__mark { opacity: 0; pointer-events: none; }
.bar__nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.bar__nav a {
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: .25rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .25s ease;
}
.bar__nav a:hover { background-size: 100% 1px; }

/* ---------- Hero: the gold leaf ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  color: var(--gold-ink);
  /* Fallback when WebGL is unavailable */
  background:
    radial-gradient(120% 90% at 20% 15%, #f6dc9c 0%, #d9b066 38%, #a87c34 75%, #7d5a22 100%);
}
.hero__foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 7rem var(--gutter) clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(2rem, 5vw, 3.5rem);
  container-type: inline-size;
}
/* Wordmark: the office logo lockup — GOLDLEAF, then — CAPITAL — between rules */
.hero__mark {
  width: 100%;
  font-family: var(--font-mark);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  /* GOLDLEAF is ~5.74em wide in Cinzel 800: size it to span the full content width */
  font-size: calc(min(100vw - 2 * var(--gutter), var(--max)) / 5.735);
  font-size: calc(100cqi / 5.735);
}
.hero__line { display: block; }
.hero__word { letter-spacing: -.005em; }
.hero__sub {
  display: flex;
  align-items: center;
  gap: .45em;
  margin-top: .1em;
  font-size: .46em;
  font-weight: 800;
  letter-spacing: .04em;
}
.hero__sub::before,
.hero__sub::after {
  content: "";
  flex: 1;
  height: .1em;
  background: currentColor;
}
.hero__sub::before { margin-left: .06em; }
.hero__sub::after { margin-right: .06em; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem 2rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid currentColor;
}
.hero__tagline {
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -.005em;
}
.hero__place {
  font-weight: 500;
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
}

/* Load sequence: the light sweeps the leaf (foil.js), the mark settles. */
.js .hero__line,
.js .hero__foot {
  opacity: 0;
  transform: translateY(.35em);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.js .hero__line:nth-child(2) { transition-delay: .12s; }
.js .hero__foot { transform: translateY(.75rem); transition-delay: .45s; }
.is-loaded .hero__line,
.is-loaded .hero__foot { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .hero__line, .js .hero__foot { transition: none; opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }

h2 {
  font-stretch: 116%;
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.prose p + p { margin-top: 1.25em; }
.prose { max-width: 38rem; color: var(--ivory); }

/* About */
.about__title { margin-bottom: 2.5rem; }
.about__body { font-size: clamp(1.0625rem, 1.3vw, 1.2rem); }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.fact { padding-top: 1rem; border-top: 1px solid var(--rule); }
.fact dt {
  font-stretch: 125%;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  color: var(--gold);
}
.fact dd { margin-top: .4rem; color: var(--muted); font-size: .95rem; }

/* Philosophy */
.philosophy__title { margin-bottom: 1.5rem; }
.philosophy__intro {
  color: var(--ivory);
  font-size: clamp(1.0625rem, 1.3vw, 1.2rem);
  max-width: 38rem;
}
.principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.principle { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.principle h3 {
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.principle p { color: var(--muted); max-width: 30rem; }

/* Contact */
.contact__intro h2 { margin-bottom: 1.25rem; }
.contact__lede { color: var(--ivory); max-width: 30rem; }
.details { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin-top: .15rem; font-size: 1.1rem; }
.details a { text-decoration-color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.details a:hover { color: var(--gold); }
.contact__form { margin-top: 3.5rem; }

.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .9rem; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ivory);
  background: var(--lacquer-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .8rem .9rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover,
.field textarea:hover { border-color: #463d34; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--gold); background: #1e1813; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__check:empty { display: none; }

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .25rem; }
.button {
  font: inherit;
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gold-ink);
  background: var(--gold);
  border: 0;
  border-radius: 3px;
  padding: .9rem 1.6rem;
  cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
.button:hover { background: #ddb96f; }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .6; cursor: progress; }
.button--quiet {
  color: var(--ivory);
  background: transparent;
  border: 1px solid var(--rule);
}
.button--quiet:hover { background: var(--lacquer-raised); border-color: #463d34; }

.form__status { font-size: .95rem; color: var(--muted); }
.form__status.is-error { color: var(--danger); }

.sent {
  padding: 2rem;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  background: var(--lacquer-raised);
  border-radius: 3px;
}
.sent:focus { outline: none; }
.sent h3 { font-stretch: 116%; font-weight: 600; font-size: 1.5rem; margin-bottom: .75rem; }
.sent p { color: var(--muted); margin-bottom: 1.5rem; }
.sent strong { color: var(--ivory); font-weight: 500; overflow-wrap: anywhere; }

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.footer__notice {
  font-stretch: 108%;
  font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 42rem;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: .875rem;
}

/* ---------- Wider screens ---------- */

@media (min-width: 52rem) {
  .about__title { grid-column: 1 / span 5; margin-bottom: 0; }
  .about__body { grid-column: 7 / -1; }
  .facts { grid-column: 7 / -1; }

  .philosophy__title { grid-column: 1 / span 5; margin-bottom: 0; }
  .philosophy__intro { grid-column: 7 / -1; }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }

  .contact__intro { grid-column: 1 / span 5; }
  .contact__form { grid-column: 7 / -1; margin-top: 0; }
}

@media (max-width: 30rem) {
  .bar__mark { display: none; }
  .bar { justify-content: flex-end; }
  .facts { grid-template-columns: 1fr; }
}
