/* TankWorks: one stylesheet for the whole page.
   Every colour, font size and space lives in :root so it can be changed in one place. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Archivo';
  /* pinned to the one style the page uses: extra wide, black */
  src: url('../fonts/archivo-black-wide.woff2') format('woff2');
  font-weight: 900;
  font-stretch: 125%;
  font-display: swap;
}
/* Hanken Grotesk: one small file per weight (400 and 600), so every browser shows the exact weight */
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/hanken-grotesk-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/hanken-grotesk-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* Colour: one accent (orange) plus neutrals, all taken from the logo */
  --ink: #14161a;
  --ink-soft: #3a3d44;      /* secondary text on paper, 10.6:1 */
  --orange: #ff5a1f;        /* fields only, never small text on paper */
  --paper: #f4f1ea;
  --sand: #e9e4d8;
  --line: #cfc8b8;          /* hairlines on paper (decorative) */

  /* Type */
  --font-display: 'Archivo', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Hanken Grotesk', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --text-sm: 0.9375rem;                                  /* 15px */
  --text-base: 1.0625rem;                                /* 17px */
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);    /* 18 to 22px */
  --text-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);     /* 20 to 24px */
  --text-h2: clamp(1.875rem, 1.2rem + 2.8vw, 3.5rem);    /* 30 to 56px */
  --text-hero: clamp(2.25rem, 0.5rem + 8vw, 6rem);       /* 36 to 96px */

  /* Space: multiples of 8px */
  --s1: 0.5rem;   /* 8 */
  --s2: 1rem;     /* 16 */
  --s3: 1.5rem;   /* 24 */
  --s4: 2rem;     /* 32 */
  --s5: 2.5rem;   /* 40 */
  --s6: 3rem;     /* 48 */
  --s8: 4rem;     /* 64 */
  --s10: 5rem;    /* 80 */
  --s12: 6rem;    /* 96 */
  --s16: 8rem;    /* 128 */
  --section-y: clamp(var(--s10), 6vw + var(--s4), var(--s16));

  --gutter: 16px;
  --max: 1240px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (min-width: 768px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s2);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--orange); }

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

.skip-link {
  position: absolute; left: var(--s2); top: var(--s2); z-index: 10;
  padding: var(--s1) var(--s2); border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--s2);
  border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); line-height: 1;
  text-decoration: none; white-space: nowrap;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-solid {
  min-height: 56px; padding: 0 var(--s4);
  background: var(--ink); color: var(--paper); font-size: var(--text-base);
}
.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: #2b2e35; }
  .btn-outline:hover { background: var(--ink); color: var(--paper); }
}

/* ---------- Header ---------- */
.site-header { background: var(--orange); }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: 72px;
  padding-top: env(safe-area-inset-top);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand-mark { width: 32px; height: 32px; flex: none; }
/* On narrow phones the top-section button is right below, so the header keeps only the logo */
@media (max-width: 419px) { .site-header .btn { display: none; } }
.brand-name {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: 1rem; letter-spacing: 0.01em; text-transform: uppercase;
}
@media (min-width: 768px) {
  .site-header-inner { min-height: 88px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.1875rem; }
}

