/* Icelus landing, after the Hermes Agent page: one night-blue field, a big engraving, a giant serif headline,
   a footer of round glyph buttons and an engraved wordmark. Tokens are copied from brand/tokens.css (the field colors live there too): 8 point grid, radii 28 and 20,
   48 point capsules, the system fonts, one accent. No font file is bundled; the serif is the system serif. */
:root {
  --accent: #1D4ED8;
  --accent-light: #5B9BFF;
  --ring: rgba(29, 78, 216, 0.30);
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --fg: #1D1D1F;
  --sub: rgba(29, 29, 31, 0.60);
  --soft: rgba(29, 29, 31, 0.80);
  --hair: rgba(60, 60, 67, 0.18);
  /* the field: the navy of the mascot's face in light, a deeper night in dark */
  --field: #0B1F5C;
  --on: #F2F5FF;
  --on-soft: #A9C4F7;
  --on-dim: rgba(242, 245, 255, 0.78);
  --on-hair: rgba(242, 245, 255, 0.16);
  --tile: #0B1F5C;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --r-card: 28px; --r-list: 20px; --control: 48px;
  --wide: max(20px, calc((100vw - 1160px) / 2));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #5B9BFF;
    --ring: rgba(91, 155, 255, 0.30);
    --bg: #000000; --card: #1C1C1E; --fg: #F5F5F7;
    --sub: rgba(245, 245, 247, 0.60); --soft: rgba(245, 245, 247, 0.80); --hair: rgba(255, 255, 255, 0.16);
    --field: #061133; --tile: #061133;
  }
}
:root[data-theme="dark"] {
  --accent: #5B9BFF; --ring: rgba(91, 155, 255, 0.30);
  --bg: #000000; --card: #1C1C1E; --fg: #F5F5F7;
  --sub: rgba(245, 245, 247, 0.60); --soft: rgba(245, 245, 247, 0.80); --hair: rgba(255, 255, 255, 0.16);
  --field: #061133; --tile: #061133;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--field); }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 24px; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--sp-5); }
.wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); align-items: center; }
.wrap.center { text-align: center; }

/* Buttons: 48 point capsules. On the field the primary is paper white; on the page it is the accent. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); height: var(--control); padding: 0 var(--sp-5); border-radius: 999px; border: 1px solid transparent; font: 600 15px/20px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.btn:focus-visible, .icons a:focus-visible, .nav-brand:focus-visible, .nav-links a:focus-visible { outline: 4px solid var(--ring); outline-offset: 2px; }
.btn-solid { background: var(--on); color: var(--field); border-color: var(--on); }
.btn-solid:hover { transform: translateY(-1px); background: #fff; }
.btn-ghost { background: transparent; color: var(--on); border-color: rgba(242, 245, 255, 0.4); }
.btn-ghost:hover { border-color: var(--on); background: rgba(242, 245, 255, 0.08); }

/* Nav: a bar of the field */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--sp-5); height: 72px; padding: 0 var(--wide); background: var(--field); color: var(--on); border-bottom: 1px solid var(--on-hair); }
.nav-brand { display: inline-flex; align-items: center; gap: var(--sp-3); text-decoration: none; font-family: var(--serif); font-size: 24px; line-height: 32px; letter-spacing: -0.01em; border-radius: 12px; }
.nav-brand img { width: 32px; height: 32px; border-radius: 22%; display: block; }
.nav-links { margin-left: auto; display: flex; gap: var(--sp-1); }
.nav-links a { padding: 0 var(--sp-3); font-size: 15px; font-weight: 500; line-height: 48px; text-decoration: none; color: var(--on-dim); border-radius: 24px; }
.nav-links a:hover { color: var(--on); }

