/* Inteladigm — the lander.
   One screen. Night ground, warm off-white type, one electric blue (#0027FF).
   The temple is lit from inside its door; everything else stays quiet so that light
   is the loudest thing on the page. Mono is the machine's voice. */

:root {
  --ground: #0e0e0d;
  --ink: #ece9e3;
  --ink-2: #a9a59c;
  --mute: #6f6b64;
  --rule: rgba(236, 233, 227, 0.1);
  --blue: #0027ff;
  --sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --boost: 1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* The screen */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  height: 100svh; min-height: 620px;
  display: grid; grid-template-rows: auto 1fr;
  padding: 0 var(--gutter);
}
.stage { position: absolute; inset: 0; z-index: 0; }
.stage canvas { display: block; width: 100%; height: 100%; }

/* The bloom: soft electric light over the door, swelling when the page asks it to. */
.bloom { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; will-change: transform; }
.bloom i {
  position: absolute; left: -360px; top: -360px; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 39, 255, 0.34) 0%, rgba(0, 39, 255, 0.12) 32%, transparent 64%);
  mix-blend-mode: screen; transform: scale(calc(0.85 + 0.35 * (var(--boost) - 1) / 0.8));
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { filter: brightness(1.15); } }

/* Drafting frame: hairlines inset from the edge, + ticks at the corners. */
.frame { position: absolute; inset: 14px; z-index: 1; pointer-events: none; border: 1px solid var(--rule); opacity: 0; transition: opacity 1.6s var(--ease) 0.4s; }
.frame i { position: absolute; width: 11px; height: 11px; }
.frame i::before, .frame i::after { content: ""; position: absolute; background: var(--ink-2); }
.frame i::before { left: 5px; top: 0; width: 1px; height: 11px; }
.frame i::after { top: 5px; left: 0; height: 1px; width: 11px; }
.frame i:nth-child(1) { left: -6px; top: -6px; } .frame i:nth-child(2) { right: -6px; top: -6px; }
.frame i:nth-child(3) { left: -6px; bottom: -6px; } .frame i:nth-child(4) { right: -6px; bottom: -6px; }

/* Top bar */
.top {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: clamp(26px, 3vw, 38px);
}
.word { font-weight: 500; font-size: 18px; letter-spacing: -0.02em; }

/* The line */
.copy { position: relative; z-index: 3; align-self: center; display: grid; justify-items: start; gap: 30px; max-width: 760px; padding: 40px 0; }
.title { margin: 0; font-weight: 300; font-size: clamp(54px, 7.4vw, 132px); line-height: 0.93; letter-spacing: -0.05em; }
.line { display: block; white-space: nowrap; }
.title em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; padding-right: 0.05em;
  color: var(--blue);
  text-shadow: 0 0 calc(18px * var(--boost)) rgba(0, 39, 255, 0.55), 0 0 calc(60px * var(--boost)) rgba(0, 39, 255, 0.35);
  cursor: default; transition: text-shadow .6s var(--ease);
}
/* Words: each one can glitch. While it does, unresolved letters are code glyphs in blue. */
.w { cursor: help; }
.w .g { font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 0.78em; color: var(--blue); }
.title em .w .g { font-size: 0.7em; }

.sub { max-width: 30ch; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.4; color: var(--ink-2); text-wrap: balance; }


/* The action: a compact, softly rounded button with a quiet light fill, in the manner of
   Claude's own UI. No pill, no glow at rest; the door light answers on hover instead. */
