/* ==========================================================================
   Kiin — white version with teal accents
   Same wording, structure and Archivo type as the dark site that was live
   at kiinsocial.com, on white. Near-black carries the type, teal the
   structure (labels, markers, rules), magenta the logo, buttons and links.
   Images: a black-and-cream stencil illustration, and Unsplash photos in
   black and white. Every colour and size lives in :root.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../assets/fonts/archivo-variable-latin.woff2") format("woff2");
  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;
}

:root {
  color-scheme: light;

  /* Brand */
  --kiin-magenta:      #C8006A;  /* brighter magenta, matches assets/kiin-logo.svg */
  --kiin-magenta-dark: #A3004F;  /* button hover */

  /* Roles */
  --bg:          #FFFFFF;
  --accent:      var(--kiin-magenta);  /* logo, buttons, links */
  --teal:        #1A6E7E;        /* headings, labels, markers, rules */
  --on-accent:   #FFFFFF;
  --text:        #0A0A0A;        /* one black for all text */
  --text-strong: #0A0A0A;
  --text-muted:  #0A0A0A;
  --line:        #E8DEE3;        /* hairlines between bands and items */
  --input-line:  #9C8D95;        /* form borders: 3:1 against white */
  --error-bg:    #FDEDEF;
  --error-text:  #9B0A1F;

  --font-sans:    "Archivo", Arial, Helvetica, sans-serif;
  /* One family throughout: the display voice comes from Archivo's width and
     weight axes, not a second typeface. */
  --font-display: "Archivo", Arial, Helvetica, sans-serif;

  --text-xs:  0.8125rem;
  --text-sm:  0.875rem;
  --text-base: 1.0625rem;
  --text-lg:  1.25rem;
  --text-xl:  clamp(1.375rem, 1.25rem + 0.5vw, 1.5625rem);
  --text-2xl: clamp(1.625rem, 1.4rem + 1vw, 1.9375rem);
  --display-sm: clamp(2.25rem, 1.6rem + 2.8vw, 3.25rem);
  --display-md: clamp(2.75rem, 1.8rem + 4.2vw, 4.5rem);
  --figure:     clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --measure-container: 1140px;
  --measure-narrow: 640px;

  --radius-sm: 10px;

  --duration: 180ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);

  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
  --tap-target: 44px;
  --control-height: 52px;
  --rule: 1px solid var(--line);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; text-wrap: balance; }

p, ul, ol { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--kiin-magenta-dark); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.container {
  width: 100%;
  max-width: var(--measure-container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

.hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: var(--space-2); left: var(--space-2); z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--bg); border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--duration) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---- Bands: every section ruled top and bottom -------------------------- */

.slab {
  border-top: var(--rule);
  padding-block: var(--space-16);
}

.slab:last-of-type { border-bottom: var(--rule); }

@media (min-width: 768px) {
  .slab { padding-block: var(--space-24); }
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 112%;          /* the wide cut is the display voice */
  font-size: var(--display-md);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--teal);
}

.display-sm { font-size: var(--display-sm); }

.eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-6);
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 54ch;
  margin-top: var(--space-6);
}

.lede-quiet { color: var(--text-muted); }

.body-paper { color: var(--text-strong); }

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  padding-block: var(--space-4);
}

.masthead .container {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.wordmark img { width: var(--logo-w); }

@media (min-width: 768px) {
}

/* The brand line is set to the exact width of the wordmark above it. */
.brand { --logo-w: 92px; width: var(--logo-w); }

@media (min-width: 768px) {
  .brand { --logo-w: 112px; }
}

.brand-tagline {
  color: var(--text-strong);
  font-size: calc(var(--logo-w) * 0.098);  /* measured: text width = logo width */
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.masthead nav {
  display: flex; align-items: center; gap: var(--space-4);
}

.masthead nav a:not(.btn) {
  display: none;
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 500;
  min-height: var(--tap-target);
  align-items: center;
}

.masthead nav a:not(.btn):hover,
.masthead nav a[aria-current="page"] { color: var(--accent); }

@media (min-width: 768px) {
  .masthead nav a:not(.btn) { display: inline-flex; }
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--control-height);
  padding: var(--space-3) var(--space-6);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--kiin-magenta-dark); border-color: var(--kiin-magenta-dark); color: var(--on-accent);
}

.btn-primary:disabled { opacity: 0.7; cursor: progress; }

.btn-ghost {
  background: transparent; border-color: var(--accent); color: var(--accent);
}

.btn-ghost:hover { background: var(--accent); color: var(--on-accent); }

.btn-sm { min-height: var(--tap-target); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }

/* ---- Hero -------------------------------------------------------------- */

.hero { padding-block: var(--space-12) var(--space-16); }

@media (min-width: 900px) {
  .hero { padding-block: var(--space-16) var(--space-24); }
}

/* The tagline is a full sentence, not three words: it takes the smaller
   display step and a wider column so it holds together. */
.hero h1 { font-size: var(--display-sm); max-width: 20ch; }

.hero-sub {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--text-strong);
}




