@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #17211c;
  --ink-soft: #223029;
  --paper: #f1eadf;
  --paper-soft: #e8dfd1;
  --brass: #c99a55;
  --brass-light: #e0bf86;
  --clay: #b97465;
  --sage: #a8b3a0;
  --muted: #87918a;
  --line: rgba(241, 234, 223, 0.16);
  --line-dark: rgba(23, 33, 28, 0.14);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, 29vw) 1fr; overflow: hidden; }
.brand-rail { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 38px clamp(28px, 5vw, 76px) 34px clamp(28px, 5vw, 76px); background: linear-gradient(145deg, #1c2821 0%, var(--ink) 68%); border-right: 1px solid var(--line); }
.brand-rail::before, .brand-rail::after { position: absolute; content: ''; width: 38px; height: 38px; border-color: rgba(201, 154, 85, 0.5); pointer-events: none; }
.brand-rail::before { top: 24px; left: 24px; border-top: 1px solid; border-left: 1px solid; }
.brand-rail::after { right: 24px; bottom: 24px; border-right: 1px solid; border-bottom: 1px solid; }
.rail-topline, .stage-header, .feature-meta, .prompt-heading, .stage-footer, .rail-footer { display: flex; align-items: center; justify-content: space-between; }
.rail-topline { justify-content: flex-start; gap: 16px; }
.eyebrow, .kicker, .note-index, .feature-meta, .prompt-heading, .status-pill, .stage-footer, .rail-footer { text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px; font-weight: 600; }
.eyebrow { color: var(--muted); }
.viewfinder-mark { width: 58px; height: 46px; display: grid; place-items: center; padding: 3px; border: 1px solid var(--brass); background: #a8b8aa; position: relative; overflow: hidden; }
.logo-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.viewfinder-mark::before, .viewfinder-mark::after { position: absolute; content: ''; width: 7px; height: 7px; border-color: var(--brass); }
.viewfinder-mark::before { top: -4px; left: -4px; border-top: 1px solid; border-left: 1px solid; }
.viewfinder-mark::after { right: -4px; bottom: -4px; border-right: 1px solid; border-bottom: 1px solid; }
.rail-copy { margin: auto 0; max-width: 330px; padding: 42px 0 30px; }
.kicker { color: var(--brass-light); margin: 0 0 18px; }
.rail-copy h1 { margin: 0; color: var(--paper); font: 600 clamp(58px, 8vw, 116px)/0.86 var(--serif); letter-spacing: -0.07em; }
.rail-copy h1 span { display: block; margin-left: 22px; color: var(--brass); }
.dek { max-width: 280px; margin: 32px 0 0 4px; color: #bac1b9; font: 500 14px/1.65 var(--serif); }
.rail-note { border-top: 1px solid var(--line); padding-top: 18px; display: flex; gap: 18px; color: var(--sage); }
.rail-note p { margin: 0; font: 15px/1.45 var(--serif); }
.rail-note em { color: var(--brass-light); }
.note-index { color: var(--brass); padding-top: 3px; }
.rail-footer { justify-content: flex-start; gap: 12px; color: var(--muted); }
.rail-rule { width: 34px; height: 1px; background: var(--brass); }
.rail-footer p { margin: 0; }

.chat-stage { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; padding: 42px clamp(24px, 5vw, 76px) 28px; background: var(--paper); color: var(--ink); }
.stage-header { align-items: flex-end; padding-bottom: 28px; }
.stage-header h2 { max-width: 480px; margin: 8px 0 0; font: 600 clamp(25px, 3vw, 42px)/1.05 var(--serif); letter-spacing: -0.04em; }
.stage-header .eyebrow { color: #7b8179; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: #6d756d; letter-spacing: 0.08em; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #719073; box-shadow: 0 0 0 4px rgba(113, 144, 115, 0.15); animation: pulse 2.4s ease-in-out infinite; }

.announcement { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(183, 116, 101, 0.38); background: rgba(183, 116, 101, 0.09); color: #39423b; animation: rise 320ms ease-out both; }
.announcement-symbol { flex: 0 0 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--clay); border-radius: 50%; color: var(--clay); font: 700 13px var(--serif); }
.announcement-copy { flex: 1; min-width: 0; }
.announcement-label { margin: 0 0 4px; color: var(--clay); font-size: 9px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.announcement-copy > p:last-child { margin: 0; font: 13px/1.45 var(--serif); }
.announcement-copy strong { color: var(--ink); }
.announcement-close { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid rgba(23, 33, 28, 0.2); background: transparent; color: #6b746b; font-size: 20px; line-height: 1; transition: background 180ms ease, color 180ms ease; }
.announcement-close:hover { background: var(--ink); color: var(--brass-light); }
.announcement.is-dismissed { display: none; }

.feature-note { position: relative; padding: 22px 24px 20px; background: var(--ink-soft); color: var(--paper); overflow: hidden; }
.feature-note::after { position: absolute; right: 24px; top: 22px; width: 118px; height: 118px; border: 1px solid rgba(201, 154, 85, 0.34); border-radius: 50%; content: ''; box-shadow: 0 0 0 17px rgba(201, 154, 85, 0.04), 0 0 0 34px rgba(201, 154, 85, 0.03); }
.feature-note::before { position: absolute; right: 77px; top: 73px; width: 12px; height: 12px; content: ''; border: 1px solid var(--brass); transform: rotate(45deg); z-index: 1; }
.feature-meta { position: relative; z-index: 2; color: var(--brass-light); }
.feature-body { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(230px, 0.85fr) 1fr; gap: 30px; align-items: end; margin: 24px 0 18px; }
.feature-body .kicker { margin-bottom: 8px; color: var(--clay); }
.feature-body h3 { margin: 0; font: 600 clamp(34px, 4vw, 57px)/0.95 var(--serif); letter-spacing: -0.05em; }
.feature-body h3 em { color: var(--brass-light); font-style: normal; }
.feature-body > p { max-width: 420px; margin: 0; color: #c9d0c8; font: 15px/1.55 var(--serif); }
.feature-actions { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--brass-light); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.text-button span { display: inline-block; margin-left: 7px; transition: transform 180ms ease; }
.text-button:hover span { transform: translate(3px, -3px); }
.registration-note { color: #d5b982; font: 500 12px/1.35 var(--serif); text-align: right; }

.gallery-strip { padding: 18px 0 0; }
.gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.gallery-heading .eyebrow { color: #7b8179; margin: 0 0 5px; }
.gallery-heading h3 { margin: 0; font: 600 24px/1 var(--serif); letter-spacing: -0.03em; }
.gallery-index { color: #a19b8e; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.gallery-card { position: relative; margin: 0; overflow: hidden; background: var(--ink-soft); outline: none; }
.gallery-card:focus-visible { box-shadow: 0 0 0 2px var(--brass); }
.gallery-track { display: flex; transition: transform 360ms cubic-bezier(.22,.61,.36,1); touch-action: pan-y; }
.gallery-slide { flex: 0 0 100%; margin: 0; }
.gallery-slide img { width: 100%; height: auto; display: block; object-fit: contain; object-position: center; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 0 0; color: #8c877b; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.gallery-controls button { width: 30px; height: 26px; border: 1px solid var(--line-dark); background: transparent; color: var(--ink); font-size: 16px; line-height: 1; transition: background 180ms ease, color 180ms ease, opacity 180ms ease; }
.gallery-controls button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.gallery-controls button:disabled { cursor: not-allowed; opacity: 0.28; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(23, 33, 28, 0.52); opacity: 0; transition: opacity 280ms ease; }
.drawer-backdrop:not([hidden]) { opacity: 1; }
.archive-drawer { position: fixed; inset: 0 auto 0 0; z-index: 21; width: min(560px, 92vw); display: flex; flex-direction: column; padding: clamp(24px, 5vw, 58px); overflow-y: auto; background: var(--paper); box-shadow: 18px 0 50px rgba(23, 33, 28, 0.2); transform: translateX(-105%); transition: transform 380ms cubic-bezier(.22,.61,.36,1); }
.archive-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line-dark); padding-bottom: 18px; }
.drawer-header .eyebrow { margin: 0 0 8px; color: #7b8179; }
.drawer-header h2 { margin: 0; color: var(--ink); font: 600 clamp(28px, 4vw, 44px)/0.95 var(--serif); letter-spacing: -0.04em; }
.drawer-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line-dark); background: transparent; color: var(--ink); font-size: 22px; line-height: 1; }
.drawer-close:hover { background: var(--ink); color: var(--paper); }
.drawer-intro { max-width: 360px; margin: 18px 0 24px; color: #59645c; font: 500 15px/1.5 var(--serif); }
.archive-drawer .gallery-card { margin-top: 4px; }
.archive-drawer .gallery-controls { padding-bottom: 6px; }
body.drawer-open { overflow: hidden; }

.conversation-panel { flex: 1; min-height: 240px; display: flex; flex-direction: column; margin-top: 14px; border-bottom: 1px solid var(--line-dark); }
.conversation-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 16px 5px 22px 0; scrollbar-width: thin; scrollbar-color: #c2b8a9 transparent; }
.message { display: flex; gap: 12px; max-width: 700px; margin: 0 0 20px; animation: rise 260ms ease-out both; }
.message.user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; }
.message.user .message-avatar { border-color: var(--brass); background: var(--brass); }
.message.assistant .message-avatar { border-color: var(--ink-soft); background: var(--ink-soft); color: var(--brass-light); }
.message-content { max-width: min(620px, 84%); }
.message-label { display: block; margin: 1px 0 6px; color: #7e847d; font-size: 9px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.message.user .message-label { text-align: right; }
.message-bubble { padding: 12px 15px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, 0.34); color: #29332d; font-size: 14px; line-height: 1.6; }
.message.user .message-bubble { border-color: rgba(201, 154, 85, 0.34); background: rgba(201, 154, 85, 0.16); }
.message-bubble p { margin: 0 0 9px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble strong { color: var(--ink); font-weight: 700; }
.typing-indicator { min-height: 24px; display: flex; align-items: center; gap: 4px; color: #7e847d; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; transition: opacity 180ms ease; }
.typing-indicator.visible { opacity: 1; }
.typing-indicator span:not(:last-child) { width: 4px; height: 4px; border-radius: 50%; background: var(--brass); animation: bounce 900ms ease-in-out infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 120ms; }.typing-indicator span:nth-child(3) { animation-delay: 240ms; }.typing-indicator span:last-child { margin-left: 5px; }

.prompt-drawer { padding: 17px 0 12px; }
.prompt-heading { color: #8a8f88; }
.prompt-count { color: #b2a99b; }
.prompt-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 11px; }
.prompt-chip { min-height: 54px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line-dark); background: transparent; color: #4b554e; font-size: 11px; line-height: 1.25; text-align: left; transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease; }
.prompt-chip span { color: var(--brass); font-size: 9px; font-weight: 700; }
.prompt-chip:hover { border-color: var(--brass); background: rgba(201, 154, 85, 0.08); color: var(--ink); transform: translateY(-2px); }

.composer { display: flex; gap: 10px; padding-top: 8px; }
.composer input { min-width: 0; flex: 1; padding: 15px 0; border: 0; border-bottom: 1px solid #a9a79d; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.composer input::placeholder { color: #97998f; }
.composer input:focus { border-bottom-color: var(--brass); }
.send-button { flex: 0 0 46px; height: 46px; align-self: flex-end; border: 1px solid var(--ink); background: var(--ink); color: var(--brass-light); font-size: 22px; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.send-button:hover { background: var(--brass); color: var(--ink); transform: translate(2px, -2px); }
.stage-footer { padding-top: 18px; color: #999b91; font-size: 9px; letter-spacing: 0.08em; }
.stage-footer p { margin: 0; display: flex; align-items: center; gap: 8px; }
.footer-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--brass); color: #9b7440; font-size: 7px; }
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-links a { color: #8e7859; text-decoration: none; text-transform: uppercase; }
.footer-links a:hover { color: var(--ink); }
.clear-button { border: 0; padding: 0; background: transparent; color: #999b91; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; }
.clear-button:hover { color: var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(113, 144, 115, 0.15); } 50% { box-shadow: 0 0 0 7px rgba(113, 144, 115, 0.03); } }
@keyframes bounce { 0%, 70%, 100% { transform: translateY(0); } 35% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } }
@media (max-width: 860px) { .page-shell { grid-template-columns: 1fr; } .brand-rail { min-height: auto; padding: 26px 28px 24px; } .brand-rail::before { top: 15px; left: 15px; } .brand-rail::after { display: none; } .rail-copy { margin: 38px 0 30px; padding: 0; } .rail-copy h1 { font-size: clamp(62px, 15vw, 110px); } .rail-note { display: none; } .rail-footer { display: none; } .chat-stage { min-height: calc(100vh - 300px); padding: 30px 28px 22px; } }
@media (max-width: 560px) { .stage-header { align-items: flex-start; flex-direction: column; gap: 14px; } .stage-header h2 { font-size: 32px; } .announcement { align-items: flex-start; } .announcement-symbol { margin-top: 2px; } .feature-note { padding: 17px; } .feature-body { display: block; margin: 20px 0; } .feature-body > p { margin-top: 18px; max-width: 290px; } .feature-actions { align-items: flex-start; flex-direction: column; gap: 12px; } .registration-note { text-align: left; } .feature-note::after { right: -28px; top: 70px; } .gallery-heading { align-items: flex-start; flex-direction: column; gap: 6px; } .gallery-card figcaption { left: 14px; right: auto; max-width: 250px; text-align: left; } .prompt-list { grid-template-columns: repeat(2, 1fr); } .prompt-chip { min-height: 62px; } .stage-footer { align-items: flex-start; flex-direction: column; gap: 12px; line-height: 1.5; } .footer-links { width: 100%; justify-content: space-between; } }
