:root {
  --bg: #ffffff;
  --surface: #faf9f5;
  --ink: #17171a;
  --muted: #5e5e66;
  --line: #e8e6de;
  --blue: #17171a;
  --blue-ink: #ffffff;
  --amber: #f2b705;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap-pad: clamp(16px, 4vw, 24px);
  --section-pad: clamp(48px, 8vw, 72px);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 88px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, 2.5vw, 1.0625rem) / 1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.85rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.45rem, 3.6vw, 2.4rem);
}

h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
}

section {
  padding: var(--section-pad) 0;
}

/* Header */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}

header.top.scrolled {
  box-shadow: 0 8px 28px rgba(23, 23, 26, 0.08);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  gap: clamp(10px, 2vw, 20px);
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.88rem, 2vw, 0.95rem);
}

nav a:not(.btn) {
  position: relative;
}

nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: var(--amber);
  scale: 0 1;
  transform-origin: left;
  transition: scale 0.3s ease;
}

nav a:not(.btn):hover::after {
  scale: 1 1;
}

/* Buttons */
button.btn {
  appearance: none;
  -webkit-appearance: none;
}

.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--blue-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  cursor: pointer;
  font: inherit;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease,
    border-color 0.25s ease, color 0.25s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.38) 50%,
    transparent 70%
  );
  translate: -130% 0;
  transition: translate 0.7s ease;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--amber);
  border-color: var(--amber);
  color: #17171a;
  box-shadow: 0 10px 24px rgba(242, 183, 5, 0.32);
}

.btn:hover::after {
  translate: 130% 0;
}

.btn.alt {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn.alt:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #17171a;
}

nav .btn {
  padding: 8px 16px;
  color: var(--blue-ink);
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(20px, 4vw, 28px);
  align-items: center;
}

.progress {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--amber);
  scale: 0 1;
  transform-origin: left;
  z-index: 50;
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--section-pad) 0 clamp(56px, 10vw, 80px);
  background: radial-gradient(
    760px 380px at 90% 0%,
    color-mix(in srgb, var(--amber) 16%, transparent),
    transparent 70%
  );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image: radial-gradient(1.6px 1.6px at 12% 22%, var(--amber), transparent),
    radial-gradient(1.4px 1.4px at 44% 12%, var(--amber), transparent),
    radial-gradient(1.6px 1.6px at 72% 24%, var(--amber), transparent),
    radial-gradient(1.4px 1.4px at 90% 64%, var(--amber), transparent),
    radial-gradient(1.2px 1.2px at 30% 80%, var(--amber), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 48px);
  align-items: center;
}

.hero-art {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: min(480px, 100%);
}

.hero-art img {
  display: block;
  width: 100%;
  animation: heroIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s backwards;
}

.hero .btn {
  padding: 14px 26px;
}

@keyframes twinkle {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 0.65;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    translate: 0 18px;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}

.hero h1 {
  animation: heroIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s backwards;
}

.hero .cta {
  animation: heroIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s backwards;
}

/* Heritage */
.alt-bg {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 48px);
  align-items: start;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--line);
  position: relative;
}

.timeline::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber);
  transform-origin: top;
  scale: 1 0;
  transition: scale 1.8s ease;
}

.timeline.in::after {
  scale: 1 1;
}

.timeline li {
  position: relative;
  padding: 0 0 28px 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid var(--surface);
}

.timeline time {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.timeline p {
  margin: 0.2em 0 0;
  color: var(--muted);
  max-width: none;
}

/* Founders */
.founders {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.founder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.founder:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(23, 23, 26, 0.08);
  border-color: var(--amber);
}

.founder h3 {
  margin: 0 0 0.3em;
  font-size: 1.05rem;
}

.founder p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: none;
}

/* Agency */
.agency {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  border-block: 1px solid var(--line);
}

.agency::before,
.agency::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.agency::before {
  width: min(720px, 120vw);
  height: min(720px, 120vw);
  right: -220px;
  top: -260px;
  background: radial-gradient(circle, rgba(242, 183, 5, 0.16), transparent 65%);
  animation: drift 18s ease-in-out infinite alternate;
}

.agency::after {
  width: min(620px, 100vw);
  height: min(620px, 100vw);
  left: -240px;
  bottom: -300px;
  background: radial-gradient(circle, rgba(242, 183, 5, 0.08), transparent 65%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

.agency .wrap {
  position: relative;
  z-index: 1;
}

.agency p {
  color: var(--muted);
  max-width: 65ch;
}

.agency a:not(.btn) {
  color: var(--ink);
}

.services {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 32px 0;
}

.service {
  border-top: 2px solid var(--amber);
  padding-top: 14px;
  transition: transform 0.3s ease;
}

.service:hover {
  transform: translateY(-5px);
}

.service h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}

.service p {
  font-size: 0.92rem;
  margin: 0;
  max-width: none;
}

.agency .btn {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--blue-ink);
}