/* Home: the headline beside the retro stencil illustration. */
@media (min-width: 900px) {
  .hero .container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--space-12); align-items: center; }
}

.hero-art { margin: var(--space-12) 0 0; }

.hero-art img { width: auto; max-width: 100%; max-height: 480px; margin-inline: auto; }  /* about the size the deck boy sat at */

@media (min-width: 900px) { .hero-art { margin: 0; } }

/* The moment: the problem text with the server room beside it. */
.problem { display: grid; gap: var(--space-8); margin-top: var(--space-8); }

@media (min-width: 900px) {
  .problem { grid-template-columns: 6fr 5fr; column-gap: var(--space-12); align-items: start; }
}

.problem .lede:first-child { margin-top: 0; }

.problem-art { margin: 0; }

.problem-art img { width: 100%; }

/* The market: text beside a black-and-white photo. */
.with-art { display: grid; gap: var(--space-8); }

@media (min-width: 900px) {
  .with-art { grid-template-columns: 7fr 5fr; column-gap: var(--space-12); align-items: center; }
}

.art { margin: 0; }

.art img { width: 100%; }

.art-tall img { width: auto; max-width: 100%; max-height: 480px; margin-inline: auto; }
.hero-actions {
  margin-top: var(--space-8);
  display: flex; flex-wrap: wrap; gap: var(--space-3);
}

/* ---- Evidence strip (The moment) --------------------------------------- */

.evidence {
  list-style: none; margin: var(--space-12) 0 0; padding: 0;
  display: grid; gap: var(--space-8);
}

@media (min-width: 768px) {
  .evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); }
}

.evidence li { border-top: 1px solid var(--teal); padding-top: var(--space-4); }

.evidence .figure {
  display: block;
  font-family: var(--font-display);
  font-size: var(--figure);
  line-height: 1;
  color: var(--text-strong);
}

.evidence p { margin-top: var(--space-3); max-width: 38ch; }

.pull {
  margin: var(--space-16) 0 0;
  border-left: 4px solid var(--teal);
  padding-left: var(--space-6);
  max-width: 44ch;
}

.pull q {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.25;
  color: var(--text-strong);
  quotes: "\201C" "\201D";
}

.pull cite {
  display: block; margin-top: var(--space-3);
  font-style: normal; font-size: var(--text-sm); color: var(--teal);
}

/* ---- Two-column argument ------------------------------------------------ */

.split { display: grid; gap: var(--space-8); }

@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; column-gap: var(--space-16); }
}

.stall {
  list-style: none; margin: var(--space-8) 0 0; padding: 0;
  display: grid; gap: var(--space-6);
}

.stall li {
  border-left: 4px solid var(--teal);
  padding-left: var(--space-6);
  max-width: 56ch;
}

.stall b { display: block; font-weight: 600; color: var(--text-strong); }

/* ---- Three columns, no boxes (The market) ------------------------------ */

.trio {
  list-style: none; margin: var(--space-12) 0 0; padding: 0;
  display: grid; gap: var(--space-8);
}

@media (min-width: 768px) {
  .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12); }
}

.trio h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-strong);
  padding-top: var(--space-4);
  border-top: 1px solid var(--teal);
}

.trio p { margin-top: var(--space-4); max-width: 34ch; }

/* ---- Waitlist ----------------------------------------------------------- */


/* Waitlist: the form beside the photo album. */
.join-grid { display: grid; gap: var(--space-12); }

@media (min-width: 900px) {
  .join-grid { grid-template-columns: 1.2fr 0.8fr; align-items: center; column-gap: var(--space-16); }
}

.join-art { margin: 0; }

.join-art img { width: 100%; }
.join .display { max-width: 14ch; }

.waitlist { margin-top: var(--space-12); max-width: var(--measure-narrow); }

.waitlist-fields { display: grid; gap: var(--space-4); }

.waitlist-pair { display: grid; gap: var(--space-4); }

@media (min-width: 768px) {
  .waitlist-pair { grid-template-columns: 1fr 1fr; }
  .waitlist-fields .btn { justify-self: start; }
}

label {
  display: block; font-weight: 500; margin-bottom: var(--space-2);
  font-size: var(--text-sm); letter-spacing: 0.02em;
  color: var(--text-strong);
}

.input {
  display: block; width: 100%;
  min-height: var(--control-height);
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  color: var(--text-strong);
  border: 1.5px solid var(--input-line);
  border-radius: var(--radius-sm);
  font: inherit; line-height: 1.2;
  transition: border-color var(--duration) var(--ease);
}

.input:hover { border-color: var(--accent); }
.input:focus-visible { border-color: var(--accent); box-shadow: var(--focus-ring); }

/* Colour is never the only signal: the icon and the text carry it too. */
.field-error {
  display: none;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--error-bg);
  color: var(--error-text);
  border-left: 3px solid var(--error-text);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  max-width: var(--measure-narrow);
}

.field-error[data-visible="true"] { display: flex; }

.field-error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---- Contact ------------------------------------------------------------- */

.contact-email {
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-size: var(--display-sm);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.contact-email a {
  color: var(--text-strong);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.contact-email a:hover { color: var(--accent); }

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