/* ===========================================================
   crypter.ch — site-specific styles
   Layered on top of tokens.css + kit.css.
   =========================================================== */

body { background: var(--paper-50); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-hero) var(--ease), transform var(--dur-hero) var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay:  80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Nav: scroll shadow ---------- */
.nav.is-scrolled {
  box-shadow: 0 1px 0 var(--paper-200), 0 6px 24px -16px rgba(20,19,15,0.16);
}

/* ---------- Hero augmentation ---------- */
.hero { padding: 128px 0 96px; overflow: hidden; }
.hero h1 em { color: var(--ink-900); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--paper-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-200) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: 50% 0;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 75%);
}
.hero .layout { position: relative; z-index: 1; }
.hero-grid { gap: 64px; }

.hero-runtime {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 32px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.hero-runtime .lead { color: var(--ink-900); }
.hero-runtime .sep  { color: var(--ink-300); }

.hero-meta-block .lbl {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
  margin-bottom: 8px;
}
.hero-meta-block .num {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  color: var(--ink-900);
}
.hero-meta-block .num small {
  font-size: 14px; color: var(--ink-500); font-weight: 500; margin-left: 8px;
}

.hero-cursor {
  display: inline-block;
  width: 0.55em; height: 0.8em;
  background: var(--accent-c);
  margin-left: 0.05em; vertical-align: -0.06em;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-glyph {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0; line-height: 1.15;
  color: var(--ink-300);
  white-space: pre;
  user-select: none;
  margin-top: 12px;
}

/* Three-CTA hero strip */
.hero-cta-strip {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--paper-200);
  border-left: 1px solid var(--paper-200);
}
.hero-cta-cell {
  border-right: 1px solid var(--paper-200);
  border-bottom: 1px solid var(--paper-200);
  padding: 22px 24px;
  background: transparent;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background var(--dur-default) var(--ease);
}
.hero-cta-cell:hover { background: var(--paper-100); }
.hero-cta-cell .lbl {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
  display: flex; justify-content: space-between; align-items: center;
}
.hero-cta-cell .ttl {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink-900); line-height: 1.15;
}
.hero-cta-cell .ttl em { font-family: var(--font-italic); font-style: italic; font-weight: 400; }
.hero-cta-cell .desc { font-size: 13px; color: var(--ink-500); line-height: 1.45; margin-top: auto; }

/* ============================================================
   PRODUCTS — the new flagship section
   ============================================================ */
.products {
  background: var(--ink-900); color: var(--paper-50);
  border-bottom: 0;
  position: relative; overflow: hidden;
}
.products::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none; z-index: 0;
}
.products .layout { position: relative; z-index: 1; }
.products .section-num { color: var(--paper-300); }
.products .section-num strong { color: var(--paper-50); }
.products .section-title { color: var(--paper-50); }
.products .section-lede { color: var(--paper-200); }

.prod-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
}
.prod {
  background: var(--ink-900);
  display: grid;
  grid-template-rows: auto 280px auto;
  min-height: 680px;
  position: relative;
  text-decoration: none; color: inherit;
  transition: background var(--dur-default) var(--ease);
}
.prod:hover { background: #1a1915; }

.prod-head {
  padding: 32px 32px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.prod-mark { display: flex; align-items: center; gap: 12px; }
.prod-mark .mono {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-300);
}
.prod-mark .sub {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-50);
}

.prod-monogram {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; letter-spacing: -0.04em;
  font-family: var(--font-sans);
}
.prod-monogram.honey { background: #d99818; color: #1f1a10; }
.prod-monogram.iron  {
  background: rgba(255,255,255,0.06); color: oklch(0.78 0.16 62);
  border: 1px solid rgba(255,255,255,0.12);
}

.prod-status {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-300);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
}
.prod-status::before {
  content: ''; width: 6px; height: 6px;
  background: var(--meadow); border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(22,163,74,0.18);
  animation: ping 2.2s ease-in-out infinite;
}
@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22,163,74,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
}

.prod-stage {
  position: relative; overflow: hidden;
  margin: 24px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.prod-foot {
  padding: 24px 32px 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.prod-name {
  font-size: 32px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.05; color: var(--paper-50);
}
.prod-name .tld { color: var(--paper-300); font-weight: 400; }
.prod-tag {
  font-size: 15px; color: var(--paper-200); line-height: 1.45; max-width: 46ch;
}
.prod-tag em     { font-family: var(--font-italic); font-style: italic; }
.prod-tag strong { color: var(--paper-50); font-weight: 600; }

/* Product feature list — pulled from the actual product surface */
.prod-feats {
  list-style: none; padding: 0; margin: 4px 0 4px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
}
.prod-feats li {
  font-size: 13px; line-height: 1.5; color: var(--paper-100);
  padding-left: 18px; position: relative;
}
.prod-feats li::before {
  content: '+'; position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--paper-300);
}
.prod-feats .k {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper-50);
  padding: 1px 6px; margin-right: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  vertical-align: 1px;
}
.prod-melli .prod-feats .k {
  color: #f0b94a; border-color: rgba(217,152,24,0.32);
  background: rgba(217,152,24,0.08);
}
.prod-p2 .prod-feats .k {
  color: oklch(0.82 0.16 62); border-color: rgba(255,160,80,0.32);
  background: rgba(255,160,80,0.08);
}

