/* Qento.io — landing page styles. Extends tokens from colors_and_type.css */

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  transition: background var(--dur-normal) var(--ease-default),
              color var(--dur-normal) var(--ease-default);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }

:root {
  --col-max: 1200px;
  --col-reading: 720px;
  --page-pad: 80px;
}
@media (max-width: 900px) {
  :root { --page-pad: 40px; }
}
@media (max-width: 560px) {
  :root { --page-pad: 24px; }
}

.col {
  max-width: var(--col-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Reading column — the novel-width block used inside .col for prose */
.col-read { max-width: var(--col-reading); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg-page) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
}
.nav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent-gold); opacity: 0;
  transform-origin: center;
  transition: opacity 500ms 1000ms var(--ease-default);
}
body.is-loaded .nav::after { opacity: 0.55; }
body.is-scrolled .nav::after { opacity: 0.8; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-glyph { width: 20px; height: 20px; color: var(--text-primary); display: block; }
[data-theme="dark"] .brand-glyph { filter: invert(1); }
.brand-word {
  font-family: var(--font-serif);
  font-weight: 400; font-size: 20px; letter-spacing: -0.01em;
  color: var(--text-primary);
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-right a {
  font-family: var(--font-sans); font-size: 14px; color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-default), opacity var(--dur-fast);
}
.nav-right a:hover { color: var(--text-primary); opacity: 1; }
.theme-toggle {
  width: 28px; height: 28px; border-radius: 999px;
  background: transparent; border: 0;
  color: var(--text-tertiary); cursor: pointer;
  display: grid; place-items: center;
  transition: color var(--dur-fast);
}
.theme-toggle:hover { color: var(--text-primary); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 68px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 80px 100px;
}
.hero-h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  max-width: 960px;
  text-wrap: balance;
}
.hero-h1 em { font-style: italic; font-weight: 700; }
.hero-lede {
  font-family: var(--font-sans);
  font-size: 19px; line-height: 1.55;
  color: var(--text-secondary);
  opacity: 0.85;
  margin: 28px 0 0; max-width: 620px;
}
.hero-card-wrap { margin-top: 48px; }
.hero-cta-row {
  margin-top: 48px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.hero-campaign {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: #FFFFFF;
  background: #111111;
  margin: 0 0 28px;
  padding: 10px 20px;
  border: 1.5px solid color-mix(in srgb, var(--accent-gold) 70%, transparent);
  border-radius: 999px;
  box-shadow:
    0 0 3px color-mix(in srgb, var(--accent-gold) 90%, transparent),
    0 0 12px color-mix(in srgb, var(--accent-gold) 55%, transparent),
    0 0 24px color-mix(in srgb, var(--accent-gold) 25%, transparent);
  transition: transform var(--dur-fast) var(--ease-default),
              box-shadow var(--dur-fast) var(--ease-default);
}
.hero-campaign:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 4px color-mix(in srgb, var(--accent-gold) 100%, transparent),
    0 0 16px color-mix(in srgb, var(--accent-gold) 70%, transparent),
    0 0 32px color-mix(in srgb, var(--accent-gold) 35%, transparent);
}

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font-sans); font-weight: 700; font-size: 16px;
  color: #111; background: var(--accent-gold);
  padding: 16px 28px; border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease-default),
              box-shadow var(--dur-fast) var(--ease-default);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.btn:active { transform: translateY(0); }
.btn-link {
  font-family: var(--font-sans); font-size: 15px; color: var(--text-secondary);
  transition: color var(--dur-fast), opacity var(--dur-fast);
}
.btn-link:hover { color: var(--text-primary); opacity: 1; }

