/* ==========================================================================
   Serpenthink — styles.css
   Edit the design tokens below to adjust colors, type and spacing site-wide.
   ========================================================================== */

/* ---------- Font (self-hosted Inter, SIL Open Font License) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-var-latin.woff2") format("woff2-variations"),
       url("assets/fonts/inter-var-latin.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  /* Approved palette (Brand Standards v1.1) */
  --slate: #27313B;
  --ivory: #F5EBDD;
  --white: #FFFFFF;
  --coral: #D2603F;   /* print-friendly signature accent */
  --peach: #F2A38A;
  --butter: #F0D87B;
  --sky: #B8D6E8;
  --lilac: #C6B2D9;
  --sage: #A9CBB7;

  --ink: var(--slate);
  --ink-muted: #4E5761;           /* 6.3:1 on ivory */
  --rule: rgba(39, 49, 59, 0.22);
  --focus: var(--slate);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 64px;
  --section-pad: clamp(72px, 10vw, 144px);

  /* Diagonal panels follow the angle of the logo's slashes (44 across / 92 up). */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 960px) {
  :root { --header-h: 76px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--slate);
  color: var(--ivory);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; --focus: var(--coral); }

/* ==========================================================================
   Header + four-slash menu
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  flex: none;
  padding: 6px 0;
  text-decoration: none;
}
.brand img { height: 24px; width: auto; }
@media (min-width: 960px) { .brand img { height: 29px; } }

.site-nav {
  display: flex;
  flex-direction: row-reverse;  /* button on the right, links open to its left */
  align-items: center;
  gap: 8px;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  min-width: 48px;
  padding: 0 6px 0 10px;
  margin-right: -6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-button__label { min-width: 3.6em; text-align: left; }

.slashes {
  width: 30px;
  height: 18px;
  overflow: visible;
  fill: currentColor;
}
.slashes path {
  transform-box: fill-box;
  transition: transform 260ms var(--ease);
}

/* Hover / focus preview: the slashes lean apart slightly. */
@media (hover: hover) and (pointer: fine) {
  .menu-button:hover .slashes path:nth-child(1) { transform: translateX(-2px); }
  .menu-button:hover .slashes path:nth-child(2) { transform: translateX(-0.7px); }
  .menu-button:hover .slashes path:nth-child(3) { transform: translateX(0.7px); }
  .menu-button:hover .slashes path:nth-child(4) { transform: translateX(2px); }
}
.menu-button:focus-visible .slashes path:nth-child(1) { transform: translateX(-2px); }
.menu-button:focus-visible .slashes path:nth-child(4) { transform: translateX(2px); }

/* Open: the slashes separate. */
.site-nav.is-open .slashes path:nth-child(1) { transform: translateX(-5px); }
.site-nav.is-open .slashes path:nth-child(2) { transform: translateX(-1.7px); }
.site-nav.is-open .slashes path:nth-child(3) { transform: translateX(1.7px); }
.site-nav.is-open .slashes path:nth-child(4) { transform: translateX(5px); }

/* --- Menu list: shared --- */
.site-menu a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
}

