/* Hero: the promise beside the real app, its screenshots tilted. */
main { overflow-x: clip; }
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 32px; align-items: center; padding-block: 48px 24px; }
.hero-copy { display: grid; gap: 22px; min-width: 0; animation: arrive .65s ease-out both; }
.hero-copy .eyebrow { display: flex; gap: 8px; align-items: center; font-size: 14px; letter-spacing: .02em; text-transform: none; color: var(--accent); }
.hero-copy .eyebrow svg { width: 14px; height: 18px; }
.hero h1 { font-size: clamp(48px, 6.4vw, 84px); letter-spacing: -.055em; line-height: .98; }
.hero h1 span { color: #e8461f; }
.hero-note { font-size: 13px; color: var(--muted); }
.hero-art { position: relative; min-width: 0; height: 700px; isolation: isolate; }
.art-glow { position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(18px); }
.glow-blue { width: 440px; height: 440px; left: -8%; top: 21%; background: radial-gradient(circle, #d0eaff 0%, #e1edff60 46%, transparent 70%); }
.glow-coral { width: 370px; height: 490px; right: -8%; top: 3%; background: radial-gradient(ellipse, #ffe3d6 0%, #ffece352 50%, transparent 72%); }
.device { position: absolute; width: 258px; }
.device-accounts { left: 2%; top: 78px; transform: rotate(-6deg); z-index: 2; animation: phone-arrive .85s .12s ease-out both; --angle: -6deg; }
.device-operations { right: 1%; top: 8px; transform: rotate(6deg); z-index: 1; animation: phone-arrive .85s .2s ease-out both; --angle: 6deg; }
.device img { width: 100%; height: auto; filter: drop-shadow(0 16px 24px #333c5040); }
.device figcaption { text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 22px; }
/* Transform only: the screenshots stay visible even if the animation never runs. */
@keyframes phone-arrive { from { transform: translateY(18px) rotate(var(--angle)); } to { transform: translateY(0) rotate(var(--angle)); } }
@media (max-width: 1100px) {
  .hero-art { height: 650px; }
  .device { width: 230px; }
  .device-accounts { left: 0; top: 80px; }
  .device-operations { right: 0; top: 0; }
}
@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .hero-art { width: 550px; max-width: 100%; height: 640px; margin-inline: auto; }
  .device { width: 255px; }
  .device-accounts { left: 3%; top: 65px; }
  .device-operations { right: 3%; top: 0; }
}
@media (max-width: 640px) {
  .hero-art { width: 365px; height: 480px; }
  .device { width: min(180px, 45vw); }
  .device-accounts { left: 2%; top: 51px; }
  .device-operations { right: 2%; top: 0; }
  .device figcaption { font-size: 10px; margin-top: 14px; }
  .device-operations figcaption { padding-left: 46px; }
  .art-glow { width: 280px; height: 350px; }
}
@media (max-width: 360px) {
  .hero-art { height: 440px; }
  .device { width: 160px; }
}

/* Interactive example: fixed heights so nothing moves while it is played with. */
.try { padding-top: 48px; }
.demo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; grid-template-areas: "head graph" "lines graph"; gap: 10px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 30px; box-shadow: var(--shadow); padding: 28px; }
.demo-head { grid-area: head; display: grid; gap: 4px; min-width: 0; }
.demo-lines { grid-area: lines; display: grid; gap: 10px; align-content: start; min-width: 0; }
.demo-graph { grid-area: graph; display: grid; gap: 10px; min-width: 0; align-content: start; }
.demo-when { font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-amount { font-size: clamp(40px, 5vw, 56px); font-weight: 750; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; transition: color .3s; }
.demo-amount.negative { color: var(--ios-red); }
.chips-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; white-space: nowrap; }
.chip:hover { border-color: var(--blue); }
.chip:active { transform: scale(.96); }
.chip .sign { width: 12px; text-align: center; color: var(--blue); font-weight: 800; }
.chip .amt { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--blue-soft); border-color: transparent; }
.chip[aria-pressed="true"] .amt { color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--grey-line); border-radius: 2px; }
.legend i.computed { border-top-style: dashed; border-top-color: var(--blue); }
.legend i.band { height: 10px; border: 0; background: var(--blue-soft); border-radius: 3px; }
.readout { height: calc(3 * 1.45em + 20px); overflow: hidden; padding: 10px 14px; border-radius: 14px; background: var(--sunken); font-size: 14px; line-height: 1.45; color: var(--muted); }
.readout b { color: var(--text); font-weight: 650; }
@media (max-width: 860px) {
  .demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "graph" "lines"; padding: 20px; gap: 16px; }
  .chips-label { margin-top: 0; }
  .chip { padding: 7px 11px; font-size: 13px; }
}

/* Three gestures */
.gestures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; list-style: none; }
.gesture { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 18px 18px 22px; display: grid; gap: 12px; align-content: start; }
.gesture .step { font-size: 13px; font-weight: 750; color: var(--accent); font-variant-numeric: tabular-nums; margin-top: 4px; }
.gesture h3 { font-size: 20px; letter-spacing: -.025em; }
.gesture p { color: var(--muted); font-size: 15px; }
.gesture .ios-list { min-height: 150px; align-content: center; }
@media (max-width: 860px) { .gestures { grid-template-columns: minmax(0, 1fr); } }

/* The bank, a spreadsheet, Selene */
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.compare article { border-radius: 24px; padding: 22px; display: grid; gap: 12px; align-content: start; border: 1px solid var(--border); background: var(--surface); }
.compare article.selene { border-color: transparent; background: var(--blue-soft); }
.compare svg { width: 100%; height: 92px; display: block; }
.compare h3 { font-size: 20px; letter-spacing: -.025em; }
.compare p { font-size: 15px; color: var(--muted); }
.compare .selene p { color: var(--text); }
@media (max-width: 820px) { .compare { grid-template-columns: minmax(0, 1fr); } }

/* Projection and statistics */
.deep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.deep article { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 26px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.deep h3 { font-size: clamp(24px, 2.6vw, 30px); }
.deep article > p { color: var(--muted); font-size: 16px; max-width: 46ch; }
.deep .ios-card { border: 1px solid var(--border); }
.projection svg { width: 100%; height: auto; display: block; }
.projection text { font-size: 11px; fill: var(--ios-secondary); }
.stats { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.stats svg { width: 132px; height: 132px; }
.shares { display: grid; gap: 7px; padding: 0; list-style: none; font-size: 13px; }
.shares li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.shares i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.shares b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .deep { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .stats { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .shares { width: 100%; }
}

/* Feature tiles, each with an excerpt of the app */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.tile .shot { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--ios-bg); border: 1px solid var(--border); }
.tile .shot img { width: 100%; height: 100%; object-fit: cover; }
.tile .shot-icon { display: grid; place-items: center; }
.tile .shot-icon svg { width: 46%; height: auto; }
.tile h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 18px; letter-spacing: -.025em; }
.tile p { font-size: 15px; color: var(--muted); }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* Closing: the icon draws itself (SignatureGlyph.swift), started by home.js once in view */
.signature { width: 112px; height: 112px; border-radius: 25px; background: linear-gradient(160deg, #ff7a52, #f04a26); box-shadow: 0 16px 40px #f04a2647; }
.signature svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sig g { filter: drop-shadow(0 8px 12px #78140040); }
.sig .outline { stroke-dasharray: 1; stroke-dashoffset: 0; }
.sig .bar, .sig .point, .sig .ripple { transform-box: fill-box; }
.sig .bar { transform-origin: left center; }
.sig .point, .sig .ripple { transform-origin: center; }
.sig .ripple { opacity: 0; }
.sig.armed .outline { stroke-dashoffset: 1; }
.sig.armed .bar { transform: scaleX(0); }
.sig.armed .point { opacity: 0; }
.sig.play .outline { animation: trace .45s cubic-bezier(.4, 0, .2, 1) both; }
.sig.play .bar { animation: fill-bar .42s cubic-bezier(.2, .8, .2, 1) .3s both; }
.sig.play .point { animation: sig-drop .82s .7s both; }
.sig.play .ripple { animation: sig-ripple 1.1s cubic-bezier(.15, .6, .35, 1) 1.05s both; }
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fill-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sig-drop {
  0% { transform: translateY(-200px) scale(.38); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .8, .45); }
  14% { opacity: 1; }
  39% { transform: translateY(0) scale(.38); opacity: 1; animation-timing-function: ease-out; }
  62% { transform: scale(1.1); }
  82% { transform: scale(.98); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes sig-ripple { 0% { transform: scale(1); opacity: 0; } 3% { opacity: .45; } 100% { transform: scale(2.8); opacity: 0; } }

@media print {
  .hero-art, .demo { display: none; }
}