.agency .btn.alt {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.agency .btn:hover,
.agency .btn.alt:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #17171a;
}

@keyframes drift {
  to {
    transform: translate(70px, 50px) scale(1.18);
  }
}

/* Group */
.rel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.rel > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 24px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.rel > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(23, 23, 26, 0.08);
  border-color: var(--amber);
}

.rel h3 {
  margin-bottom: 0.4em;
}

.rel p {
  max-width: none;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: clamp(36px, 6vw, 48px) 0 32px;
  font-size: 0.92rem;
}

footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(20px, 4vw, 32px);
}

footer h3 {
  color: var(--ink);
  font-size: 1rem;
}

footer p {
  max-width: none;
}

footer a {
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
}

footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

footer .fine {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 8px;
}

/* Reveal animation */
.js .rv {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.75s ease, translate 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .rv.in {
  opacity: 1;
  translate: 0 0;
}

/* Quote dialog */
dialog#quote {
  border: 0;
  padding: 0;
  margin: auto;
  border-radius: 20px;
  width: min(92vw, 480px);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

dialog#quote::backdrop {
  background: rgba(15, 15, 18, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

dialog#quote[open] {
  animation: qin 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes qin {
  from {
    opacity: 0;
    translate: 0 16px;
    scale: 0.97;
  }
}

#quote-form {
  padding: clamp(22px, 4vw, 32px) clamp(18px, 4vw, 28px) clamp(20px, 4vw, 28px);
  position: relative;
  border-top: 6px solid var(--amber);
  border-radius: 20px;
}

#quote-form h2 {
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  margin-bottom: 0.2em;
  padding-right: 2.5rem;
}

.q-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.2em;
  max-width: none;
}

#quote-form label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

#quote-form input[type="text"],
#quote-form input[type="number"],
#quote-form input[type="email"],
#quote-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#quote-form textarea {
  resize: vertical;
  min-height: 110px;
}

#quote-form input:focus,
#quote-form textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 35%, transparent);
}

.q-close {
  position: absolute;
  right: 14px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.q-close:hover {
  background: var(--amber);
  color: #17171a;
}

.q-submit {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: var(--blue-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease;
}

.q-submit:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #17171a;
  box-shadow: 0 10px 24px rgba(242, 183, 5, 0.32);
}

.q-submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Thank you */
.thank-you-page {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
}

.thank-you {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(48px, 10vw, 96px) 0;
  background: radial-gradient(
      640px 320px at 100% 0%,
      color-mix(in srgb, var(--amber) 14%, transparent),
      transparent 70%
    ),
    var(--surface);
  border-block: 1px solid var(--line);
}

.thank-you__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(28px, 5vw, 48px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(23, 23, 26, 0.08);
  border-top: 6px solid var(--amber);
}

.thank-you__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--amber) 22%, var(--surface));
  color: #17171a;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid color-mix(in srgb, var(--amber) 50%, var(--line));
}

.thank-you__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.thank-you h1 {
  margin-bottom: 0.65em;
}

.thank-you__msg {
  margin: 0 auto 1.5rem;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.thank-you__cta {
  justify-content: center;
}

.thank-you--404 .thank-you__inner {
  border-top-color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap,
  .two,
  .rel,
  footer .wrap {
    grid-template-columns: 1fr;
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
  }

  .founders {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  header.top .wrap {
    flex-direction: column;
    align-items: stretch;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  nav {
    justify-content: center;
    width: 100%;
  }

  nav .btn {
    width: 100%;
    max-width: 100%;
  }

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

  .hero p,
  .agency .wrap > p,
  #founders .wrap > p,
  #heritage .two > div p {
    margin-left: auto;
    margin-right: auto;
  }

  .cta {
    justify-content: center;
  }

  .cta .btn {
    flex: 1 1 100%;
    min-width: min(100%, 280px);
    max-width: 100%;
  }

  .agency .cta {
    width: 100%;
  }

  .agency .cta .btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    word-break: break-word;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .founders {
    grid-template-columns: 1fr;
  }

  .timeline li {
    padding-left: 22px;
  }
}

@media (max-width: 380px) {
  .wrap {
    padding-inline: 14px;
  }

  dialog#quote {
    width: 96vw;
    border-radius: 16px;
  }

  #quote-form {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .rv {
    opacity: 1;
    translate: none;
  }

  .timeline::after {
    scale: 1 1;
  }
}
