/* ==========================================================================
   v2 additions: feature card, cycling phone, Maya diagrams, mobile demo, video, photo
   ========================================================================== */

/* Ledger: big side-by-side card that shows the real app uncropped */
/* the whole screenshot is visible: framed on all four sides, never cut */
.card.feature { display: grid; grid-template-columns: 1.6fr 1fr; align-items: stretch; }
.card.feature .card-media { aspect-ratio: auto; padding: 28px; place-items: center; }
.card.feature .browser { height: auto; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); transform: none; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75); }
.card.feature:hover .browser { transform: translateY(-4px); }
.card.feature .browser-view { flex: none; }
.card.feature .browser-view img { width: 100%; height: auto; display: block; }
.card.feature .card-body { padding: 32px 32px 32px 8px; justify-content: center; gap: 14px; }
.card.feature .card-body p { font-size: 16.5px; }
.card.feature .card-foot { margin-top: 10px; }
@media (max-width: 960px) { .card.feature { grid-template-columns: 1fr; } .card.feature .card-media { padding: 20px; } .card.feature .card-body { padding: 22px 24px 24px; } }

/* website cards: browser framed on all sides too (hover still scrolls the page inside) */
.card:not(.feature) .card-media:has(.browser) { padding: 22px; }
.card:not(.feature) .browser { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); transform: none; box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.75); }
.card:not(.feature):hover .browser { transform: translateY(-4px); }

/* phone cards: every phone fully inside the card, sized by height */
.card .phones { position: absolute; inset: 20px; height: auto; align-items: center; justify-content: center; gap: 14px; }
.card .phones .phone { width: auto; height: 100%; max-height: 100%; transform: none; flex: none; }
.card:hover .phones .phone { transform: translateY(-6px); }

/* cycling phone */
.phone.cycle { position: relative; z-index: 2; }
.phone.cycle img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); opacity: 0; transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transform: scale(1.02); }
.phone.cycle img.on { opacity: 1; transform: none; }
.card .phones .phone.side { height: 80%; opacity: 0.9; }
.card:hover .phones .phone.side { transform: translateY(-2px); opacity: 1; }

/* Maya mini pipeline on the card */
.mini-pipe { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 6px; padding: 0 8px 26px; max-width: 440px; }
.mp-node { font: 600 11.5px/1 var(--font-mono); padding: 9px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: color-mix(in oklab, var(--bg) 70%, transparent); animation: mpGlow 6s infinite; animation-delay: calc(var(--i) * 1s); }
.mp-link { width: 14px; height: 1px; background: var(--line-2); }
@keyframes mpGlow {
  0%, 12% { color: var(--bg); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 22px color-mix(in oklab, var(--accent) 60%, transparent); }
  22%, 100% { color: var(--text-2); background: color-mix(in oklab, var(--bg) 70%, transparent); border-color: var(--line-2); box-shadow: none; }
}

/* Maya explainer: stepper */
.pipe { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.pipe-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pipe-steps button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; min-height: 64px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: var(--text-2); transition: background 0.25s, border-color 0.25s, color 0.25s; }
.pipe-steps button span { font-size: 11px; color: var(--text-3); }
.pipe-steps button:hover { border-color: var(--line-2); color: var(--text); }
.pipe-steps button[aria-selected="true"] { background: color-mix(in oklab, var(--accent) 16%, var(--surface-2)); border-color: color-mix(in oklab, var(--accent) 60%, transparent); color: var(--text); }
.pipe-steps button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.pipe-track { position: relative; height: 2px; background: var(--line); margin: 16px 6px; border-radius: 2px; overflow: hidden; }
.pipe-pulse { position: absolute; top: 0; left: 0; height: 100%; width: var(--w, 16.66%); background: linear-gradient(90deg, transparent, var(--accent)); transition: width 0.6s var(--ease-out); }
.pipe-panels { position: relative; min-height: 96px; }
.pipe-panel { display: none; animation: fadeUp 0.45s var(--ease-out); }
.pipe-panel.on { display: block; }
.pipe-panel b { font-size: 18px; }
.pipe-panel p { margin: 6px 0 0; }
@media (max-width: 900px) { .pipe-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .pipe-steps { grid-template-columns: repeat(2, 1fr); } }

