@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500&display=swap');

:root {
  --ink-950: oklch(16% 0.014 210); --ink-900: oklch(20% 0.017 210); --ink-800: oklch(27% 0.02 210);
  --paper: oklch(94% 0.013 85); --muted: oklch(72% 0.018 200); --accent: oklch(72% 0.16 39);
  --line: oklch(40% 0.02 205 / .45); --bg: var(--ink-950); --surface: var(--ink-900); --text: var(--paper);
  --font-body: 'Manrope', sans-serif; --font-display: 'Cormorant Garamond', Georgia, serif; --font-condensed: 'Oswald', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.shell { width: min(100% - 40px, 1280px); margin-inline: auto; }
.site-header { height: 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 500 25px/1 var(--font-display); letter-spacing: .03em; }
.brand svg { width: 30px; color: var(--accent); }
.brand svg path:last-child { opacity: .45; }
.header-link, .site-footer a { font-size: 13px; font-weight: 600; transition: color .2s; }
.header-link:hover, .site-footer a:hover { color: var(--accent); }
.header-link span { margin-left: 8px; color: var(--accent); }
.hero { min-height: min(730px, calc(100dvh - 96px)); padding-block: 112px 80px; display: grid; grid-template-columns: 1fr auto; align-items: end; position: relative; isolation: isolate; }
.hero-copy { position: relative; z-index: 1; }
.overline { margin: 0 0 24px; color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .message-page h1 { margin-bottom: 32px; font: 500 clamp(58px, 7.8vw, 112px)/.9 var(--font-display); letter-spacing: -.045em; }
h1 em { color: var(--accent); font-weight: 500; }
.hero-lead { max-width: 570px; margin-bottom: 40px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-height: 54px; padding: 0 24px; background: var(--accent); color: var(--ink-950); font-size: 13px; font-weight: 700; transition: transform .2s, filter .2s; }
.primary-link:hover { transform: translateY(-2px); filter: brightness(1.08); }
.primary-link svg { width: 20px; }
.hero-note { writing-mode: vertical-rl; display: flex; gap: 24px; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: 9px; }
.hero-orbit { position: absolute; z-index: -1; right: 0; top: 44%; width: min(48vw, 600px); aspect-ratio: 1; transform: translateY(-50%) rotate(-15deg); opacity: .55; }
.hero-orbit span { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; }
.hero-orbit span:nth-child(2) { inset: 16%; border-color: oklch(72% 0.16 39 / .24); }
.hero-orbit i { position: absolute; inset: 38%; background: radial-gradient(circle at 40% 40%, oklch(72% 0.16 39 / .32), transparent 70%); border-radius: 50%; box-shadow: 0 0 100px oklch(72% 0.16 39 / .1); }
.collection { padding-block: 80px 112px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px; }
.section-heading h2, .admin-list > h2 { margin: 0; font: 500 46px/1 var(--font-display); }
.section-heading > span { color: var(--muted); font-size: 12px; }
.story-grid { display: grid; gap: 80px; }
.story-card { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 56px; align-items: center; }
.story-card:not(.featured) { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); max-width: 1000px; margin-left: auto; }
.story-visual { aspect-ratio: 16/9; position: relative; overflow: hidden; background: var(--surface); }
.story-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, oklch(12% 0.015 210 / .75)); pointer-events: none; }
.story-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease-out, filter .3s; }
.story-visual:hover img { transform: scale(1.025); filter: brightness(1.08); }
.story-index { position: absolute; z-index: 1; left: 20px; top: 16px; font: 400 12px var(--font-condensed); letter-spacing: .12em; }
.play-mark { position: absolute; z-index: 1; right: 24px; bottom: 24px; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid oklch(94% 0.013 85 / .55); border-radius: 50%; backdrop-filter: blur(10px); transition: background .2s, color .2s; }
.story-visual:hover .play-mark { background: var(--accent); color: var(--ink-950); border-color: var(--accent); }
.story-type { margin-bottom: 14px; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .15em; }
.story-info h3 { margin-bottom: 22px; font: 500 clamp(34px, 4vw, 55px)/1.02 var(--font-display); letter-spacing: -.025em; }
.story-info h3 a:hover { color: var(--accent); }
.story-description { color: var(--muted); max-width: 440px; font-size: 14px; }
.text-link { display: inline-flex; gap: 28px; align-items: center; margin-top: 14px; padding-bottom: 5px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.text-link:hover { border-color: var(--accent); color: var(--accent); }
.site-footer { padding-block: 32px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 28px; font-size: 12px; }
.site-footer > span { font: 500 20px var(--font-display); }
.site-footer p { margin: 0; color: var(--muted); }
.site-footer a { margin-left: auto; }
.empty-state { border: 1px solid var(--line); padding: 64px; color: var(--muted); }
.empty-state p { margin: 0; }
.viewer, .viewer iframe { width: 100%; height: 100dvh; border: 0; }
.viewer { position: relative; overflow: hidden; background: oklch(10% 0.01 210); }
.viewer iframe { display: block; }
.viewer-back { position: fixed; z-index: 5; top: 20px; left: 20px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid oklch(94% 0.013 85 / .25); border-radius: 2px; background: oklch(16% 0.014 210 / .8); backdrop-filter: blur(12px); font-size: 11px; opacity: .45; transition: opacity .2s; }
.viewer-back:hover, .viewer-back:focus-visible { opacity: 1; }
.viewer-back svg { width: 17px; }
.message-page { padding-block: 15vh; }
.message-page h1 { font-size: clamp(48px, 7vw, 90px); }
.login-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); background: radial-gradient(circle at 20% 30%, oklch(30% 0.05 40 / .2), transparent 35%), var(--bg); }
.login-panel { grid-column: 2; padding: clamp(40px, 7vw, 100px); display: flex; flex-direction: column; justify-content: space-between; gap: 56px; border-left: 1px solid var(--line); background: oklch(20% 0.017 210 / .65); }
.login-panel h1 { font: 500 clamp(42px, 5vw, 66px)/.95 var(--font-display); letter-spacing: -.03em; }
.login-form { display: grid; gap: 16px; }
.login-form label, .field label, .file-field > label { font-size: 12px; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--ink-950); color: var(--text); padding: 14px 16px; transition: border-color .2s; }
input:hover, textarea:hover { border-color: var(--muted); }
textarea { resize: vertical; }
.button { min-height: 50px; border: 0; padding: 0 20px; display: inline-flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; }
.button:disabled { opacity: .55; cursor: wait; }
.form-error, .form-message.error { color: oklch(75% 0.17 25); }
.form-message.success { color: oklch(76% 0.14 150); }
.admin-header { min-height: 88px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.admin-header-actions { display: flex; gap: 24px; align-items: center; font-size: 12px; }
.quiet-button { border: 0; background: transparent; color: var(--muted); padding: 10px 0; }
.admin-main { padding-block: 64px 100px; }
.admin-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 48px; }
.admin-title .overline { margin-bottom: 8px; }
.admin-title h1 { margin: 0; font: 500 64px/1 var(--font-display); }
.admin-title > span { color: var(--muted); font-size: 12px; }
.upload-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding: 48px; background: var(--surface); }
.upload-intro h2 { font: 500 36px var(--font-display); }
.upload-intro p { color: var(--muted); font-size: 14px; max-width: 360px; }
code { color: var(--accent); }
.upload-form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
.field label, .file-field > label { display: flex; justify-content: space-between; }
.field label span, .file-field > label span { color: var(--muted); font-size: 10px; font-weight: 400; }
.file-field { position: relative; display: grid; gap: 8px; }
.file-field input { position: absolute; inset: 30px 0 0; z-index: 1; opacity: 0; cursor: pointer; height: calc(100% - 30px); }
.file-prompt { min-height: 130px; border: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; transition: border-color .2s, background .2s; }
.file-field:hover .file-prompt, .file-field:focus-within .file-prompt { border-color: var(--accent); background: oklch(72% 0.16 39 / .04); }
.file-prompt svg { color: var(--accent); margin-bottom: 8px; }
.file-prompt strong { font-size: 12px; }
.file-prompt span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.file-field.compact .file-prompt { min-height: 88px; }
.upload-progress > div { display: flex; justify-content: space-between; font-size: 11px; }
.upload-progress progress { width: 100%; height: 4px; accent-color: var(--accent); }
.form-message { margin: 0; font-size: 12px; }
.admin-list { padding-top: 72px; }
.admin-list > h2 { margin-bottom: 32px; }
.admin-stories { border-top: 1px solid var(--line); }
.admin-story { display: grid; grid-template-columns: 160px 1fr auto; gap: 28px; padding-block: 24px; border-bottom: 1px solid var(--line); align-items: center; }
.admin-thumb { aspect-ratio: 16/9; background: var(--surface); overflow: hidden; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.status { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.status.published { color: oklch(76% 0.14 150); }
.status.draft { color: var(--muted); }
.admin-story h3 { margin-bottom: 4px; font: 500 26px var(--font-display); }
.admin-story-copy p { margin: 0; color: var(--muted); font-size: 12px; max-width: 550px; }
.admin-story-actions { display: flex; gap: 12px; align-items: center; }
.admin-story-actions a, .admin-story-actions button { border: 0; background: transparent; color: var(--text); padding: 10px 4px; font-size: 11px; white-space: nowrap; }
.admin-story-actions a:hover, .admin-story-actions button:hover { color: var(--accent); }
.admin-story-actions .danger { color: oklch(75% 0.17 25); }
.confirm-dialog { max-width: 460px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 32px; }
.confirm-dialog::backdrop { background: oklch(10% 0.01 210 / .8); backdrop-filter: blur(4px); }
.confirm-dialog h2 { font: 500 34px var(--font-display); }
.confirm-dialog p { color: var(--muted); font-size: 13px; }
.confirm-dialog form > div { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.confirm-dialog button { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 10px 16px; }
.confirm-dialog .danger-solid { background: oklch(60% 0.18 25); border-color: transparent; }
.admin-empty { color: var(--muted); }
@media (max-width: 800px) {
  .hero { min-height: 650px; padding-block: 88px 56px; }
  .hero-orbit { width: 90vw; right: -35vw; top: 38%; }
  .hero-note { display: none; }
  .story-card, .story-card:not(.featured) { grid-template-columns: 1fr; gap: 28px; margin: 0; }
  .story-grid { gap: 64px; }
  .login-page { grid-template-columns: 1fr; }
  .login-panel { grid-column: 1; border-left: 0; min-height: 100dvh; }
  .upload-section { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .admin-story { grid-template-columns: 110px 1fr; gap: 16px; }
  .admin-story-actions { grid-column: 1 / -1; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .shell { width: min(100% - 32px, 1280px); }
  .site-header { height: 76px; }
  .header-link { font-size: 11px; }
  .hero { min-height: calc(100dvh - 76px); padding-top: 72px; }
  .hero h1 { font-size: clamp(50px, 16vw, 70px); }
  .hero-lead { font-size: 15px; }
  .primary-link { width: 100%; gap: 12px; }
  .collection { padding-block: 56px 72px; }
  .section-heading { margin-bottom: 28px; }
  .story-visual { aspect-ratio: 4/3; }
  .play-mark { width: 48px; height: 48px; right: 16px; bottom: 16px; }
  .site-footer p { display: none; }
  .viewer-back span { display: none; }
  .viewer-back { padding: 0 12px; left: 12px; top: 12px; }
  .admin-header-actions { gap: 12px; }
  .admin-header-actions > a { display: none; }
  .admin-main { padding-top: 40px; }
  .admin-title h1 { font-size: 50px; }
  .upload-section { padding: 24px 18px; }
  .admin-story { grid-template-columns: 1fr; }
  .admin-thumb { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