.prod-meta-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-300);
}
.prod-meta-row .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-meta-row .chip {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--paper-200);
}
.prod-arrow {
  color: var(--paper-50);
  transition: transform var(--dur-default) var(--ease);
}
.prod:hover .prod-arrow { transform: translate(3px, -3px); }

.products-foot {
  margin-top: 32px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.products-foot .note {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-300);
}

/* === Mellisense stage — honey/comb === */
.stage-melli {
  background:
    radial-gradient(120% 80% at 80% 30%, rgba(217,152,24,0.16), transparent 60%),
    radial-gradient(80% 60% at 20% 90%, rgba(217,152,24,0.10), transparent 70%),
    #14130F;
}
.stage-melli .combs {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 0;
  padding: 20px; opacity: 0.55;
}
.hex {
  position: relative;
  aspect-ratio: 1 / 1.155;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: rgba(217,152,24,0.06);
  border: 0;
}
.hex.fill  { background: linear-gradient(180deg, #d99818, #b6791a); }
.hex.fill2 { background: linear-gradient(180deg, #f0b94a, #d99818); }
.hex.line  { background: transparent; outline: 1px solid rgba(217,152,24,0.22); outline-offset: -2px; }

.stage-melli .melli-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.melli-card {
  background: #FAF7F1; color: var(--ink-900);
  padding: 14px 18px; width: min(82%, 320px);
  border: 1px solid var(--paper-200);
}
.melli-card .row1 {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500);
  margin-bottom: 6px;
}
.melli-card .row1 .dot {
  width: 6px; height: 6px; background: #d99818;
  border-radius: 999px; margin-right: 6px; display: inline-block;
}
.melli-card .ttl {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-900);
}
.melli-card .ttl em { font-family: var(--font-italic); font-style: italic; font-weight: 400; }
.melli-card .bd { font-size: 12px; color: var(--ink-700); line-height: 1.4; margin-top: 4px; }

/* === P2Print stage — blueprint isometric === */
.stage-p2 {
  background: radial-gradient(140% 80% at 50% 50%, #0c0d10, #08090b 80%);
  position: relative;
}
.stage-p2::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 16px 16px;
}
.stage-p2 svg.iso {
  position: absolute; inset: 0; margin: auto;
  width: 80%; height: 80%; display: block;
}
.stage-p2 .ticker {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.stage-p2 .ticker .dot { color: oklch(0.78 0.16 62); }
.stage-p2 .head-tag {
  position: absolute; left: 16px; top: 14px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.stage-p2 .head-tag::before { content: '['; color: rgba(255,255,255,0.3); margin-right: 4px; }
.stage-p2 .head-tag::after  { content: ']'; color: rgba(255,255,255,0.3); margin-left:  4px; }

/* ============================================================
   CHANNELS — compact strip (deliberately de-emphasised)
   ============================================================ */
#channels { background: var(--paper-100); }

.section-compact { padding: 56px 0; }
.section-head-compact {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; gap: 24px; flex-wrap: wrap;
}
.section-head-compact .section-head-l { display: flex; align-items: baseline; gap: 16px; }
.section-title-sm {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.1; color: var(--ink-900); margin: 0;
}
.section-lede-sm {
  margin: 0; max-width: 360px;
  font-size: 13px; line-height: 1.5; color: var(--ink-500);
  text-align: right;
}

.ch-strip {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  border-top: 1px solid var(--paper-300);
  border-left: 1px solid var(--paper-300);
}
.ch-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-right: 1px solid var(--paper-300);
  border-bottom: 1px solid var(--paper-300);
  background: var(--paper-50);
  text-decoration: none; color: var(--ink-900);
  transition: background var(--dur-default) var(--ease);
}
.ch-row:hover { background: #fff; }
.ch-mark-sm {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: -0.04em;
}
.ch-mark-sm.red  { background: var(--signal-red);   color: #fff; }
.ch-mark-sm.ink  { background: var(--ink-900);      color: var(--paper-50); }
.ch-mark-sm.lime { background: var(--digital-lime); color: var(--ink-900); }
.ch-row-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink-900);
  grid-column: 2; grid-row: 1;
}
.ch-row-desc {
  font-size: 12px; line-height: 1.4; color: var(--ink-500);
  grid-column: 2; grid-row: 2;
}
.ch-row-meta {
  grid-column: 3; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
}

/* ---------- Responsive nudges ---------- */
@media (max-width: 960px) {
  .prod-grid       { grid-template-columns: 1fr; }
  .prod            { min-height: 600px; }
  .hero-cta-strip  { grid-template-columns: 1fr; }
  .hero            { padding: 80px 0 56px; }
  .hero-glyph      { display: none; }

  .ch-strip        { grid-template-columns: 1fr; }
  .section-head-compact { flex-direction: column; gap: 8px; align-items: flex-start; }
  .section-lede-sm { text-align: left; }
}

/* Small phones */
@media (max-width: 600px) {
  .hero            { padding: 56px 0 48px; }
  .hero-runtime    { font-size: 11px; gap: 8px; margin-bottom: 24px; }
  .hero-cta-strip  { margin-top: 40px; }
  .hero-cta-cell   { padding: 18px 20px; gap: 12px; }
  .hero-cta-cell .ttl  { font-size: 20px; }

  .prod            { min-height: 0; grid-template-rows: auto 240px auto; }
  .prod-head       { padding: 24px 20px 0; }
  .prod-foot       { padding: 20px 20px 24px; }
  .prod-name       { font-size: 28px; }
  .prod-stage      { margin-top: 20px; }
  .prod-meta-row   { flex-direction: column; align-items: flex-start; gap: 12px; }
  .prod-meta-row .prod-arrow { align-self: flex-end; margin-top: -28px; }

  .products-foot   { flex-direction: column; align-items: stretch; gap: 16px; }
  .products-foot .btn { justify-content: center; }

  /* Topic picker: stack as full-width buttons (much friendlier for thumbs) */
  .topic-picker    { flex-direction: column; }
  .topic-picker button {
    border-right: 0;
    border-bottom: 1px solid var(--paper-300);
    padding: 14px 16px;
    text-align: left;
    min-height: 48px;
  }
  .topic-picker button:last-child { border-bottom: 0; }

  /* About stats — keep 2 cols but reduce min-height + value size */
  .stat            { padding: 18px 16px; min-height: 110px; }
  .stat-value      { font-size: 40px; }

  /* Footer brand glyph trims down */
  .footer-brand .glyph { font-size: 44px; }
}

/* ---------- Legal pages — make processor table scrollable on phones ---------- */
@media (max-width: 600px) {
  .legal-page { padding: 56px 0 64px; }
  .legal-hero { margin-bottom: 40px; padding-bottom: 24px; }
  .legal-hero h1 { font-size: 32px; }
  .legal-body h2 { margin-top: 36px; padding-top: 24px; font-size: 20px; }
  .legal-body { overflow-x: auto; }
  .legal-body .addr { font-size: 13px; padding: 14px 16px; }
}

/* ============================================================
   LEGAL pages (privacy / imprint) — long-form, single column.
   ============================================================ */
.legal-page {
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--paper-200);
}
.legal-hero {
  max-width: 720px;
  margin: 0 auto 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--paper-300);
}
.legal-hero .t-meta { display: inline-block; margin-bottom: 20px; }
.legal-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0 0 24px;
  color: var(--ink-900);
  text-wrap: balance;
}
.legal-hero h1 em { font-family: var(--font-italic); font-style: italic; font-weight: 400; }
.legal-hero .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-700);
  text-wrap: pretty;
  margin: 0;
}