/* ── Story card (hero) ───────────────────────────────── */
.story-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 36px 26px;
  max-width: 720px;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.story-prose {
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px; line-height: 1.5;
  color: var(--text-primary); margin: 0;
}
.story-fade { opacity: 0.38; }
.accent-line {
  display: block; width: 56px; height: 1px;
  background: var(--accent-gold);
  border: 0; margin: 22px 0 14px;
}
.accent-line--sm { width: 40px; margin: 10px 0 14px; }
.overline {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-secondary);
}
.overline--gold { color: var(--text-gold); }
.overline svg { flex-shrink: 0; }

/* Cursor */
.cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.92em;
  background: var(--accent-gold);
  vertical-align: -0.08em;
  margin-left: 0.06em;
  animation: blink 1.2s steps(2, end) infinite;
  font-size: 0; line-height: 0;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Sections ─────────────────────────────────────────── */
.sec { padding-block: 60px; }
.sec-120 { padding-top: 120px; }
.sec-100 { padding-top: 100px; }
.sec-140 { padding-top: 140px; }

.sec-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08; letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}
.sec-title em { font-style: italic; font-weight: 700; }
.sec-title-40 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; }
.sec-title-32 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.sec-subhead {
  font-family: var(--font-sans);
  font-size: 17px; line-height: 1.6;
  color: var(--text-secondary);
  max-width: 620px; margin: 20px 0 0;
  text-wrap: pretty;
}
.sec-body-prose {
  font-family: var(--font-serif);
  font-size: 18px; line-height: 1.55;
  color: var(--text-primary);
  max-width: 640px; margin: 20px 0 0;
}
.overline-mt { margin-bottom: 8px; }

/* ── Section 2: Wound / Untethered feature card ──────── */
.soul-feature {
  display: flex; gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  max-width: 720px;
  margin-top: 40px;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.soul-portrait {
  width: 100px; height: 140px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-surface-secondary);
  object-fit: cover;
}
.soul-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.soul-psych { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.soul-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.soul-lbl {
  font-family: var(--font-sans); font-weight: 600; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary);
}
.soul-val {
  font-family: var(--font-serif); font-style: italic; font-size: 15px;
  color: var(--text-primary);
}
.soul-foot {
  margin-top: auto; padding-top: 16px;
  display: flex; align-items: center; gap: 10px;
}
.thumb-row { display: flex; }
.thumb-row img {
  width: 22px; height: 22px; border-radius: 999px;
  border: 1.5px solid var(--bg-card); margin-left: -6px; object-fit: cover;
}
.thumb-row img:first-child { margin-left: 0; }
.soul-foot-cap {
  font-family: var(--font-sans); font-size: 12px; color: var(--text-secondary);
}

/* ── Section 3: Eight souls grid ─────────────────────── */
.eight-title { margin-top: 8px; }
.eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 1100px) { .eight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .eight-grid { grid-template-columns: 1fr; gap: 16px; } }

.soul-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow var(--dur-normal) var(--ease-default),
              border-color var(--dur-normal) var(--ease-default),
              transform var(--dur-normal) var(--ease-default);
}
@media (hover: hover) {
  .soul-compact:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(243, 196, 61, 0.5);
    transform: translateY(-2px);
  }
}
.soul-compact .overline { color: var(--text-gold); }
.soul-compact-line {
  font-family: var(--font-serif); font-style: italic;
  font-size: 15px; line-height: 1.45;
  color: var(--text-primary); margin: 14px 0 16px;
}
.soul-compact-rows { display: flex; flex-direction: column; gap: 6px; }

/* ── Section 3.5: Six rooms / genres ─────────────────── */
.genre-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 20px; margin-top: 40px;
}
@media (max-width: 1100px) { .genre-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .genre-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .genre-grid { grid-template-columns: 1fr; } }

