*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
body {
  background: #f6f5f1; color: #14140f;
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #d5451b; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@keyframes tvOrbit {
  0%   { transform: translate3d(-12%,6%,0) scale(1); }
  33%  { transform: translate3d(22%,-10%,0) scale(1.25); }
  66%  { transform: translate3d(6%,14%,0) scale(.95); }
  100% { transform: translate3d(-12%,6%,0) scale(1); }
}
@keyframes tvStripes { from { background-position: 0 0; } to { background-position: 240px 240px; } }
@keyframes tvPan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes tvBreathe { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

.stage { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; }

/* animated backdrop layers */
.bg { position: absolute; inset: 0; pointer-events: none; }
.bg-fields { inset: -30%;
  background:
    radial-gradient(30% 30% at 25% 30%, rgba(213,69,27,.22), transparent 70%),
    radial-gradient(28% 28% at 70% 65%, rgba(120,160,220,.20), transparent 70%),
    radial-gradient(26% 26% at 55% 20%, rgba(240,190,90,.22), transparent 70%);
  filter: blur(60px); animation: tvOrbit 28s ease-in-out infinite; }
.bg-weave { background-image: repeating-linear-gradient(45deg, rgba(20,20,15,.05) 0 1px, transparent 1px 24px);
  background-size: 240px 240px; animation: tvStripes 24s linear infinite; }
.bg-sweep { background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.75) 50%, transparent 65%);
  background-size: 200% 100%; animation: tvPan 14s linear infinite; }
.rule { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(20,20,15,.1); }
.rule-a { left: 320px; }
.rule-b { left: 960px; }
.edge { position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: #d5451b;
  transform-origin: top; animation: tvBreathe 6s ease-in-out infinite; }

.inner { position: relative; flex: 1; display: flex; flex-direction: column;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 5vw, 64px); gap: clamp(28px, 5vh, 56px); }