.legal-body { max-width: 720px; margin: 0 auto; }
.legal-body h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.25; color: var(--ink-900);
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--paper-200);
}
.legal-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-body h3 {
  font-size: 15px; font-weight: 600; color: var(--ink-900);
  margin: 28px 0 8px;
}
.legal-body p, .legal-body ul, .legal-body ol {
  font-size: 16px; line-height: 1.7; color: var(--ink-700);
  margin: 0 0 16px; text-wrap: pretty;
}
.legal-body ul, .legal-body ol { padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a {
  color: var(--accent-c); text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.legal-body strong { color: var(--ink-900); font-weight: 600; }
.legal-body em { font-style: italic; }
.legal-body code {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--paper-100); padding: 2px 6px;
}
.legal-body .addr {
  font-family: var(--font-mono); font-size: 14px;
  line-height: 1.6; color: var(--ink-900);
  background: var(--paper-100); border: 1px solid var(--paper-200);
  padding: 16px 20px; margin: 0 0 24px;
  white-space: pre;
  overflow-x: auto;
}
.legal-body table {
  width: 100%; border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 14px;
}
.legal-body th, .legal-body td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--paper-200);
  vertical-align: top;
  color: var(--ink-700);
}
.legal-body th {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 500;
  border-bottom: 1px solid var(--paper-300);
}

.legal-disclaimer {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--paper-100);
  border-left: 3px solid var(--accent-c);
  font-size: 13px; line-height: 1.55; color: var(--ink-500);
}
.legal-disclaimer strong { color: var(--ink-900); }

@media (max-width: 720px) {
  .legal-hero h1 { font-size: 36px; }
  .legal-body table { font-size: 13px; }
  .legal-body th, .legal-body td { padding: 8px 10px; }
}