.genre-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color var(--dur-normal) var(--ease-default),
              color var(--dur-normal) var(--ease-default);
  color: var(--text-gold);
}
@media (hover: hover) {
  .genre-card:hover {
    border-color: rgba(243, 196, 61, 0.4);
  }
  .genre-card:hover .genre-icon { color: var(--accent-gold); }
}
.genre-icon {
  width: 28px; height: 28px;
  color: var(--text-gold);
  transition: color var(--dur-normal);
}
.genre-icon svg { width: 100%; height: 100%; }
.genre-name {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  color: var(--text-primary); margin-top: 14px;
}
.genre-line {
  font-family: var(--font-serif); font-style: italic; font-size: 14px;
  line-height: 1.45; color: var(--text-secondary); margin-top: 4px;
  text-wrap: pretty;
}

/* ── Section 4: Notepad card ─────────────────────────── */
.notepad {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 680px;
  margin-top: 40px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.np-block { padding: 24px 28px; }
.np-divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.np-protag { display: flex; align-items: center; gap: 14px; }
.np-protag img {
  width: 46px; height: 46px; border-radius: 999px; object-fit: cover;
  background: var(--bg-surface-secondary); border: 1px solid var(--border);
}
.np-name {
  font-family: var(--font-serif); font-weight: 700; font-size: 18px;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.np-role {
  font-family: var(--font-sans); font-weight: 600; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-gold);
  margin-top: 3px;
}
.np-threads { list-style: none; margin: 14px 0 0; padding: 0; }
.np-threads li {
  font-family: var(--font-sans); font-size: 13px;
  color: var(--text-primary);
  display: flex; gap: 10px; align-items: baseline;
  padding: 4px 0;
}
.np-threads li::before {
  content: ''; width: 4px; height: 4px; border-radius: 999px;
  background: var(--text-secondary); flex-shrink: 0; margin-top: 7px;
}
.np-threads em { font-style: italic; }
.np-inner {
  background: var(--bg-surface-secondary);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
}
.np-inner p {
  font-family: var(--font-serif); font-style: italic;
  font-size: 14px; line-height: 1.5;
  color: var(--text-primary); margin: 0;
}

/* ── Section 5: Kwento layers ─────────────────────────── */
.kwento-layers { margin-top: 56px; max-width: 680px; }
.kwento-layer {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.kwento-layers .kwento-layer:last-child { border-bottom: 1px solid var(--border); }
.kwento-layer-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--accent-gold);
}
.kwento-layer-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
@media (max-width: 560px) {
  .kwento-layer { grid-template-columns: 1fr; gap: 6px; }
}

/* ── Section 6: Diwa fragment ────────────────────────── */
.diwa {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 48px;
  margin-top: 40px;
  max-width: 680px;
  box-shadow: var(--shadow-card);
}
.diwa-direction {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 10px;
}
.diwa-line {
  font-family: var(--font-serif); font-size: 17px; line-height: 1.5;
  color: var(--text-primary); margin: 0;
}
.diwa-reader {
  text-align: right;
  font-family: var(--font-serif); font-style: italic;
  font-size: 15px; color: var(--text-gold);
  margin: 18px 0;
}
.diwa-gap { height: 8px; }

/* ── Section 7: Ghost whisper ────────────────────────── */
.whisper-body {
  font-family: var(--font-sans); font-size: 17px; line-height: 1.65;
  color: var(--text-secondary);
  margin: 24px 0 0; max-width: 560px;
  text-wrap: pretty;
}

/* ── Section 8.5: Letters (newsletter signup) ────────── */
.letters-form {
  margin: 40px auto 0;
  max-width: 560px;
}
.letters-form iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── Section 7.5: Achievement gallery ────────────────── */
.ach-body { max-width: 440px; }
.ach-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  column-gap: 20px; row-gap: 28px;
  margin-top: 40px;
  max-width: 820px;
}
@media (max-width: 900px) { .ach-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 720px) { .ach-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }
.ach-cell {
  aspect-ratio: 1/1;
  display: grid; place-items: center;
  color: var(--text-tertiary);
  opacity: 0.7;
  transition: color var(--dur-normal) var(--ease-default),
              opacity var(--dur-normal) var(--ease-default);
}
.ach-cell svg, .ach-cell img { width: 32px; height: 32px; display: block; }
@media (hover: hover) {
  .ach-cell:hover { color: var(--text-gold); opacity: 1; }
}
.ach-caption {
  font-family: var(--font-sans); font-style: italic;
  font-size: 12px; color: var(--text-tertiary);
  margin-top: 28px; text-align: right;
  max-width: 820px;
}