/* ---------- Top section (hero) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--orange);
  display: flex;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; align-content: start; gap: var(--s3);
  padding-top: var(--s4);
  /* leave room for the big T so it never sits under the text */
  padding-bottom: clamp(9rem, 30vw, 14rem);
}
.hero-title {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: var(--text-hero); line-height: 0.95; letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero-row { display: grid; gap: var(--s4); }
.hero-lede { font-size: var(--text-lg); font-weight: 400; line-height: 1.45; max-width: 40ch; }
@media (max-width: 599px) { .hero .btn-solid { width: 100%; } }

.big-t {
  position: absolute; z-index: 0;
  --t-w: clamp(200px, 26vw + 120px, 560px);
  width: var(--t-w); height: auto;
  /* sink the T so its notch runs off the bottom edge */
  right: clamp(-48px, -4vw, -24px); bottom: calc(var(--t-w) * -0.27);
}
.big-t-bar, .big-t-stem { fill: var(--ink); }
.big-t-notch { fill: var(--paper); }

@media (min-width: 768px) {
  /* from tablet up, the top section fills the first screen */
  .hero { min-height: calc(100svh - 88px); max-height: 1000px; }
  .hero-title { text-wrap: balance; }
  .hero-inner { align-content: center; gap: var(--s5); padding-top: 0; padding-bottom: var(--s16); }
  .hero-row { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
}
@media (min-width: 1024px) {
  .hero-inner { padding-bottom: var(--s12); }
}

/* ---------- Signature moment: the T assembles once on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .big-t rect { transform-box: fill-box; }
  .big-t-bar   { animation: t-from-top 900ms var(--ease-out) 120ms both; }
  .big-t-stem  { animation: t-from-bottom 900ms var(--ease-out) 220ms both; }
  .big-t-notch { animation: t-from-right 900ms var(--ease-out) 380ms both; }
  .hero-title  { animation: rise 800ms var(--ease-out) both; }
  .hero-row    { animation: rise 800ms var(--ease-out) 90ms both; }
}
@keyframes t-from-top    { from { transform: translateY(-60%); } }
@keyframes t-from-bottom { from { transform: translateY(70%); } }
@keyframes t-from-right  { from { transform: translateX(110%); } }
@keyframes rise          { from { transform: translateY(14px); } }

/* ---------- Text links ---------- */
.facts a, .plans-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .facts a:hover, .plans-note a:hover { text-decoration-color: var(--ink); }
}

/* ---------- Shared section heading ---------- */
.section-title {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: var(--text-h2); line-height: 1; letter-spacing: -0.025em;
  max-width: 14ch; text-wrap: balance;
}

/* ---------- Quick facts strip ---------- */
.facts { border-bottom: 2px solid var(--ink); }
.facts-list {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-block: 0; padding-block: var(--s3);
}
.fact { padding-block: var(--s2); }
.fact:nth-child(-n+2) { grid-column: 1 / -1; }
.fact dt {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft);
}
.fact dd { margin: 4px 0 0; font-weight: 600; font-size: var(--text-base); line-height: 1.4; }
@media (min-width: 900px) {
  .facts-list { grid-template-columns: 1.35fr 1fr 1fr 1fr; padding-block: var(--s4); }
  .fact:nth-child(-n+2) { grid-column: auto; }
  .fact { padding: var(--s1) var(--s3); border-left: 2px solid var(--ink); }
  .fact:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- What I build ---------- */
.build { padding-block: var(--section-y); }
.build-grid { display: grid; gap: var(--s5); }
.build-list { list-style: none; padding: 0; display: grid; }
.build-list li { border-top: 2px solid var(--ink); padding-block: var(--s3) var(--s4); }
.build-list h3 {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: var(--text-h3); line-height: 1.15; letter-spacing: -0.01em;
}
.build-list p { margin-top: var(--s1); color: var(--ink-soft); max-width: 46ch; }
@media (min-width: 900px) {
  .build-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--s4); }
  .build-title { grid-column: 1 / span 5; align-self: start; position: sticky; top: var(--s5); }
  .build-list { grid-column: 7 / span 6; }
  .build-list li:last-child { border-bottom: 2px solid var(--ink); }
}