header { display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid #14140f; padding-bottom: 18px; gap: 24px; }
.lockup { display: flex; flex-direction: column; gap: 7px; }
.mark { display: flex; align-items: center; gap: 3px; }
.mark .wordmark { margin-left: 9px; }
.mark i { width: 5px; height: 20px; background: #d5451b; transform: skewX(-16deg); display: block; }
.mark i:nth-child(2) { opacity: .55; }
.mark i:nth-child(3) { opacity: .22; }
.wordmark { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: #6c6c62; margin: 0; }
.tagline { letter-spacing: .22em; font-size: 10px; }
.meta { text-align: right; line-height: 1.8; }
.eyebrow { letter-spacing: .16em; }

main { flex: 1; display: grid; grid-template-columns: minmax(0,1fr) 380px;
  gap: clamp(32px, 6vw, 80px); align-items: center; }
h1 { margin: 0; font-size: clamp(52px, 8vw, 104px); line-height: .88; font-weight: 900; letter-spacing: -.05em; }
h1 em { font-family: 'Instrument Serif', serif; font-weight: 400; font-style: italic; letter-spacing: -.02em;
  display: inline-block; margin-top: .1em; line-height: .95; }
.col { display: flex; flex-direction: column; gap: 30px; }
.signup-col { gap: 22px; }
.hr { height: 1px; background: rgba(20,20,15,.15); }
.lede { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.65; color: #4a4a42; text-wrap: pretty; }
.lede .etym { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 22px; color: #6c6c62; }

form { display: flex; flex-direction: column; gap: 16px; }
input[type="email"] { border: 0; border-bottom: 1px solid #14140f; background: rgba(246,245,241,.6);
  outline: none; font-family: inherit; font-size: 20px; padding: 12px 0; color: #14140f; border-radius: 0; width: 100%; }
input[type="email"]::placeholder { color: #9a9a90; }
input[type="email"]:focus { border-bottom-color: #d5451b; }
input[type="email"]:focus-visible { outline: 2px solid #d5451b; outline-offset: 2px; }
#signup button { border: 0; background: #14140f; color: #f6f5f1; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  padding: 18px 0; cursor: pointer; transition: background .18s ease; width: 100%; min-height: 52px; }
#signup button:hover:not(:disabled) { background: #d5451b; }
#signup button:focus-visible { outline: 2px solid #d5451b; outline-offset: 2px; }
#signup button:disabled { opacity: .6; cursor: default; }
.note { font-size: 13px; line-height: 1.6; color: #6c6c62; margin: 0; }
.status { font-size: 13px; line-height: 1.6; min-height: 20px; color: #14140f; }
.status[data-state="error"] { color: #d5451b; }
.hp { position: absolute; left: -9999px; opacity: 0; }

footer { display: flex; justify-content: space-between; gap: 24px;
  border-top: 1px solid rgba(20,20,15,.15); padding-top: 18px; }
.footer-name { line-height: 1.7; }
footer .suffix { color: #9a9a90; }

/* Tablet */
@media (max-width: 1024px) {
  .rule { display: none; }
  main { grid-template-columns: minmax(0,1fr) 320px; gap: 40px; }
}
/* Tablet portrait / large phone */
@media (max-width: 900px) {
  .inner { gap: 36px; }
  main { grid-template-columns: 1fr; align-items: start; gap: 40px; padding: 8px 0 0; }
  .col { gap: 24px; }
  .lede { max-width: 34em; }
  form { max-width: 480px; }
  .note, .status { max-width: 480px; }
}
/* Phone */
@media (max-width: 600px) {
  .stage { min-height: auto; }
  .inner { padding: 22px 20px 28px; gap: 28px; }
  header { flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 14px; }
  .meta { text-align: left; }
  h1 { font-size: clamp(40px, 13vw, 60px); line-height: .92; }
  .lede { font-size: 16px; }
  .lede .etym { font-size: 19px; }
  input[type="email"] { font-size: 17px; }
  button { padding: 16px 0; }
  .edge { width: 4px; }
  .bg-weave { display: none; } /* reads as a false double-line beside the edge bar at phone width */
  footer { flex-direction: column; gap: 10px; padding-top: 14px; }
}
@media (max-width: 380px) {
  h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-fields, .bg-weave, .bg-sweep, .edge { animation: none; }
}

/* ── Ask Tvaram rail (5c) ─────────────────────────────────────────────── */
/* The rail overlays; the page layout never reflows when it opens. */
.inner { width: 100%; }
#signup-col { transition: opacity .2s ease; }
.stage.rail-open #signup-col { opacity: 0; visibility: hidden; }

.header-right { display: flex; align-items: center; gap: 20px; }
.mark-sm { gap: 2px; }
.mark-sm i { width: 3px; height: 12px; }
.mark-accent i { background: #ff6a3d; }
.ask-trigger { display: flex; align-items: center; gap: 10px; border: 1px solid #14140f;
  background: #f6f5f1; padding: 10px 16px; cursor: pointer;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: #14140f; }
.ask-trigger:hover { background: #14140f; color: #f6f5f1; }
.ask-trigger:focus-visible { outline: 2px solid #d5451b; outline-offset: 2px; }
.ask-trigger kbd { border: 1px solid currentColor; padding: 1px 5px; font: inherit; opacity: .6; }

.rail button, .rail .suggest button { cursor: pointer; }
.rail input { cursor: text; caret-color: #ff6a3d; }
.rail ::selection { background: #ff6a3d; color: #14140f; }
.rail { position: absolute; top: 0; right: 0; bottom: 0; width: 460px; z-index: 4;
  background: #14140f; color: #efeee9; display: flex; flex-direction: column;
  padding: 40px 40px 32px; transform: translateX(100%); transition: transform .38s cubic-bezier(.4,0,.2,1);
  visibility: hidden; box-shadow: -30px 0 80px -40px rgba(0,0,0,.7); }
.stage.rail-open .rail { transform: none; visibility: visible; }
.rail-head { display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 22px; border-bottom: 1px solid rgba(246,245,241,.18);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px;
  letter-spacing: .22em; text-transform: uppercase; color: #9a978f; }
.rail-head-title { display: flex; align-items: center; gap: 10px; }
.rail-head button { background: none; border: 1px solid rgba(246,245,241,.3); color: inherit;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; padding: 3px 7px; cursor: pointer; }
.rail-head button:focus-visible { outline: 2px solid #ff6a3d; outline-offset: 2px; }
.thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding: 26px 0; }
.thread::-webkit-scrollbar { width: 3px; }
.thread::-webkit-scrollbar-thumb { background: rgba(246,245,241,.25); }
.turn-label { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: #7d7a72; margin-bottom: -14px; }
.turn-label.bot { color: #ff6a3d; }
.msg { font-size: 16px; line-height: 1.7; color: #cfccc4; text-wrap: pretty; }
.msg.user { font-size: 17px; line-height: 1.55; color: #f6f5f1; }
.suggest { display: flex; flex-direction: column; gap: 1px; background: rgba(246,245,241,.14); margin-top: 6px; }
.suggest button { background: #14140f; border: 0; color: #cfccc4; font-family: 'Archivo', sans-serif;
  font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.45;
  text-align: left; padding: 12px 0; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; width: 100%; }
.suggest button:hover { color: #ff6a3d; }
.suggest button:focus-visible { outline: 2px solid #ff6a3d; outline-offset: 2px; }
.suggest button span { color: #7d7a72; }
.rail-form { display: flex; flex-direction: row; align-items: center; gap: 12px;
  border-top: 1px solid rgba(246,245,241,.18); padding-top: 18px; }
.rail-form .slash { color: #ff6a3d; margin-right: -4px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.rail-form input { flex: 1; border: 0; background: transparent; outline: none;
  font-family: 'Archivo', sans-serif; font-size: 16px; color: #f6f5f1; }
.rail-form input::placeholder { color: #7d7a72; }
.field { position: relative; flex: 1; display: flex; align-items: center; }
.field input { position: relative; z-index: 1; caret-color: transparent; }
.mirror { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre;
  font-family: 'Archivo', sans-serif; font-size: 16px; }
.caret { position: absolute; left: 0; top: 50%; width: 8px; height: 18px; margin-top: -9px;
  background: #ff6a3d; animation: tvBlink 1s steps(1) infinite; transition: left .06s linear;
  pointer-events: none; z-index: 0; }
.caret.typing { animation: none; }
@keyframes tvBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.fallback-link { color: #ff6a3d; }

.rail .status { color: #cfccc4; }
.rail .status[data-state="error"] { color: #ff6a3d; }
.lead-form { display: flex; gap: 10px; margin-top: 6px; }
.lead-form input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid rgba(246,245,241,.3);
  background: transparent; outline: none; font-family: 'Archivo', sans-serif; font-size: 15px;
  color: #f6f5f1; padding: 8px 0; }
.lead-form input::placeholder { color: #7d7a72; }
.lead-form input:focus { border-bottom-color: #ff6a3d; }
.lead-form button { border: 1px solid rgba(246,245,241,.3); background: transparent; color: #f6f5f1;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.lead-form button:hover:not(:disabled) { background: #ff6a3d; border-color: #ff6a3d; color: #14140f; }
.lead-form button:focus-visible { outline: 2px solid #ff6a3d; outline-offset: 2px; }
.lead-form button:disabled { opacity: .6; cursor: default; }

@media (max-width: 1100px) {
  .rail { width: min(460px, 92vw); }
}
@media (max-width: 600px) {
  .rail { width: 100%; padding: 24px 20px 20px; }
  .header-right { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .inner, .rail { transition: none; }
  .caret { animation: none; }
}
