@font-face {
  font-family: "Venturokin Display";
  src: url("/fonts/barlow-condensed-bold-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Venturokin Text";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0c1722;
  --bg-2: #11202e;
  --surface: #162838;
  --surface-2: #1c3042;
  --ink: #f3ead6;
  --ink-soft: #a7b8c4;
  --ink-dim: #71838f;
  --ember: #ff9d5c;
  --amber: #f4b860;
  --teal: #54c7b6;
  --sky: #86b3d1;
  --pine: #4f8a6d;
  --line: rgba(243, 234, 214, 0.14);
  --line-strong: rgba(243, 234, 214, 0.24);
  --glow: 0 30px 90px rgba(0, 0, 0, 0.55);
  --display: "Venturokin Display", sans-serif;
  --text: "Venturokin Text", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(84, 199, 182, 0.10), transparent 70%),
    radial-gradient(50rem 40rem at -10% 20%, rgba(255, 157, 92, 0.10), transparent 70%),
    repeating-linear-gradient(115deg, rgba(243, 234, 214, 0.016) 0 1px, transparent 1px 9px),
    var(--bg);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(255, 157, 92, 0.35);
  color: #fff;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  color: #0c1722;
  background: var(--ember);
  border-radius: 8px;
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 max(2rem, calc((100vw - 1440px) / 2));
  min-height: 76px;
  background: rgba(12, 23, 34, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--ember), var(--amber));
  color: #0c1722;
  font-family: var(--display);
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(255, 157, 92, 0.3);
}

.brand-word {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.header-cta {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease;
}

.header-cta:hover {
  border-color: var(--ember);
  background: rgba(255, 157, 92, 0.1);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--ember), var(--amber));
  color: #0c1722;
  box-shadow: 0 10px 30px rgba(255, 157, 92, 0.28);
}

.button-primary:hover {
  box-shadow: 0 14px 40px rgba(255, 157, 92, 0.4);
}

.button-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--teal);
  background: rgba(84, 199, 182, 0.08);
}

.text-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--ember);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  justify-items: center;
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) max(2rem, calc((100vw - 1440px) / 2)) clamp(4rem, 8vw, 6rem);
}

.hero-inner {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  max-width: 820px;
}

.eyebrow {
  display: flex;
  gap: 1.4rem;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
}

.eyebrow span:first-child {
  color: var(--teal);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--ember), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin: 0;
  max-width: 620px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-facts {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 1rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero-facts div {
  display: grid;
  gap: 0.15rem;
}

.hero-facts dt {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ember);
}

.hero-facts dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.hero-frame {
  position: relative;
  width: min(100%, 860px);
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--glow), 0 0 0 6px rgba(243, 234, 214, 0.04);
}

.hero-frame img {
  width: 100%;
  height: auto;
}

.hero-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(243, 234, 214, 0.85);
  background: linear-gradient(transparent, rgba(12, 23, 34, 0.82));
}

/* ---------- Ticker ---------- */
.story-ribbon {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(22, 40, 56, 0.5);
}

.story-ribbon-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}

.story-ribbon-track span {
  padding: 1rem 1.5rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  white-space: nowrap;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Section heading ---------- */
.section-heading {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.section-heading.compact {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--teal);
}

.section-heading h2,
.gallery-intro h2,
.about-copy h2,
.help-section h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.02;
}

.section-heading h2 em,
.gallery-intro h2 em,
.about-copy h2 em,
.help-section h2 em {
  font-style: normal;
  color: var(--ember);
}

.section-heading > p:last-child,
.gallery-intro > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Studio ---------- */
.studio-section {
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - 1440px) / 2));
}

.studio-shell {
  display: grid;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--glow);
}

.composer {
  display: grid;
  gap: 1.75rem;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 23, 34, 0.6);
  justify-self: center;
  width: min(100%, 460px);
}

