/* Owlink: product layer on top of brand.css. */

:root {
  --accent: var(--owl-coral);
  --accent-ink: var(--owl-navy);
  --accent-soft: #ffe1d8;
}
@media (prefers-color-scheme: dark) {
  :root { --accent-soft: #3b2740; }
}

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 112px) 0 0; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 18% 20%, color-mix(in srgb, var(--owl-coral) 22%, transparent), transparent 70%),
    radial-gradient(36% 46% at 85% 10%, color-mix(in srgb, var(--owl-gold) 20%, transparent), transparent 70%),
    radial-gradient(50% 60% at 50% 90%, color-mix(in srgb, var(--owl-lilac) 18%, transparent), transparent 70%);
}
.hero-copy { text-align: center; max-width: 820px; margin-inline: auto; }
.hero-icon { width: 104px; height: 104px; margin: 0 auto 22px; filter: drop-shadow(0 14px 24px rgb(39 41 90 / .28)); }
.hero h1 span { color: var(--owl-coral-deep); }
@media (prefers-color-scheme: dark) { .hero h1 span { color: var(--owl-gold); } }
.hero .lede { margin: 0 auto 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-meta { margin-top: 16px; font-size: .9rem; color: var(--text-muted); }
.download-cta { padding: 28px 0; }
.download-cta .hero-meta { margin-bottom: 0; }

.hero-stage { position: relative; margin: clamp(48px, 7vw, 80px) auto 0; max-width: 1040px; }
.window {
  border-radius: 12px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
}
.hero-stage .window { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.hero-owl {
  position: absolute; right: clamp(8px, 5%, 64px); top: 0; transform: translateY(-91%); z-index: 2;
  width: clamp(92px, 12vw, 140px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
}
.hero-owl .bubble {
  position: absolute; right: 88%; bottom: 62%; white-space: nowrap;
  background: var(--surface); color: var(--text); font-size: .86rem; font-weight: 600;
  padding: 8px 12px; border-radius: 12px 12px 2px 12px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom right;
  transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none;
}
.hero-owl.is-talking .bubble { opacity: 1; transform: none; }
html:not(.js) .hero-owl:hover .bubble, html:not(.js) .hero-owl:focus-visible .bubble { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-owl .bubble { transform: none; transition: none; }
}

/* Sprite owls: strips of square frames, played with steps(). */
.sprite { display: block; width: 100%; aspect-ratio: 1; background-repeat: no-repeat; background-size: 100% 100%; }
.sprite--idle { background-image: url("../img/owl/owl-idle.webp"); }
.is-waving .sprite--idle {
  background-image: url("../img/owl/owl-wave-strip.webp"); background-size: 400% 100%;
  animation: owl-wave .9s steps(4) 2;
}
.is-blinking .sprite--idle {
  background-image: url("../img/owl/owl-blink-strip.webp"); background-size: 300% 100%;
  animation: owl-blink .3s steps(3) 1;
}
@keyframes owl-wave { from { background-position: 0 0; } to { background-position: 133.333% 0; } }
@keyframes owl-blink { from { background-position: 0 0; } to { background-position: 150% 0; } }

/* ---------- install strip ---------- */

.install { padding: 28px 0; border-block: 1px solid var(--border); background: var(--surface); }
.install .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.install p { margin: 0; color: var(--text-muted); }
.install strong { color: var(--text); }
.cmd {
  display: flex; align-items: stretch; border-radius: var(--radius-s); overflow: hidden;
  background: var(--owl-night); color: #f3e3d3; font: .88rem/1.55 var(--font-mono);
  max-width: 100%;
}
.cmd pre { margin: 0; padding: 12px 16px; overflow-x: auto; }
.cmd pre .c { color: #9a9cc0; }
.cmd pre .p { color: var(--owl-gold); user-select: none; }
.copy {
  border: 0; border-left: 1px solid #2e3060; background: #24264f; color: #f3e3d3;
  font: 600 .82rem/1 var(--font-sans); padding: 0 16px; cursor: pointer; min-width: 74px;
}
.copy:hover { background: #2e3060; }
@media (max-width: 600px) {
  .cmd { flex-direction: column; width: 100%; }
  .cmd pre { font-size: .78rem; }
  .copy { border-left: 0; border-top: 1px solid #2e3060; padding: 12px; }
}
/* ---------- feature rows ---------- */

.feature-row {
  display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  margin-top: clamp(56px, 8vw, 104px);
}
.feature-row--flip { grid-template-columns: 1.35fr 1fr; }
.feature-row--flip .feature-text { order: 2; }
.feature-text p { color: var(--text-muted); }
.feature-text ul { padding-left: 1.1em; color: var(--text-muted); margin: 0; }
.feature-text li { margin-bottom: .35em; }
.feature-text .pill { margin-bottom: 14px; }
@media (max-width: 860px) {
  .feature-row, .feature-row--flip { grid-template-columns: 1fr; }
  .feature-row--flip .feature-text { order: 0; }
}

.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 18px;
}
.stat b { display: block; font: 800 clamp(1.8rem, 3.6vw, 2.5rem)/1 var(--font-display); color: var(--heading); letter-spacing: -.03em; }
.stat span { display: block; margin-top: 8px; font-size: .9rem; color: var(--text-muted); }
.stat-note { font-size: .82rem; color: var(--text-muted); margin-top: 10px; }

.tabs-demo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow); }
.tabs-demo .tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs-demo .tab { font: .82rem/1 var(--font-sans); padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.tabs-demo .tab.dirty::after { content: " ●"; color: var(--owl-coral); }
.tabs-demo .tab.on { background: var(--accent-soft); color: var(--text); }

/* ---------- small feature grid ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card p { color: var(--text-muted); margin: 0; font-size: .96rem; }
.card ul { color: var(--text-muted); padding-left: 1.1em; margin: 0; font-size: .96rem; }
.card li + li { margin-top: .4em; }
.card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--heading); }
.card .ico svg { width: 20px; height: 20px; }

/* ---------- themes ---------- */

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 40px; }
.theme {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--t-bg); color: var(--t-fg); margin: 0;
}
.theme pre { margin: 0; padding: 16px 16px 14px; font: .8rem/1.6 var(--font-mono); overflow: hidden; }
.theme .k { color: var(--t-kw); } .theme .s { color: var(--t-str); } .theme .t { color: var(--t-type); }
.theme .c { color: var(--t-com); } .theme .n { color: var(--t-num); }
.theme figcaption {
  display: flex; justify-content: space-between; padding: 10px 16px; font: 600 .84rem/1.2 var(--font-sans);
  background: var(--t-bar); color: var(--t-fg); border-top: 1px solid color-mix(in srgb, var(--t-fg) 12%, transparent);
}
.theme figcaption small { font-weight: 500; opacity: .8; }
.theme--cedric { --t-bg: #fbeee4; --t-fg: #27295a; --t-bar: #f4e2d4; --t-kw: #8a5300; --t-str: #b2391d; --t-type: #2f4f9a; --t-com: #5d5f83; --t-num: #855400; }
.theme--night { --t-bg: #1b1c3d; --t-fg: #f3e3d3; --t-bar: #22234a; --t-kw: #ffc533; --t-str: #ff8d6b; --t-type: #a9b4ff; --t-com: #9a9cc0; --t-num: #ffd36e; }
.theme--light { --t-bg: #ffffff; --t-fg: #1d1d1f; --t-bar: #f2f2f4; --t-kw: #9b2393; --t-str: #c41a16; --t-type: #0b4f79; --t-com: #5d6c79; --t-num: #1c00cf; }
.theme--dark { --t-bg: #1f1f24; --t-fg: #dfdfe0; --t-bar: #26262b; --t-kw: #fc5fa3; --t-str: #fc6a5d; --t-type: #5dd8ff; --t-com: #8a96a2; --t-num: #d0bf69; }
.theme--tankard { --t-bg: #1f0d3d; --t-fg: #fff6e6; --t-bar: #331a62; --t-kw: #f2a93b; --t-str: #8fe8a8; --t-type: #f3c2ff; --t-com: #ab9bd0; --t-num: #b0ccff; }
.theme--dracula { --t-bg: #282a36; --t-fg: #f8f8f2; --t-bar: #21222c; --t-kw: #ff79c6; --t-str: #f1fa8c; --t-type: #8be9fd; --t-com: #8f9bc8; --t-num: #bd93f9; }
.theme--system { --t-bg: #ffffff; --t-fg: #1d1d1f; --t-bar: #f2f2f4; --t-kw: #9b2393; --t-str: #c41a16; --t-type: #0b4f79; --t-com: #5d6c79; --t-num: #1c00cf; }
@media (prefers-color-scheme: dark) {
  .theme--system { --t-bg: #1f1f24; --t-fg: #dfdfe0; --t-bar: #26262b; --t-kw: #fc5fa3; --t-str: #fc6a5d; --t-type: #5dd8ff; --t-com: #8a96a2; --t-num: #d0bf69; }
}

/* ---------- Cedric band ---------- */

.cedric { background: var(--owl-night); border-block: 1px solid #2e3060; color: #f3e3d3; position: relative; overflow: hidden; }
.cedric::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(30% 40% at 90% 0%, rgb(255 197 51 / .14), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgb(255 124 92 / .14), transparent 70%);
}
.cedric .wrap { position: relative; }
.cedric h2, .cedric h3 { color: #fff3e6; }
.cedric .eyebrow, .cedric .lede, .cedric p { color: #c9c4e0; }
.cedric a { color: #ffd9b0; }
.cedric :focus-visible { outline-color: var(--owl-gold); }

.poses { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 2vw, 22px); margin: 48px auto 0; max-width: 900px; list-style: none; padding: 0; }
.poses li { text-align: center; font-size: .86rem; color: #c9c4e0; }
.poses .perch { width: 100%; margin-bottom: 10px; transition: transform .3s var(--ease); }
.poses li:hover .perch { transform: translateY(-4px) rotate(-2deg); }
.poses img { width: 86%; }
@media (max-width: 600px) { .poses { grid-template-columns: repeat(3, 1fr); } .poses li:nth-child(n+4) { display: none; } }

.cedric-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
@media (max-width: 960px) { .cedric-cards { grid-template-columns: 1fr; } }
.ccard {
  background: #22244a; border: 1px solid #33366b; border-radius: var(--radius-l);
  padding: 26px; display: flex; flex-direction: column;
}
.ccard p { font-size: .96rem; }
.ccard ul { color: #c9c4e0; padding-left: 1.1em; font-size: .94rem; margin: 0 0 18px; }
.ccard figure { margin: auto 0 0; }
.ccard img { border-radius: 10px; margin-inline: auto; box-shadow: 0 20px 40px -20px #000; }
.ccard figcaption { font-size: .8rem; color: #9a9cc0; margin-top: 10px; text-align: center; }

.engines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 760px) { .engines { grid-template-columns: 1fr; } }
.engine { border: 1px solid #33366b; border-radius: var(--radius); padding: 18px 20px; }
.engine h4 { font-size: 1.02rem; margin-bottom: 6px; }
.engine p { margin: 0; font-size: .92rem; }

/* ---------- devices ---------- */

.devices { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 48px; align-items: end; }
.device {
  margin: 0; border-radius: 28px; padding: 10px; background: #0d0e1f;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px #2e3060;
}
.device img { border-radius: 20px; }
.device--phone { max-width: 300px; margin-inline: auto; border-radius: 40px; padding: 9px; }
.device--phone img { border-radius: 32px; }
.device--tablet {
  margin-top: 28px;
  max-width: 720px;
  margin-inline: auto;
}
.device-cap { font-size: .84rem; color: var(--text-muted); margin-top: 12px; text-align: center; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--surface); border: 1px dashed var(--text-muted); color: var(--text); font-weight: 600;
}
.badge-soon svg { width: 22px; height: 22px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 40px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.two-col ul { color: var(--text-muted); padding-left: 1.1em; margin: 0; }
.two-col li { margin-bottom: .4em; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 600 1.08rem/1.35 var(--font-sans); color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 20px; color: var(--text-muted); }

/* ---------- final CTA ---------- */

.cta { text-align: center; }
.cta .perch { width: 132px; margin: 0 auto 22px; }
.cta .perch img { width: 84%; }
.cta .lede { margin-inline: auto; }

/* Light and dark split shots differ in height. Reserve each box
   so the dark image does not jump inside the light image's frame. */
.window--split img { width: 100%; height: auto; aspect-ratio: 1200 / 776; }
@media (prefers-color-scheme: dark) {
  .window--split img { aspect-ratio: 1200 / 748; }
}

.install-copy { max-width: 36em; }
.install h2 {
  display: inline; margin: 0; color: var(--text);
  font: 700 1em/1.6 var(--font-sans); letter-spacing: 0;
}
.install h2::after { content: " "; }
.install .install-copy p:first-of-type { display: inline; }
.install .install-note { display: block; margin: 6px 0 0; font-size: .88rem; }
.poses-note { margin-top: 22px; font-size: .92rem; }
.cedric-local { margin-top: 64px; }
.footer-blurb { margin-top: 14px; max-width: 28em; }
.download-note { margin: 14px 0 0; }

/* Compact nav at 760px. The bar links hide; a details menu shows the
   same destinations and works with or without JavaScript. */
.nav-more { display: none; }
.nav-more summary {
  list-style: none; cursor: pointer; color: var(--text-muted); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover { color: var(--text); background: var(--surface-2); }
.nav-more__panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 2;
  min-width: 220px; max-width: calc(100vw - 32px); padding: 8px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.nav-more__panel a {
  display: block; color: var(--text); text-decoration: none; font-weight: 600;
  padding: 10px 12px; border-radius: 10px;
}
.nav-more__panel a:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 760px) {
  .site-nav { position: relative; min-width: 0; }
  .site-nav__links { display: none; }
  .nav-more { display: block; position: relative; }
  .site-nav .nav-more__panel a { display: block; }
}

.missing { text-align: center; padding: clamp(72px, 12vw, 140px) 0; }
.missing .perch { width: 140px; margin: 0 auto 8px; }
.missing h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.missing .lede { margin-inline: auto; }