/* ── Section 8: Close ────────────────────────────────── */
.close-h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(52px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0;
  max-width: 900px;
  text-wrap: balance;
}
.close-h1 em { font-style: italic; font-weight: 700; }
.close-meta {
  font-family: var(--font-sans); font-size: 13px;
  color: var(--text-tertiary); margin: 16px 0 0;
}
.founding-cta {
  margin-top: 80px;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-block: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  font-family: var(--font-sans);
  font-size: 13px; line-height: 1.55;
  color: var(--text-tertiary);
}
.footer-grid em { font-style: italic; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-links a { color: var(--accent-gold); transition: opacity var(--dur-fast); }
.footer-links a:hover { opacity: 0.7; }
.footer-right { text-align: right; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-right { text-align: left; }
}

/* ── Scroll reveal ───────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 400ms var(--ease-default), transform 400ms var(--ease-default);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .hero-breath { animation: none !important; }
  .fracture::before { animation: none !important; transform: scaleX(1) !important; }
}

/* ── Hero animation ───────────────────────────────── */
.hero-breath {
  animation: hero-breath 8s ease-in-out infinite;
  transform-origin: 30% 50%;
  will-change: transform;
}
@keyframes hero-breath {
  0%, 100% { transform: scale(1.000); }
  50%      { transform: scale(1.003); }
}

.hero-h1 { min-height: 2.04em; } /* two lines reserve so the hero doesn't jump while typing */
.hh-em { font-style: italic; font-weight: 700; }
/* When the cursor is attached to the headline, keep it inline with the last char */
.hh-cursor { margin-left: 0.02em; }

/* Story card prose — we stream char-by-char. Hide the trailing cursor until ready. */
.sp-cursor.is-hidden { opacity: 0; animation: none; }
.hh-cursor.is-hidden { opacity: 0; animation: none; }

/* ── Launch animation ────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 550ms ease-in-out;
}
#loader.is-exiting { opacity: 0; pointer-events: none; }

.splash-word {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 96px);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  line-height: 1;
}

.splash-sparkle {
  display: inline-block;
  color: var(--text-primary);
  transform: scale(0);
  transition: transform 350ms cubic-bezier(0.2, 0.8, 0.3, 1.2);
  margin-left: 2px;
  vertical-align: baseline;
  line-height: 0;
}
.splash-sparkle svg { width: 0.20em; height: 0.20em; display: block; fill: currentColor; }
.splash-sparkle.is-visible { transform: scale(1); }

#splashCursor {
  color: var(--accent-gold);
  font-style: normal;
  margin-left: 1px;
  opacity: 0;
}
#splashCursor.is-blinking {
  animation: blink 1.2s steps(2, end) infinite;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  #loader { display: none !important; }
}

/* ── Gold hairline fracture divider ───────────────── */
.fracture {
  position: relative;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.fracture::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--accent-gold);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0.7;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.fracture.is-cracked::before {
  transform: scaleX(1);
  animation: fracture-jitter 1.2s steps(24, end);
}
@keyframes fracture-jitter {
  0%   { translate: 0 0; }
  8%   { translate: 0 1px; }
  16%  { translate: 0 -1px; }
  24%  { translate: 0 0; }
  32%  { translate: 0 1px; }
  40%  { translate: 0 0; }
  52%  { translate: 0 -1px; }
  64%  { translate: 0 1px; }
  76%  { translate: 0 0; }
  88%  { translate: 0 -1px; }
  100% { translate: 0 0; }
}