.mode-button {
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.mode-button.is-active {
  background: linear-gradient(135deg, var(--ember), var(--amber));
  color: #0c1722;
}

.composer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-step {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-label > span {
  font-family: var(--display);
  color: var(--teal);
  font-size: 1.05rem;
}

.step-label label {
  cursor: pointer;
}

/* Drop zone */
.drop-zone {
  position: relative;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  align-content: center;
  min-height: 180px;
  padding: 1.5rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(12, 23, 34, 0.5);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover {
  border-color: var(--teal);
}

.drop-zone.is-dragging {
  border-color: var(--ember);
  background: rgba(255, 157, 92, 0.08);
}

.drop-zone.needs-attention {
  animation: pulse 1s ease;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 157, 92, 0); }
  35% { box-shadow: 0 0 0 8px rgba(255, 157, 92, 0.25); }
}

.drop-icon {
  font-size: 1.8rem;
  color: var(--teal);
}

.drop-copy {
  display: grid;
  gap: 0.2rem;
}

.drop-copy strong {
  font-size: 1rem;
}

.drop-copy small {
  color: var(--ink-dim);
  font-size: 0.8rem;
}

.drop-action {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.82rem;
}

.drop-zone.has-image {
  padding: 0.75rem;
}

.drop-zone.has-image #upload-preview {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.drop-zone.has-image .drop-icon,
.drop-zone.has-image .drop-copy,
.drop-zone.has-image .drop-action {
  display: none;
}

.remove-upload {
  justify-self: start;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
}

.remove-upload:hover {
  border-color: var(--ember);
  color: var(--ember);
}

/* Prompt */
.prompt-wrap {
  position: relative;
}

textarea,
.access-step input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(12, 23, 34, 0.55);
  color: var(--ink);
  padding: 1rem 1rem 2.2rem;
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea:focus,
.access-step input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(84, 199, 182, 0.12);
}

textarea {
  min-height: 130px;
}

.character-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.prompt-ideas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prompt-ideas button {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.prompt-ideas button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Ratio */
.ratio-step {
  border: 0;
  padding: 0;
  margin: 0;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.ratio-grid label {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.ratio-grid label:hover {
  border-color: var(--line-strong);
}

.ratio-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ratio-grid label:has(input:checked) {
  border-color: var(--ember);
  background: rgba(255, 157, 92, 0.08);
}

.ratio-icon {
  width: 34px;
  height: 26px;
  border: 2px solid var(--ink-soft);
  border-radius: 4px;
}

.ratio-portrait { width: 20px; height: 30px; }
.ratio-square { width: 26px; height: 26px; }
.ratio-landscape { width: 34px; height: 22px; }

.ratio-grid strong {
  font-size: 0.9rem;
}

.ratio-grid small {
  font-size: 0.72rem;
  color: var(--ink-dim);
}

/* Access */
.access-step input {
  padding: 0.9rem 1rem;
  min-height: auto;
}

.access-step p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

/* Consent */
.consent-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent-row input {
  margin-top: 0.25rem;
  accent-color: var(--ember);
}

.consent-row a {
  color: var(--teal);
}

/* Generate */
.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 1.05rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ember), var(--amber));
  color: #0c1722;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(255, 157, 92, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.generate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(255, 157, 92, 0.42);
}

.generate-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.button-arrow {
  font-size: 1.2rem;
}

.model-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-dim);
}

.status-dot.is-ready {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(84, 199, 182, 0.15);
}

/* Result stage */
.result-stage {
  display: grid;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 23, 34, 0.55);
  overflow: hidden;
}

.result-empty,
.result-loading,
.result-error {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.7rem;
  padding: 2.5rem;
  text-align: center;
}

.result-empty img {
  width: 220px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 0.6rem;
}

.result-number {
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: var(--teal);
}

.result-empty h3,
.result-loading h3,
.result-error h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.6rem;
}

.result-empty p,
.result-loading p,
.result-error p {
  margin: 0;
  max-width: 420px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.paint-orbit {
  position: relative;
  width: 56px;
  height: 56px;
}

.paint-orbit span {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.paint-orbit span:nth-child(2) { inset: 6px; border-top-color: var(--amber); animation-duration: 1.4s; }
.paint-orbit span:nth-child(3) { inset: 12px; border-top-color: var(--teal); animation-duration: 1.7s; }

@keyframes spin { to { transform: rotate(360deg); } }

.result-error > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 157, 92, 0.15);
  color: var(--ember);
  font-weight: 800;
}

.result-success {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 360px;
}

.result-success > img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #050b11;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.result-toolbar p {
  margin: 0;
}

#result-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.download-button {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--teal);
  color: #06201b;
  font-weight: 700;
  text-decoration: none;
}

.download-button:hover {
  background: var(--sky);
}

/* ---------- Gallery ---------- */
.gallery-section {
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--line);
}