/* Hero: the field, the copy, the engraving. --sy is the scroll offset, set by landing.js. */
.hero { position: relative; isolation: isolate; background: var(--field); color: var(--on); overflow: hidden; padding: 0 var(--wide) var(--sp-9); --sy: 0; }
.hero::before { content: ""; position: absolute; z-index: -1; right: -10%; top: -10%; width: 70%; aspect-ratio: 1; pointer-events: none; background: radial-gradient(closest-side, rgba(91, 155, 255, 0.16), transparent); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--sp-6); align-items: center; padding-block: clamp(24px, 4vh, 48px); }
.kicker { font-size: 15px; line-height: 24px; color: var(--on-soft); margin-bottom: var(--sp-4); }
.hero h1 { font-size: clamp(56px, 7.4vw, 96px); line-height: 0.96; letter-spacing: -0.03em; margin-bottom: var(--sp-5); color: var(--on); }
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 28px; color: var(--on-dim); max-width: 36ch; margin-bottom: var(--sp-6); }
.cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.fine { margin-top: var(--sp-4); font-size: 13px; line-height: 16px; color: var(--on-soft); }
.hero-copy > * { opacity: 0; transform: translateY(12px); animation: rise .6s ease-out forwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; } .hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* The engraving. Everything is drawn in currentColor; the rays turn with the page. */
.art { margin: 0; justify-self: center; width: min(100%, 560px); color: #E4ECFF; }
.art svg { display: block; width: 100%; height: auto; overflow: visible; }
.art .rays { transform-origin: 330px 290px; transform: rotate(calc(var(--sy) * 0.03deg)); }
.art .god { filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45)); }
.art figcaption { margin-top: calc(-1 * var(--sp-7)); text-align: center; font-size: 13px; line-height: 16px; color: rgba(228, 236, 255, 0.6); }
.dream .d { stroke-dasharray: 1; stroke-dashoffset: 0; }
.dream .hat { opacity: 0.9; }
@media (prefers-reduced-motion: no-preference) {
  .art .rays { animation: spin 240s linear infinite; }
  .dream .d { stroke-dashoffset: 1; animation: draw 1.8s .5s cubic-bezier(.3, .6, .2, 1) forwards; }
  .dream .hat { opacity: 0; animation: fade 1.2s 1.8s ease-out forwards; }
  .dream :nth-child(n+4) { animation-delay: 1.1s; }
  .stars path { animation: twinkle 5s ease-in-out infinite; }
  .stars path:nth-child(2n) { animation-delay: -2s; } .stars path:nth-child(3n) { animation-delay: -3.5s; }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 0.9; } }
@keyframes twinkle { 50% { opacity: 0.35; } }

/* The real app, running on the page. No device frame. */
.demo-wrap { position: relative; max-width: 1160px; margin: var(--sp-5) auto 0; }
.boxy-peek { position: absolute; right: var(--sp-6); top: -86px; width: 96px; height: 96px; z-index: 0; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.caret { animation: caret 1.2s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.boxy-peek .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.demo { position: relative; z-index: 1; border-radius: var(--r-card); overflow: hidden; border: 1px solid rgba(242, 245, 255, 0.18); box-shadow: 0 32px 80px -32px rgba(0, 0, 0, 0.6); background: var(--card); }
.demo-app { display: block; width: 100%; height: min(680px, 80vh); border: 0; background: var(--card); }
.demo-hint { padding: var(--sp-4) var(--sp-2) 0; font-size: 13px; line-height: 16px; color: var(--on-soft); text-align: center; }

/* Sections */
.sec { padding: var(--sp-9) 0; }
.sec.field { background: var(--field); color: var(--on); }
.sec-head { max-width: 640px; margin-bottom: var(--sp-7); }
.sec h2 { font-size: clamp(48px, 7vw, 92px); line-height: 1; letter-spacing: -0.03em; color: var(--accent); margin-bottom: var(--sp-4); }
.sec.field h2 { color: var(--on); }
.sec-head p, .sec .body { color: var(--sub); font-size: 17px; line-height: 24px; max-width: 46ch; }
.sec.field .body, .sec.field .kicker + h2 + .body { color: var(--on-dim); }
.sec.field + .sec.field { padding-top: 0; }
.sec.field + .sec.field > .wrap { border-top: 1px solid var(--on-hair); padding-top: var(--sp-9); }
.sec .body + .body { margin-top: var(--sp-4); }
.sec.field .cta { margin-top: var(--sp-6); }
.sec.field .kicker { margin-bottom: var(--sp-3); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--hair)); }
.ic { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--sp-3); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 36px; letter-spacing: -0.02em; color: var(--accent); }
.card p { color: var(--soft); font-size: 15px; line-height: 22px; }
.also { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-7); padding-top: var(--sp-6); border-top: 1px solid var(--hair); }
.also h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 32px; letter-spacing: -0.01em; margin-bottom: var(--sp-1); }
.also p { color: var(--sub); font-size: 15px; line-height: 22px; }