/* ---------- Two plans ---------- */
.plans { margin-top: var(--s12); }
.plans-title {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.05; letter-spacing: -0.02em;
  text-wrap: balance;
}
.plans-grid { display: grid; gap: var(--s3); margin-top: var(--s4); }
.plan { position: relative; background: var(--sand); padding: var(--s4) var(--s3) var(--s5); }
/* the orange notch from the logo's T, tucked into each panel's corner */
.plan::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: var(--s4); height: var(--s4); background: var(--orange);
}
.plan h4 {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.1; letter-spacing: -0.015em;
  padding-right: var(--s5);
}
.plan p { margin-top: var(--s2); max-width: 40ch; font-size: 1.125rem; }
.plans-note { margin-top: var(--s4); font-size: var(--text-lg); }
@media (min-width: 900px) {
  .plans-grid { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .plan { padding: var(--s6) var(--s5) var(--s6); }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- How it works ---------- */
.process { padding-block: 0 var(--section-y); }
.process-title { max-width: 22ch; }
.steps {
  list-style: none; padding: 0; margin-top: var(--s8);
  display: grid; gap: var(--s6); position: relative;
}
/* the track that joins each step to the next, ending at Launch */
.step:not(:last-child)::before {
  content: ""; position: absolute; background: var(--ink);
  left: 11px; top: 16px; bottom: calc(-1 * var(--s6) - 8px); width: 2px;
}
.step { position: relative; padding-left: var(--s6); }
.step-mark {
  position: absolute; left: 0; top: 4px;
  width: var(--s3); height: var(--s3); background: var(--ink);
}
.step:last-child .step-mark { background: var(--orange); box-shadow: inset 0 0 0 2px var(--ink); }
.step h3 {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); line-height: 1; letter-spacing: -0.02em;
}
.step p { margin-top: var(--s2); color: var(--ink-soft); max-width: 34ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
  .step:not(:last-child)::before { left: 16px; right: calc(-1 * var(--s4)); top: 11px; bottom: auto; width: auto; height: 2px; }
  .step { padding-left: 0; padding-top: var(--s8); }
  .step-mark { top: 0; }
}

/* ---------- Example: KAOS ---------- */
.work { background: var(--sand); padding-block: var(--section-y); }
.work-title { max-width: 16ch; }
.work-shot { margin-top: var(--s6); }
.work-shot img { width: 100%; height: auto; }
@media (max-width: 599px) { .work-shot img { width: 240px; margin-inline: auto; } }
.work-body { display: grid; gap: var(--s8); margin-top: var(--s6); }
.work-text p { font-size: var(--text-lg); line-height: 1.5; max-width: 40ch; }
.work-link {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; margin-top: var(--s2);
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}
.work-link svg { width: 14px; height: 14px; transition: transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .work-link:hover { text-decoration-color: var(--ink); }
  .work-link:hover svg { transform: translate(2px, -2px); }
}
.quote { position: relative; padding-top: var(--s5); }
.quote::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: var(--s3); height: var(--s3); background: var(--orange);
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-weight: 400; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); line-height: 1.3;
  letter-spacing: -0.01em; max-width: 30ch;
}
.quote figcaption { margin-top: var(--s3); }
.quote figcaption strong { font-weight: 600; }
@media (min-width: 900px) {
  .work-body { grid-template-columns: repeat(12, 1fr); column-gap: var(--s4); align-items: start; }
  .work-text { grid-column: 1 / span 5; }
  .quote { grid-column: 7 / span 6; }
}

/* ---------- About ---------- */
.about { padding-block: var(--section-y); }
.about-grid { display: grid; gap: var(--s4); }
.about-text { font-size: var(--text-lg); line-height: 1.6; max-width: 60ch; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--s4); row-gap: var(--s5); }
  .about-title { grid-column: 1 / -1; }
  .about-text { grid-column: 5 / span 7; }
}

/* ---------- Contact (orange close) ---------- */
.contact { background: var(--orange); padding-block: var(--section-y); }
.contact-grid { display: grid; gap: var(--s8); }
.contact-title { max-width: 12ch; }
.contact-text { margin-top: var(--s3); font-size: var(--text-lg); font-weight: 400; line-height: 1.45; max-width: 36ch; }
.contact-main .btn-solid { margin-top: var(--s5); }
@media (max-width: 599px) { .contact-main .btn-solid { width: 100%; } }
.card {
  background: var(--paper); color: var(--ink);
  padding: var(--s4) var(--s3);
  display: flex; flex-direction: column; gap: var(--s1);
  max-width: 480px;
}
.card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s4); }
.card-brand svg { width: 28px; height: 28px; }
.card-brand span {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.01em;
}
.card-name {
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: 1.75rem; line-height: 1; letter-spacing: -0.015em;
}
.card-role {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.card-email {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2);
  margin-top: var(--s3); padding-top: var(--s3); border-top: 2px solid var(--ink);
  font-weight: 600;
}
.card-email span { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.btn-copy {
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font-size: var(--text-sm); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .btn-copy:hover { background: var(--ink); color: var(--paper); }
}
.copy-status { font-size: var(--text-sm); color: var(--ink-soft); }
.copy-status:empty { display: none; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--s4); align-items: end; }
  .contact-main { grid-column: 1 / span 7; }
  .card { grid-column: 8 / span 5; justify-self: end; width: 100%; aspect-ratio: 1.75; padding: var(--s4); }
  .card-name { margin-top: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding-block: var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
  font-size: var(--text-sm);
}

/* ---------- Gentle reveal on scroll ----------
   Pure CSS: browsers that support scroll-linked animation fade sections up as they
   enter the screen; others (and anyone who prefers less motion) just show them. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    [data-reveal] {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }

/* Small headings: avoid a single word stranded on its own line */
.build-list h3, .plan h4, .step h3, .card-name { text-wrap: balance; }