.gallery-intro {
  display: grid;
  gap: 1rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.story-card {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.story-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.story-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.story-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  font-size: 0.78rem;
  color: var(--ink-dim);
}

.story-card figcaption > span:last-child {
  font-family: var(--display);
  letter-spacing: 0.14em;
}

.story-card figcaption strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.story-card figcaption small {
  color: var(--ink-soft);
}

.gallery-quote {
  max-width: 680px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  text-align: center;
}

.gallery-quote p {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.gallery-quote cite {
  font-style: normal;
  color: var(--teal);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

/* ---------- How ---------- */
.how-section {
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--line);
}

.process-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--amber), var(--teal));
  opacity: 0.4;
}

.process-list li {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.process-list li > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  font-family: var(--display);
  color: var(--ember);
  font-size: 1.05rem;
}

.process-list h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
}

.process-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.process-list code {
  color: var(--amber);
}

/* ---------- About ---------- */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--line);
}

.about-copy {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.about-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.principles {
  display: grid;
  gap: 1rem;
}

.principles > div {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.principles span {
  font-family: var(--display);
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--teal);
}

.principles p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.about-origin {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  text-align: center;
  font-family: var(--display);
  letter-spacing: 0.26em;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

/* ---------- Help ---------- */
.help-section {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--line);
  background:
    radial-gradient(40rem 24rem at 50% 120%, rgba(255, 157, 92, 0.12), transparent 70%),
    transparent;
}

.help-mail {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ember);
  transition: color 160ms ease, border-color 160ms ease;
}

.help-mail:hover {
  color: var(--ember);
  border-color: var(--teal);
}

.help-section > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  max-width: 460px;
}

/* ---------- Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(3rem, 6vw, 5rem) max(2rem, calc((100vw - 1440px) / 2)) 2rem;
  border-top: 1px solid var(--line-strong);
  background: var(--bg-2);
}

.footer-brand {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.footer-brand strong {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.14em;
}

.footer-brand p {
  margin: 0;
  color: var(--ink-soft);
}

.footer-column {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  font-style: normal;
}

.footer-column h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.16em;
  color: var(--teal);
}

.footer-column a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-column a:hover {
  color: var(--ink);
}

.footer-column strong {
  color: var(--ink);
}

.footer-column span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Legal pages ---------- */
.legal-body {
  background:
    radial-gradient(50rem 34rem at 100% 0%, rgba(84, 199, 182, 0.08), transparent 65%),
    var(--bg);
}

.legal-header {
  position: relative;
}

.legal-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) max(2rem, 4vw) clamp(5rem, 8vw, 7rem);
}

.legal-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--teal);
}

.legal-main h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.02;
}

.legal-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.legal-toc strong {
  margin-bottom: 0.4rem;
  font-family: var(--display);
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  color: var(--teal);
}

.legal-toc a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
}

.legal-toc a:hover {
  color: var(--ember);
}

.legal-content {
  display: grid;
  gap: 2rem;
  max-width: 720px;
}

.legal-content section {
  display: grid;
  gap: 0.9rem;
}

.legal-content h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.legal-content h3 {
  margin: 0;
  font-size: 1.05rem;
}

.legal-content p,
.legal-content li {
  color: var(--ink-soft);
}

.legal-content a {
  color: var(--teal);
}

.legal-content ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.legal-contact {
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.legal-contact strong {
  color: var(--ink);
}

.legal-contact p {
  margin: 0;
}

/* ---------- Login / Session ---------- */
.login-panel {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--ember), var(--amber));
  color: #0c1722;
  font-family: var(--display);
  font-size: 1.8rem;
  box-shadow: 0 12px 30px rgba(255, 157, 92, 0.3);
}

.login-panel h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
}

.login-panel > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 320px;
}

.login-form {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  margin-top: 0.5rem;
}

.login-form label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.login-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 23, 34, 0.55);
  color: var(--ink);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(84, 199, 182, 0.12);
}

.login-error {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 157, 92, 0.12);
  color: var(--ember);
  font-size: 0.86rem;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ember), var(--amber));
  color: #0c1722;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 157, 92, 0.35);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(84, 199, 182, 0.06);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.session-bar strong {
  color: var(--ink);
}

.session-bar button {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.session-bar button:hover {
  border-color: var(--ember);
  color: var(--ember);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .composer-grid {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr 1fr;
  }

  .process-list {
    grid-template-columns: 1fr 1fr;
  }

  .process-list::before {
    display: none;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .hero-facts {
    flex-direction: column;
    gap: 0.8rem;
  }

  .ratio-grid {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .story-ribbon-track {
    animation: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