/* incident loop */
.loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: l; }
.loop li { counter-increment: l; position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.loop li::before { content: counter(l, decimal-leading-zero); font: 500 11px var(--font-mono); color: var(--text-3); }
.loop li:not(:last-child)::after { content: "\2192"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 14px; z-index: 1; background: var(--bg); padding: 0 1px; }
.loop b { font-size: 16px; }
.loop span { color: var(--text-2); font-size: 14.5px; }
.loop li.human { border-color: color-mix(in oklab, var(--gold) 60%, transparent); background: color-mix(in oklab, var(--gold) 9%, var(--surface)); }
.loop li.human b { color: var(--gold-2); }
@media (max-width: 900px) { .loop { grid-template-columns: 1fr 1fr; } .loop li::after { display: none; } }
@media (max-width: 520px) { .loop { grid-template-columns: 1fr; } }

/* Ledger Mobile demo */
.demo {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(18px, 3vw, 32px);
  background: radial-gradient(80% 90% at 0% 50%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%), var(--surface);
}
.demo-phone { width: clamp(220px, 26vw, 290px); aspect-ratio: 9 / 19.5; border-radius: 34px; background: #050505; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.8); }
.demo-screen { all: unset; cursor: pointer; display: block; position: relative; width: 100%; height: 100%; border-radius: 27px; overflow: hidden; background: #f5f3ee; }
.demo-screen:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.demo-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: translateX(14px); transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.demo-screen img.on { opacity: 1; transform: none; }
.demo-screen img.out { opacity: 0; transform: translateX(-14px); }
.demo-flows { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-flows button { all: unset; cursor: pointer; min-height: 40px; box-sizing: border-box; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 700; font-size: 13.5px; color: var(--text-2); transition: all 0.2s; }
.demo-flows button:hover { color: var(--text); border-color: var(--text-3); }
.demo-flows button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #06231e; }
.demo-flows button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.demo-step { margin-top: 22px; min-height: 92px; }
.demo-count { font-size: 12px; color: var(--text-3); }
.block .demo-cap { font-size: clamp(18px, 2vw, 22px); color: var(--text); margin: 6px 0 0; line-height: 1.4; }
.demo-dots { display: flex; gap: 6px; margin: 6px 0 18px; }
.demo-dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background 0.3s, width 0.3s; }
.demo-dots i.on { background: var(--accent); width: 34px; }
.demo-ctrl { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-ctrl [data-play][aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .demo { grid-template-columns: 1fr; justify-items: center; } .demo-side { width: 100%; } }

/* video */
.video-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; max-width: 380px; aspect-ratio: 9 / 16; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; }

/* hero photo: two columns so the headline never runs under the picture */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero .hero-grid h1 { font-size: clamp(44px, 6.4vw, 96px); }
.hero-photo {
  margin: 0; width: clamp(220px, 24vw, 340px); aspect-ratio: 1; border-radius: 50%; padding: 5px; position: relative;
  background: conic-gradient(from 200deg, var(--gold-2), var(--gold), rgba(212, 169, 79, 0.08) 45%, rgba(212, 169, 79, 0.08) 70%, var(--gold-2));
  box-shadow: 0 30px 80px -30px rgba(212, 169, 79, 0.45);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid var(--bg); display: block; }
.hero-photo::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(212, 169, 79, 0.35); animation: orbit 40s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo::after { animation: none; } }

/* Maya page hero visual */
.maya-hero { display: grid; justify-items: center; gap: 28px; padding: 44px 0 56px; }
.maya-hero > img { width: 96px; height: 96px; border-radius: 26px; background: #fbf8f1; padding: 10px; box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 12%, transparent), 0 0 60px color-mix(in oklab, var(--accent) 45%, transparent); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 18px color-mix(in oklab, var(--accent) 6%, transparent), 0 0 90px color-mix(in oklab, var(--accent) 55%, transparent); } }
.mini-pipe.big { max-width: 820px; gap: 12px 10px; padding: 0; }
.mini-pipe.big .mp-node { font-size: 14px; padding: 13px 18px; }
.mini-pipe.big .mp-link { width: 26px; }