/* The character grid card: the one place monospace lives, because the grid is the product */
.grid-card { margin: 0; justify-self: center; width: 100%; max-width: 480px; padding: var(--sp-6) var(--sp-5) var(--sp-5); border: 1px solid var(--on-hair); border-radius: var(--r-card); background: rgba(242, 245, 255, 0.04); }
.grid-card pre { font-family: var(--mono); font-size: 14px; line-height: 17px; color: var(--on); overflow-x: auto; white-space: pre; }
.grid-card figcaption { margin-top: var(--sp-4); font-size: 13px; line-height: 16px; color: var(--on-soft); }

.ad .sec-head { max-width: none; }
.ad-video { display: block; width: 100%; max-width: 1080px; aspect-ratio: 16 / 9; border-radius: var(--r-card); background: var(--field); border: 1px solid var(--hair); }

.plats h2 { margin-bottom: var(--sp-3); }
.plats .body { margin: 0 auto var(--sp-7); }
.plat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); max-width: 960px; margin: 0 auto; }
.plat-row > div { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.plat-row small { font-size: 13px; line-height: 16px; color: var(--on-soft); }
.plat-row b { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 44px; letter-spacing: -0.02em; }
.plat-row p { color: var(--on-dim); font-size: 15px; line-height: 22px; max-width: 28ch; margin-bottom: var(--sp-3); flex: 1; }

/* Footer: three engraved tiles, round glyph buttons, the engraved wordmark, one fine line */
.foot { text-align: center; padding: var(--sp-9) var(--sp-4) var(--sp-5); background: var(--bg); overflow: hidden; }
.tiles { display: flex; justify-content: center; gap: var(--sp-3); margin-bottom: var(--sp-6); color: #E4ECFF; }
.tiles svg { display: block; width: 96px; height: 96px; border-radius: var(--sp-4); background: var(--tile); }
.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.icons a { width: var(--control); height: var(--control); border-radius: 24px; display: inline-grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); text-decoration: none; transition: background .2s, color .2s; }
.icons a:hover { background: var(--accent); color: var(--bg); }
.word-band { position: relative; width: 100vw; margin: var(--sp-6) 0 0 calc(50% - 50vw); height: clamp(160px, 24vw, 340px); }
.word-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.word-band.live .word-canvas { display: block; }
.word-plain { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: clamp(72px, 18vw, 260px); letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.word-band.live .word-plain { display: none; }
.legal { margin-top: var(--sp-2); font-size: 13px; line-height: 16px; color: var(--sub); text-wrap: balance; }
.legal a:hover { color: var(--accent); }

/* Reveal on scroll (landing.js adds .js; without it everything is simply there) */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease-out, transform .6s ease-out; }
  html.js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap.two { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
}
@media (max-width: 820px) {
  .hero { padding-inline: var(--sp-4); padding-bottom: var(--sp-8); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .art { width: min(100%, 360px); order: 2; margin-top: calc(-1 * var(--sp-4)); }
  .boxy-peek { right: var(--sp-4); top: -78px; width: 80px; height: 80px; }
  .plat-row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
  .nav { padding-inline: var(--sp-4); gap: var(--sp-3); }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: var(--sp-4); }
  .sec { padding: var(--sp-8) 0; }
  .cards, .also { grid-template-columns: minmax(0, 1fr); }
  .demo-app { height: min(640px, 78vh); }
  .demo { border-radius: var(--r-list); }
  .tiles svg { width: 80px; height: 80px; }
  .cta .btn { flex: 1 1 100%; }
  .icons { gap: var(--sp-2); }
  .word-band { height: 200px; }
  .grid-card pre { font-size: 12px; line-height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .boxy-peek, .boxy-peek .eyes, .caret, .art .rays { animation: none !important; opacity: 1; transform: none; }
  .art .rays { transform: none; }
  .card, .btn, .icons a { transition: none; }
}