/* --- Menu list: phones and tablets (panel below the header) --- */
.js .site-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 28px;
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 24px 40px -32px rgba(39, 49, 59, 0.35);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 240ms var(--ease), visibility 0s linear 240ms;
}
.js .site-nav.is-open .site-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 200ms ease, transform 240ms var(--ease), visibility 0s;
}
.js .site-menu li + li { border-top: 1px solid var(--rule); }
.js .site-menu a {
  gap: 16px;
  min-height: 64px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: -0.02em;
}
.site-menu__num {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.js .site-menu a:hover .site-menu__num,
.js .site-menu a:focus-visible .site-menu__num { color: var(--coral); }

/* --- Menu list: desktop (links slide out beside the slashes) --- */
@media (min-width: 960px) {
  .js .site-menu {
    position: static;
    display: flex;
    gap: 4px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
  }
  .js .site-menu li + li { border: 0; }
  .js .site-menu li {
    opacity: 0;
    transform: translateX(14px);
    transition: opacity 180ms ease, transform 260ms var(--ease);
  }
  .js .site-nav.is-open .site-menu li { opacity: 1; transform: none; }
  .js .site-nav.is-open .site-menu li:nth-child(4) { transition-delay: 0ms; }
  .js .site-nav.is-open .site-menu li:nth-child(3) { transition-delay: 35ms; }
  .js .site-nav.is-open .site-menu li:nth-child(2) { transition-delay: 70ms; }
  .js .site-nav.is-open .site-menu li:nth-child(1) { transition-delay: 105ms; }

  .js .site-menu a {
    min-height: 48px;
    padding: 0 14px;
    font-size: 0.9375rem;
    letter-spacing: 0;
    text-underline-offset: 8px;
    text-decoration-thickness: 2px;
  }
  .js .site-menu a:hover,
  .js .site-menu a:focus-visible {
    text-decoration-line: underline;
    text-decoration-color: var(--coral);
  }
  .site-menu__num { display: none; }
}

/* --- No JavaScript: show the links plainly, hide the toggle --- */
.no-js .menu-button { display: none; }
.no-js .site-menu { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.no-js .site-menu a { min-height: 44px; font-size: 0.9375rem; }
.no-js .site-menu__num { display: none; }

/* ==========================================================================
   Shared type
   ========================================================================== */
.kicker,
.section__label,
.masthead,
.principles__title,
.status__label,
.caption__fig {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section__label span {
  display: inline-block;
  padding: 3px 7px 2px;
  border: 1.5px solid currentColor;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.section__title {
  font-size: clamp(2.125rem, 2.2rem + 2.4vw, 4rem);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.032em;
  max-width: 16ch;
  text-wrap: balance;
}

.section__intro {
  max-width: 38em;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--ink-muted);
}

.section { padding-block: var(--section-pad); }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

.caption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}
.caption__fig { flex: none; color: var(--ink); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  background: var(--slate);
  color: var(--ivory);
  font-weight: 620;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 160ms ease;
}
.button:hover { background: #1B232B; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  font-weight: 620;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--peach);
}
.text-link:hover { text-decoration-color: var(--coral); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { border-bottom: 2px solid var(--slate); }

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.6875rem;
}
.masthead__mid { display: none; }
@media (min-width: 640px) { .masthead__mid { display: inline; } }

.hero__grid {
  display: grid;
  gap: 40px;
  padding-top: clamp(40px, 7vw, 96px);
}

.kicker { margin-bottom: 20px; color: var(--ink-muted); }

.hero__title {
  font-size: clamp(2.75rem, 1rem + 4.4vw, 5.25rem);
  font-weight: 740;
  line-height: 0.96;
  letter-spacing: -0.042em;
  max-width: 12ch;
}

.hero__dek {
  max-width: 30em;
  margin-top: 28px;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 36px;
}

.status {
  display: flex;
  gap: 12px;
  align-items: baseline;
  max-width: 30em;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.status__label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.status__label::before {           /* the signature square */
  content: "";
  width: 8px;
  height: 8px;
  background: var(--coral);
}

/* Art: halftone skyline in front of flat diagonal panels */
.hero__art {
  position: relative;
  align-self: end;
  margin-inline: calc(var(--gutter) * -1);   /* bleed on small screens */
}
.hero__panels {
  position: relative;
  margin-bottom: calc(-362 / 760 * 100%); /* skyline overlaps the lower part of the panel box */
}
.panel {
  position: absolute;
  inset: 0;
}
/* Band angle matches the slashes: horizontal travel = 0.478 x vertical rise.
   Phones/tablets use a shorter panel box, so the percentages differ to keep the same angle. */
.hero__panels { aspect-ratio: 760 / 440; }
.panel--peach { background: var(--peach); clip-path: polygon(50% 100%, 77.7% 0, 89.7% 0, 62% 100%); }
.panel--sky   { background: var(--sky);   clip-path: polygon(66% 100%, 93.7% 0, 100% 0, 100% 100%); }
@media (min-width: 960px) {
  .hero__panels { aspect-ratio: 760 / 540; }
  .panel--peach { clip-path: polygon(46% 100%, 80% 0, 92% 0, 58% 100%); }
  .panel--sky   { clip-path: polygon(62% 100%, 96% 0, 100% 0, 100% 100%); }
}

.hero__skyline {
  position: relative;
  width: 100%;
}
.hero__art .caption {
  padding-inline: var(--gutter);
  padding-bottom: 16px;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: 40px;
  }
  .hero__grid { padding-top: clamp(32px, 4vw, 64px); }
  .hero__copy { padding-bottom: 40px; }
  .hero__actions, .status { margin-top: 28px; }
  .hero__art { margin-inline: 0; }
  .hero__art .caption { padding-inline: 0; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about__grid {
  display: grid;
  gap: 56px;
}
.prose p { max-width: 36em; }
.prose p + p { margin-top: 1.1em; }
.lede {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  line-height: 1.4;
  font-weight: 560;
  letter-spacing: -0.012em;
}
.prose .lede + p { margin-top: 1.4em; }

.about__art {
  max-width: 380px;
  margin-top: 48px;
}
.about__art img {
  width: 100%;
  border-bottom: 2px solid var(--slate);
}

.principles {
  padding-top: 20px;
  border-top: 2px solid var(--slate);
}
.principles__title { margin-bottom: 8px; }
.principles__list { counter-reset: p; }
.principles__list li {
  counter-increment: p;
  position: relative;
  padding: 18px 0 18px 44px;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-muted);
}
.principles__list li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 20px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.principles__list strong { display: block; color: var(--ink); font-weight: 680; }

@media (min-width: 960px) {
  .about__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(48px, 7vw, 120px); }
  .principles { align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ==========================================================================
   Approach (dark band)
   ========================================================================== */
.approach {
  background: var(--slate);
  color: var(--ivory);
  --focus: var(--ivory);
  --rule: rgba(245, 235, 221, 0.24);
}
.approach .section__intro { color: rgba(245, 235, 221, 0.82); }

.loop {
  display: grid;
  gap: 0 32px;
  counter-reset: step;
}
.loop__step {
  position: relative;
  padding: 28px 0 36px;
  border-top: 1px solid var(--rule);
}
.loop__step::before {               /* a single slash, at the logo's angle */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--peach);
}
.loop__num {
  display: block;
  font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--peach);
  font-variant-numeric: tabular-nums;
}
.loop__title {
  margin-top: 20px;
  font-size: clamp(1.625rem, 1.4rem + 0.9vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.loop__step p {
  margin-top: 12px;
  max-width: 26em;
  color: rgba(245, 235, 221, 0.82);
  font-size: 1rem;
}
.loop__return {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-weight: 600;
  color: var(--ivory);
}
.loop__return svg { width: 22px; height: 22px; color: var(--peach); }

@media (min-width: 640px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .loop { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ==========================================================================
   Focus cards
   ========================================================================== */
.cards {
  display: grid;
  gap: 20px;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  --panel: var(--sky);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ivory);
  border: 1.5px solid var(--slate);
  isolation: isolate;
}
.card::before {                       /* flat diagonal color plane */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--panel);
  clip-path: polygon(38% 100%, 86% 0, 100% 0, 100% 100%);
}
.card--sky    { --panel: var(--sky); }
.card--butter { --panel: var(--butter); }
.card--lilac  { --panel: var(--lilac); }
.card--sage   { --panel: var(--sage); }

.card__text { padding: 26px 24px 8px; }
.card__title {
  font-size: clamp(1.875rem, 1.6rem + 0.8vw, 2.25rem);
  font-weight: 740;
  line-height: 1;
  letter-spacing: -0.035em;
}
.card__tag {
  margin-top: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 14em;
}
.card__body {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);          /* full slate: stays readable where the color plane crosses it */
  max-width: 22em;
}
.card__img {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
}
/* Single-column phones: keep the art from getting too tall */
@media (max-width: 639px) {
  .card { flex-direction: column; }
  .card__img { width: 82%; max-width: 384px; margin-left: auto; }
}

.crosscut {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 2px solid var(--slate);
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  color: var(--ink-muted);
}
.crosscut strong { color: var(--ink); font-weight: 680; }
.crosscut::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--coral);
  transform: translateY(-1px);
}
@media (min-width: 640px) { .crosscut { flex-wrap: nowrap; } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { border-top: 2px solid var(--slate); }
.contact__grid {
  display: grid;
  gap: 56px;
  align-items: end;
}
.contact__text {
  max-width: 32em;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}
.contact__text--muted { margin-top: 14px; color: var(--ink-muted); }

.signoff {
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.signoff__logo { width: min(100%, 440px); height: auto; }
.signoff__line {
  margin-top: 22px;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

@media (min-width: 960px) {
  .contact__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 80px; }
  .signoff { padding-top: 36px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--slate);
  color: var(--ivory);
  --focus: var(--ivory);
  font-size: 0.875rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-block: 32px;
}
.site-footer__inner img { height: 20px; width: auto; margin-right: auto; }
.site-footer p { color: rgba(245, 235, 221, 0.78); }
.site-footer__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-underline-offset: 5px;
}
@media (max-width: 639px) {
  .site-footer__inner img { flex-basis: 100%; margin-bottom: 4px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }
}
