/*
 * styles.css — the whole stylesheet for ultraniche.ai. No build step.
 *
 * Tokens on :root; the Titan band is dark on purpose in both themes, so
 * the open tiles read as lit. Breakpoint: 760px turns the five-column
 * grid of tiles into two columns, in the same order and the same size.
 */

:root {
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --ink: #14171A;
  --ink-2: #4B5563;
  --line: #D9DDE3;
  --night: #10131C;
  --night-2: #171B26;
  --night-3: #1B1F2C;
  --night-line: #2A3040;
  --night-ink: #F4F6FA;
  --night-ink-2: #C9CFDA;
  --night-ink-3: #8A93A6;
  --night-num: #7C86A0;
  --lit: #F5B83D;
  --radius: 12px;
  --radius-control: 8px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem / 1.5 var(--font);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p { margin: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lit); outline-offset: 2px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* Header */

.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.header__brand { display: flex; align-items: center; gap: 28px; }
.header__tagline { font-size: 14px; color: var(--ink-2); }
.wordmark { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
nav { display: flex; gap: 4px; }
.nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-control); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-link:hover { background: #E9EBF0; }

/* Hero */

.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px 64px; padding-top: 64px; padding-bottom: 64px; }
.hero__main { flex: 1 1 560px; display: flex; flex-direction: column; gap: 20px; }
.hero__aside { flex: 0 1 280px; display: flex; flex-direction: column; gap: 20px; padding-left: 28px; border-left: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 1.6; letter-spacing: 0.02em; color: var(--ink-2); }
.hero__aside p:first-child { text-transform: uppercase; letter-spacing: 0.08em; }
.hero__rule { width: 16px; height: 1px; background: var(--ink-2); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.hero h1 { font-size: 60px; line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; max-width: 760px; }
.hero__lead { font-size: 21px; line-height: 1.45; color: var(--ink-2); max-width: 620px; }

/* Buttons */

.btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-control); color: #FFFFFF; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn--dark { background: var(--ink); min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn--outline { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); min-height: 48px; padding: 0 22px; font-size: 16px; font-weight: 600; }
.btn--quiet { color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.btn:hover { filter: brightness(1.08); }
.btn--outline:hover, .btn--quiet:hover { background: #EEF0F3; filter: none; }

/* Titan band */

.titan { background: var(--night); color: var(--night-ink); padding: 72px 40px; }
.titan__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.titan__head { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.titan__title { display: flex; flex-direction: column; gap: 12px; flex: 1 1 520px; max-width: 600px; }
.titan__lead { font-size: 18px; line-height: 1.5; color: var(--night-ink-2); }
.titan h2 { font-size: 42px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lit); }

.progress { display: flex; flex-direction: column; gap: 10px; width: 280px; max-width: 100%; padding-top: 28px; }
.progress__count { font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.progress__next { font-family: var(--mono); font-size: 12px; color: var(--night-ink-2); }
.progress__bar { display: flex; gap: 4px; }
.seg { flex: 1; height: 6px; border-radius: 3px; background: var(--night-line); }
.seg--open { background: var(--lit); }
.seg--next { background: var(--night-ink-3); }

.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }


/* Tiles */

.tile { min-height: 200px; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tile__row { align-self: stretch; display: flex; justify-content: space-between; align-items: center; min-height: 22px; }
.tile__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--night-ink-3); }
.tile--open .tile__label { color: #0B7A4B; }
.tile__num { font-family: var(--mono); font-size: 13px; }

.tile--sealed { background: var(--night-2); border: 1px solid var(--night-line); color: var(--night-ink-2); min-height: 160px; }
.tile__locked { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: var(--mono); font-size: 13px; }
.tile__locked .lock { width: 24px; height: 24px; }

.tile--next { background: var(--night-3); border: 1px solid var(--lit); box-shadow: 0 0 0 4px rgba(245, 184, 61, 0.14), 0 12px 40px rgba(245, 184, 61, 0.10); }
.tile--next .tile__num { color: var(--lit); }
.pill { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--lit); color: var(--night); padding: 3px 9px; border-radius: 999px; }
.tile--shown { background: var(--night-2); border: 1px solid var(--night-line); }
.tile--shown .tile__num { color: var(--night-ink-3); }
.tile__foot { margin-top: auto; font-family: var(--mono); font-size: 13px; color: var(--night-ink-3); }
.tile--next .tile__foot { color: var(--night-ink-2); }
.tile__link { margin-top: auto; display: flex; align-items: center; min-height: 32px; font-family: var(--mono); font-size: 13px; font-weight: 500; text-decoration: none; }
.tile__link::after { content: "→"; padding-left: 6px; }
.tile__link:hover { text-decoration: underline; text-underline-offset: 3px; }

.tile--open { background: var(--card); color: var(--ink); }
.tile--open .tile__num { color: var(--ink-2); }
.tile__text { display: flex; flex-direction: column; gap: 4px; }
.tile__text h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.tile__text p { font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--night-ink-2); }
.tile--open .tile__text p { font-family: var(--font); font-size: 14px; color: var(--ink-2); }

.icon { display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-weight: 800; flex: none; }
.icon--md { width: 44px; height: 44px; border-radius: 12px; font-size: 21px; }
.icon--lg { width: 68px; height: 68px; border-radius: 18px; font-size: 32px; }
img.icon { border-radius: 22%; }


/* Sections */

.section { display: flex; flex-direction: column; gap: 28px; padding-top: 80px; padding-bottom: 80px; }
.section h2 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.section__head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.section__head p { font-size: 18px; color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 20px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card p { font-size: 16px; color: var(--ink-2); }
.card__step { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* Link to the Project Titan post, in the Titan band */

.titan__why { align-self: flex-start; display: flex; align-items: center; min-height: 44px; color: var(--lit); font-family: var(--mono); font-weight: 500; font-size: 14px; text-decoration: none; }
.titan__why:hover { text-decoration: underline; text-underline-offset: 4px; }
.titan__why::after { content: "→"; padding-left: 8px; }
.titan__why:hover { color: var(--night-ink); }

/* Post: one reading column */

.post { max-width: 680px; margin: 0 auto; padding-top: 56px; padding-bottom: 88px; font-size: 18px; line-height: 1.65; }
.post__head { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.post__eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.post h1 { font-size: 48px; line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; }
.post__lead { font-size: 22px; line-height: 1.45; color: var(--ink-2); }
.post h2 { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; padding-top: 40px; padding-bottom: 12px; }
.post p + p { padding-top: 16px; }
.post ul { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.post li { position: relative; padding-left: 22px; }
.post li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 8px; height: 8px; border-radius: 2px; background: var(--lit); }
.post__quote { margin: 24px 0; padding: 20px 24px; border-radius: var(--radius); background: var(--night); color: var(--night-ink); font-size: 21px; line-height: 1.45; font-weight: 600; }
.post__end { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 40px; }
.post__app { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 800; }
.post__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.post__figure { margin: 32px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.post__figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.post__figure figcaption { font-size: 14px; color: var(--ink-2); }

/* Footer */

.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--ink-2); }
.footer__name { font-weight: 700; color: var(--ink); }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--ink); text-decoration: underline; }

/* Phone */

@media (max-width: 760px) {
  .progress { padding-top: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .titan h2 { font-size: 28px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 14px; }
}

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .titan { padding: 48px 16px; }
  .hero { padding-top: 40px; padding-bottom: 48px; }
  .hero h1 { font-size: 38px; }
  .header__tagline { display: none; }
  .hero__lead { font-size: 18px; }
  .section h2 { font-size: 26px; }
  .hide-sm { display: none; }
  .post { padding-top: 32px; font-size: 17px; }
  .post h1 { font-size: 36px; }
  .post__lead { font-size: 19px; }
  .post h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav-link { transition: background-color 120ms, border-color 120ms, filter 120ms; }
}
