@import url("./brand-tokens.css");

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

* {
  margin: 0;
  padding: 0;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.has-smooth {
  scroll-behavior: auto;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
}

body.nav-open,
body.locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}

::selection {
  color: var(--paper);
  background: var(--accent);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  transform: translateY(0);
  background: var(--ink);
  transition: transform 0.7s var(--ease);
}

.veil.out {
  transform: translateY(-100%);
}

.veil.in {
  transform: translateY(0);
}

.site-shell {
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 92px;
}

.section.tight {
  padding-block: 66px;
}

.section-dark {
  color: rgba(255, 255, 255, 0.82);
  background: var(--ink);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--paper-3);
}

.section-dark .muted,
.section-dark .lead {
  color: rgba(255, 255, 255, 0.64);
}

.section-dark .feature-card,
.section-dark .plain-card,
.section-dark .guide-card {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.06);
}

.section-dark .feature-card p,
.section-dark .plain-card p,
.section-dark .guide-card p {
  color: rgba(255, 255, 255, 0.68);
}

.split-host .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.split-host .word > span {
  display: inline-block;
  transform: translateY(104%);
  transition: transform 0.8s var(--ease);
}

.split-host .word.in > span,
.split-host.in .word > span {
  transform: translateY(0);
}

[data-reveal] {
  transform: translateY(28px);
  opacity: 0;
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
}

[data-reveal].in {
  transform: translateY(0);
  opacity: 1;
}

.reveal-img {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  clip-path: inset(14% 10% round 8px);
  transition: clip-path 1s var(--ease);
}

.reveal-img.in {
  clip-path: inset(0 round 8px);
}

.reveal-img img {
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.2s var(--ease);
}

.reveal-img.in img {
  transform: scale(1);
}

h1,
h2,
h3,
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0;
}

h1,
h2 {
  overflow-wrap: break-word;
}

h1 {
  max-width: 920px;
  font-size: 4.25rem;
}

h2 {
  max-width: 780px;
  font-size: 3rem;
}

h3 {
  font-size: 1.45rem;
}

p {
  color: var(--graphite);
}

.lead {
  max-width: 680px;
  color: var(--graphite);
  font-size: 1.1rem;
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 44px;
}

.section-head.centered {
  display: block;
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.section-head.centered .eyebrow {
  justify-content: center;
}

.section-head.centered .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.btn {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  overflow: hidden;
  border-radius: 4px;
  padding: 13px 20px;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.2;
  transition:
    transform 0.45s var(--ease),
    border-color 0.45s var(--ease),
    background 0.45s var(--ease),
    color 0.45s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  color: var(--paper-3);
  background: var(--ink);
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.34);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section-dark .btn-secondary {
  border-color: var(--line-light);
  color: var(--paper-3);
  background: transparent;
}

.section-dark .btn-secondary:hover {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 760;
}

.text-link svg {
  width: 16px;
  transition: transform 0.35s var(--ease);
}

.text-link:hover svg {
  transform: translateX(4px);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 19px var(--gutter);
  color: var(--paper-3);
  transition:
    padding 0.45s var(--ease),
    color 0.45s var(--ease),
    background 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.nav.scrolled,
.nav.solid {
  padding-block: 13px;
  color: var(--ink);
  background: rgba(245, 240, 231, 0.92);
  box-shadow: 0 1px 0 var(--line-soft);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-word {
  font-size: 1.2rem;
  line-height: 1;
}

.brand-sub {
  color: currentColor;
  font-size: 0.68rem;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  padding-block: 6px;
  font-size: 0.91rem;
  font-weight: 750;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  transition: transform 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  color: var(--accent-soft);
}

.nav.scrolled .nav-link.active,
.nav.solid .nav-link.active {
  color: var(--accent);
}

.nav-toggle {
  position: relative;
  z-index: 3;
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 6px;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.35s var(--ease),
    opacity 0.25s var(--ease);
}

.nav-toggle span:nth-child(1) {
  top: 13px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 27px;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--paper-3);
  background: var(--ink);
}

.hero.short {
  min-height: 62vh;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 19, 15, 0.46);
}

.hero-media img {
  height: 110%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 132px;
  padding-bottom: 74px;
}

.hero h1,
.hero p {
  color: var(--paper-3);
}

.hero .lead {
  max-width: 650px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-panel {
  position: absolute;
  right: var(--gutter);
  bottom: 34px;
  z-index: 2;
  width: min(360px, calc(100vw - 40px));
  border-left: 2px solid var(--accent-soft);
  padding: 18px 0 18px 22px;
}

.hero-panel p {
  color: rgba(255, 255, 255, 0.8);
}

.hero-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--paper-3);
}