.cta {
  font: inherit; cursor: pointer; appearance: none;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 16px;
  border-radius: 8px; border: 1px solid transparent;
  background: var(--ink); color: var(--ground);
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cta span { font-weight: 400; transition: transform .25s var(--ease); }
.cta:hover, .cta:focus-visible { background: #fff; }
.cta:hover span, .cta:focus-visible span { transform: translateX(3px); }
.cta:active { transform: translateY(1px); }

/* Contact: a popup in the page's own language. Night panel, hairline frame with
   corner ticks, mono labels, the same compact button. The temple keeps glowing behind. */
.contact {
  width: min(576px, calc(100vw - 16px)); max-height: calc(100svh - 16px); padding: 8px; margin: auto;
  border: 0; background: transparent; color: var(--ink); overflow: auto; overscroll-behavior: contain;
}
.contact::backdrop { background: rgba(6, 6, 6, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.contact[open] { animation: rise .5s var(--ease); }
.contact[open]::backdrop { animation: fade .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.contact__panel {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  background: rgba(18, 18, 17, 0.94); border: 1px solid rgba(236, 233, 227, 0.14);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 39, 255, 0.0);
}
.contact .tick { position: absolute; width: 11px; height: 11px; pointer-events: none; }
.contact .tick::before, .contact .tick::after { content: ""; position: absolute; background: var(--ink-2); }
.contact .tick::before { left: 5px; top: 0; width: 1px; height: 11px; }
.contact .tick::after { top: 5px; left: 0; height: 1px; width: 11px; }
.contact .tick:nth-of-type(1) { left: -6px; top: -6px; } .contact .tick:nth-of-type(2) { right: -6px; top: -6px; }
.contact .tick:nth-of-type(3) { left: -6px; bottom: -6px; } .contact .tick:nth-of-type(4) { right: -6px; bottom: -6px; }
.contact__close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center;
  font: 300 24px/1 var(--sans); color: var(--ink-2); background: none; border: 0; border-radius: 8px; cursor: pointer;
  transition: color .2s, background .2s;
}
.contact__close:hover { color: var(--ink); background: rgba(236, 233, 227, 0.06); }
.contact__form, .contact__done { display: grid; gap: 18px; }
.contact [hidden] { display: none; }
.contact__title { margin: 0 0 2px; font-weight: 300; font-size: clamp(32px, 4.4vw, 44px); line-height: 1; letter-spacing: -0.04em; padding-right: 36px; }
.contact__title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--blue); text-shadow: 0 0 24px rgba(0, 39, 255, 0.5); }
.contact__lede { color: var(--ink-2); font-size: 15px; margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.field span i { font-style: normal; color: var(--mute); margin-left: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: rgba(236, 233, 227, 0.04); border: 1px solid rgba(236, 233, 227, 0.14); border-radius: 8px;
  padding: 11px 13px; outline: none; resize: vertical; transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 112px; line-height: 1.45; }
.field input:focus, .field textarea:focus { border-color: var(--blue); background: rgba(0, 39, 255, 0.06); box-shadow: 0 0 0 3px rgba(0, 39, 255, 0.22); }
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 4px; }
.contact__error { font-size: 14px; color: #ff8a8a; min-height: 1.4em; }
.cta[disabled] { opacity: .55; cursor: progress; }
.cta--ghost { background: transparent; color: var(--ink); border-color: rgba(236, 233, 227, 0.22); justify-self: start; }
.cta--ghost:hover, .cta--ghost:focus-visible { background: rgba(236, 233, 227, 0.06); }
@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; }
  .contact__form { gap: 14px; }
  .field textarea { min-height: 96px; }
  .contact__foot { flex-direction: column-reverse; align-items: stretch; }
  .contact__foot .cta { justify-content: center; }
}

/* Film: a little grain and scanline over everything, and a vignette. */
.grain {
  position: fixed; inset: -50%; z-index: 10; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 60% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

/* Entrance: the bars and frame arrive once the light is up. */
.js .top, .js .cta { opacity: 0; transform: translateY(8px); }
.js .frame { opacity: 0; }
.is-on .top, .is-on .cta { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.is-on .frame { opacity: 1; }
.is-on .cta { transition-delay: .9s; }

/* Phones: one screen. The line up top, the lit temple filling what's left below it. */
@media (max-width: 820px) {
  .hero { height: 100svh; min-height: 560px; grid-template-rows: auto auto minmax(0, 1fr); }
  .frame { inset: 10px; }
  .top { padding-top: 26px; }
  .stage { position: relative; inset: auto; grid-row: 3; margin: 0 calc(-1 * var(--gutter)); min-height: 0; }
  .copy { grid-row: 2; align-self: start; padding: clamp(36px, 7svh, 64px) 0 0; gap: 20px; }
  .title { font-size: clamp(44px, 12.6vw, 76px); line-height: 0.95; }
  .line { white-space: normal; }
  .sub { font-size: 17px; max-width: 26ch; }
  .bloom i { left: -200px; top: -200px; width: 400px; height: 400px; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .copy { padding-top: 24px; gap: 16px; }
  .title { font-size: clamp(40px, 11vw, 60px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .top, .js .cta, .js .frame { opacity: 1; transform: none; }
}
