/* ─── FONTS ──────────────────────────────────── */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Commit Mono";
  src: url("fonts/commit-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Commit Mono";
  src: url("fonts/commit-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── TOKENS ─────────────────────────────────── */

:root {
  --bg:           #F2EDE3;
  --bg-tint:      #ECE6D9;
  --bg-card:      #E9E3D5;
  --fg:           #1C1A17;
  --fg-muted:     #6B655B;
  --fg-quiet:     #948C7E;
  --accent:       #A85A38;
  --accent-deep:  #8B4830;
  --accent-soft:  rgba(168, 90, 56, 0.08);
  --rule:         #E0D9CB;
  --rule-strong:  #CCC4B3;

  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-mono:  "Commit Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, monospace;

  --width:        720px;
  --width-chrome: 1040px;
  --pad:          clamp(1.25rem, 4vw, 3rem);

  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1.0625rem;
  --fs-md:   1.1875rem;
  --fs-lg:   1.375rem;
  --fs-xl:   2rem;
  --fs-2xl:  2.625rem;

  --lh-tight: 1.15;
  --lh-snug:  1.45;
  --lh-prose: 1.6;

  --track:       0.08em;
  --track-tight: 0.04em;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  line-height: var(--lh-prose);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

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

/* ─── PAGE FRAME + STAMP ─────────────────────── */

.page-frame {
  position: fixed;
  top: clamp(0.75rem, 1.5vw, 1.5rem);
  right: clamp(0.75rem, 1.5vw, 1.5rem);
  bottom: clamp(0.75rem, 1.5vw, 1.5rem);
  left: clamp(0.75rem, 1.5vw, 1.5rem);
  border: 1px solid var(--rule-strong);
  pointer-events: none;
  z-index: 10;
}

.page-stamp {
  position: fixed;
  left: clamp(0.75rem, 1.5vw, 1.5rem);
  top: 0;
  bottom: 0;
  width: clamp(2rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 11;
}

.page-stamp span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
  transform: rotate(-90deg);
  transform-origin: center;
}

@media (max-width: 900px) {
  .page-frame { display: none; }
  .page-stamp { display: none; }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

main a {
  color: var(--fg);
  border-bottom: 1px solid var(--rule-strong);
}

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

main a:hover {
  border-bottom-color: var(--accent);
}

em {
  font-style: italic;
}

strong {
  font-weight: 600;
  color: var(--fg);
}

/* mono utility, used by chrome elements throughout */

.mono,
.site-header,
.anchor-nav,
.cta,
.block-marker,
.components,
.mode h3,
.mode .duration,
.site-footer .footer-line {
  font-family: var(--font-mono);
}

/* ─── HEADER ─────────────────────────────────── */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem var(--pad);
  max-width: var(--width-chrome);
  margin: 0 auto;
  font-size: var(--fs-xs);
  letter-spacing: var(--track-tight);
}

.brand {
  font-weight: 400;
  color: var(--fg);
  border: 0;
  font-size: var(--fs-sm);
  letter-spacing: var(--track-tight);
}

.brand::before {
  content: "▍ ";
  color: var(--accent);
  margin-right: 0.05em;
}

.anchor-nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: var(--track);
}

.anchor-nav a {
  color: var(--fg-muted);
  border: 0;
}

.anchor-nav a:hover {
  color: var(--fg);
}

.contact {
  color: var(--fg);
  border: 0;
  white-space: nowrap;
  font-size: var(--fs-sm);
  letter-spacing: var(--track-tight);
}

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

/* ─── HERO ───────────────────────────────────── */

.hero {
  padding: 5.5rem var(--pad) 4rem;
  max-width: var(--width-chrome);
  margin: 0 auto;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: -0.012em;
  margin: 0 0 2rem;
  color: var(--fg);
}

.caret {
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.12em;
  vertical-align: -0.05em;
  animation: blink 0.85s steps(1, end) infinite;
}

.caret.stopped {
  animation: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero .sub,
.hero .audience {
  margin: 0 0 1rem;
  font-size: var(--fs-md);
  color: var(--fg);
  line-height: 1.55;
}

.hero .audience em {
  font-style: italic;
}

.hero .hook {
  margin: 2.5rem 0 1.75rem;
  color: var(--fg-muted);
  font-style: italic;
}

.hero .cta {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.65em 1em 0.7em;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--rule-strong);
  font-size: var(--fs-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.hero .cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ─── FEATURE BAND ───────────────────────────── */

.feature {
  display: block;
  background: #0E0F10;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  margin: clamp(1rem, 3vw, 2.5rem) 0;
}

.feature-inner {
  max-width: var(--width-chrome);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  justify-content: center;
}

.feature img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
}

/* ─── BLOCK / SECTION ────────────────────────── */

.block {
  padding: 4rem var(--pad);
  max-width: var(--width-chrome);
  margin: 0 auto;
}

.block-body {
  max-width: none;
}

.block-marker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 2.5rem;
  font-size: clamp(1.125rem, 2.8vw, 1.65rem);
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.block-marker.in-view {
  opacity: 1;
  transform: translateY(0);
}

.block-marker .rule {
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}

.block-marker .label {
  white-space: nowrap;
  color: var(--fg);
}

.block-marker::before,
.block-marker::after {
  content: "+";
  white-space: nowrap;
  color: var(--fg);
}

.block-body p {
  margin: 0 0 1.25rem;
}

.block-body p.lead {
  font-size: var(--fs-md);
  margin-bottom: 1.5rem;
  color: var(--fg);
  line-height: 1.55;
}

.block-body p.muted {
  color: var(--fg-muted);
}

.block-body p.closing {
  margin-top: 2rem;
}

/* ─── COMPONENTS LIST (§ 01) ────────────────── */

.components {
  list-style: none;
  padding: 0;
  margin: 3.5rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1.75rem;
}

@media (min-width: 540px) {
  .components { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .components { grid-template-columns: repeat(3, 1fr); }
}

.component {
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 0.5rem;
  text-align: center;
  justify-items: center;
}

.component .glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
}

.component .glyph img {
  display: block;
  height: 96px;
  width: auto;
  max-width: 100%;
}

.component .name {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
  color: var(--fg);
}

.component .role {
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: var(--lh-snug);
  margin: 0;
  max-width: 40ch;
}

/* ─── MODES (§ 02) ───────────────────────────── */

.modes {
  display: grid;
  gap: 2.5rem;
  margin: 2.5rem 0 0;
}

@media (min-width: 720px) {
  .modes {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.mode {
  position: relative;
  padding: 1.5rem;
  border: 1px solid #000000;
  background: #0E0F10;
  color: #FFFFFF;
  --cross: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 1v12M1 7h12' stroke='%23000000' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}

.mode::before {
  content: "";
  position: absolute;
  inset: -7px;
  pointer-events: none;
  background:
    var(--cross) left top / 14px 14px no-repeat,
    var(--cross) right top / 14px 14px no-repeat,
    var(--cross) left bottom / 14px 14px no-repeat,
    var(--cross) right bottom / 14px 14px no-repeat;
}

.mode h3 {
  margin: 0 0 1rem;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: #FFFFFF;
}

.mode p {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  line-height: 1.65;
  max-width: none;
}

.mode .duration {
  font-size: var(--fs-xs);
  letter-spacing: var(--track-tight);
  color: rgba(242, 237, 227, 0.55);
  margin: 0;
  font-style: normal;
}

/* ─── FOUNDER CARD (§ 03) ────────────────────── */

.founder-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid #000000;
  margin-top: 1.5rem;
  --cross: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 1v12M1 7h12' stroke='%23000000' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}

.founder-card::before {
  content: "";
  position: absolute;
  inset: -7px;
  pointer-events: none;
  background:
    var(--cross) left top / 14px 14px no-repeat,
    var(--cross) right top / 14px 14px no-repeat,
    var(--cross) left bottom / 14px 14px no-repeat,
    var(--cross) right bottom / 14px 14px no-repeat;
}

.founder-photo {
  width: 180px;
  height: 180px;
}

.founder-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
}

.founder-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.founder-content p {
  margin: 0;
}

.founder-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-tight);
}

@media (max-width: 600px) {
  .founder-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .founder-photo {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }
  .founder-links {
    justify-content: center;
  }
}

/* ─── PULL QUOTE ─────────────────────────────── */

.pullquote {
  max-width: var(--width-chrome);
  margin: 0 auto;
  padding: 5rem var(--pad) 5rem;
  display: block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.pullquote.in-view {
  opacity: 1;
  transform: translateY(0);
}

.pullquote-mark {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.pullquote blockquote {
  margin: 0;
  padding: 0;
  max-width: 760px;
}

.pullquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--fg);
  margin: 0;
}

.pullquote .pullquote-context {
  font-style: normal;
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--fg-muted);
  letter-spacing: 0;
  max-width: 760px;
  margin: 1.75rem 0 0;
}

@media (max-width: 600px) {
  .pullquote { padding: 3rem var(--pad); }
}

/* ─── FOOTER ─────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--rule-strong);
  margin-top: 4rem;
  padding: 2rem var(--pad) 4rem;
}

.footer-line {
  max-width: var(--width-chrome);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-xs);
  letter-spacing: var(--track-tight);
  color: var(--fg-muted);
}

.footer-line a {
  color: var(--fg-muted);
  border: 0;
}

.footer-line a:hover {
  color: var(--accent);
}

/* ─── MOBILE ─────────────────────────────────── */

@media (max-width: 600px) {
  :root {
    --fs-base: 1rem;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .anchor-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 1.25rem;
    padding-top: 0.25rem;
  }

  .hero {
    padding: 3.5rem var(--pad) 2.5rem;
  }

  .block {
    padding: 2.5rem var(--pad);
  }

  .block-marker {
    margin-bottom: 2rem;
  }
}

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