.below-hint {
  position: relative;
  z-index: 2;
  height: 28px;
  background: var(--paper);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.category-card,
.plain-card,
.guide-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 248, 241, 0.74);
}

.feature-card,
.plain-card,
.guide-card,
.contact-card {
  padding: 24px;
}

.feature-card svg,
.plain-card svg {
  width: 36px;
  height: 36px;
  margin-bottom: 24px;
  color: var(--accent);
}

.feature-card h3,
.plain-card h3,
.guide-card h3 {
  margin-bottom: 12px;
}

.category-card {
  min-height: 430px;
  overflow: hidden;
  perspective: 900px;
  background: var(--paper-3);
}

.category-card figure {
  aspect-ratio: 4 / 3;
}

.category-card figure img {
  height: 100%;
  object-fit: cover;
}

.category-body {
  padding: 22px;
}

.category-body p {
  margin-top: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--graphite);
  font-size: 0.78rem;
}

.image-text {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 52px;
  align-items: center;
}

.image-stack {
  display: grid;
  gap: 16px;
}

.image-stack .reveal-img:first-child {
  aspect-ratio: 4 / 5;
}

.image-stack .reveal-img:last-child {
  width: 70%;
  aspect-ratio: 16 / 10;
  margin-left: auto;
  margin-top: -86px;
  box-shadow: var(--shadow);
}

.copy-block {
  display: grid;
  gap: 20px;
}

.ruled-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.ruled-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.ruled-list span {
  color: var(--accent);
  font-weight: 800;
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper-3);
}

.marquee-inner {
  display: flex;
  width: max-content;
  gap: 36px;
  padding-block: 18px;
  color: var(--canopy);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
  will-change: transform;
}

.story-strip {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.story-strip > div {
  padding: 34px;
}

.story-strip > div + div {
  border-left: 1px solid var(--line-light);
}

.tab-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.tab-buttons {
  display: grid;
  gap: 10px;
}

.tab-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(251, 248, 241, 0.7);
  font-weight: 760;
}

.tab-button.active {
  border-color: var(--accent);
  color: var(--paper-3);
  background: var(--ink);
}

.tab-panel {
  display: none;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-3);
}

.tab-panel.active {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}

.tab-panel .reveal-img {
  min-height: 360px;
  clip-path: none;
  border-radius: 0;
}

.tab-copy {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: 34px;
}

.steps {
  display: grid;
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 248, 241, 0.72);
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: var(--paper-3);
  background: var(--canopy);
  font-weight: 800;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 18px;
}

.email-large {
  display: inline-block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 740;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper-3);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.site-footer {
  padding-block: 50px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 34px;
}

.footer-brand {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links strong {
  color: var(--paper-3);
}

.footer-links a:hover,
.site-footer .email-large:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  pointer-events: none;
  transform: translate(-100px, -100px);
}

.cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 999px;
  background: var(--accent);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(182, 111, 63, 0.58);
  border-radius: 999px;
  transition:
    width 0.25s var(--ease),
    height 0.25s var(--ease),
    margin 0.25s var(--ease),
    background 0.25s var(--ease);
}

.cursor-ring.hover {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  background: rgba(182, 111, 63, 0.09);
}

@media (max-width: 1040px) {
  h1 {
    font-size: 3.4rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  .grid.four,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .image-text,
  .contact-layout,
  .tab-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 28px var(--gutter) 40px;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 20px;
    transform: translateY(-100%);
    color: var(--paper-3);
    background: var(--ink);
    transition: transform 0.55s var(--ease);
  }

  .nav-open .nav-links {
    transform: translateY(0);
  }

  .nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
  }

  .nav-link.active {
    color: var(--accent-soft);
  }

  .tab-panel.active {
    grid-template-columns: 1fr;
  }

  .tab-panel .reveal-img {
    min-height: 260px;
  }

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

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .section {
    padding-block: 68px;
  }

  h1 {
    font-size: 2.22rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 1.86rem;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 116px;
    padding-bottom: 46px;
  }

  .hero .lead {
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 150px;
    padding-inline: 14px;
  }

  .hero-panel {
    margin: 18px var(--gutter) 32px;
    padding-left: 16px;
  }

  .nav {
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-word {
    font-size: 1.02rem;
  }

  .brand-sub {
    font-size: 0.58rem;
  }

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 0;
  }

  .image-stack .reveal-img:last-child {
    width: 86%;
    margin-top: -48px;
  }

  .ruled-list li,
  .step {
    grid-template-columns: 1fr;
  }

  .story-strip {
    grid-template-columns: 1fr;
  }

  .story-strip > div + div {
    border-top: 1px solid var(--line-light);
    border-left: 0;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal],
  .split-host .word > span,
  .reveal-img,
  .reveal-img img {
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
}
