/* App page template for /apps/<id>/. Loaded after css/styles.css; each app tints the page with its own brand colour
   via --app-l / --app-i / --app-d set on <main class="page">. Where a class name is shared with the homepage, the
   rules here override it for this template. */
:root { --max: 1120px; --muted: #56655F; --faint: #7F8D88; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --faint: #73837E; }
  :root:not([data-theme="light"]) .page { --app: var(--app-d); --app-ink: var(--app-d); }
}
:root[data-theme="dark"] { --faint: #73837E; }
:root[data-theme="dark"] .page { --app: var(--app-d); --app-ink: var(--app-d); }
.page { --app: var(--app-l); --app-ink: var(--app-i); }
:focus-visible { outline-color: var(--app-ink, var(--green)); }

/* Nav: shared with the homepage; keep the Contact link visible on small screens */
@media (max-width: 720px) { .links a:last-child { display: inline; } }

/* Breadcrumb */
.crumb { padding-top: 22px; font-size: .86rem; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(24px, 4vw, 44px) clamp(40px, 6vw, 72px); }
.id { display: flex; align-items: center; gap: 16px; }
.icon { width: 68px; height: 68px; flex: none; border-radius: 17px; display: grid; place-items: center; color: #fff; font: 800 1.45rem var(--font-display); letter-spacing: -.03em; background: linear-gradient(155deg, color-mix(in srgb, var(--app-l) 80%, #fff), var(--app-l) 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px -8px var(--app-l); overflow: hidden; }
.icon img, .ph-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.hero .id h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; margin-top: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { font: 500 .74rem var(--font-mono); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.tag.suite { color: var(--app-ink); border-color: color-mix(in srgb, var(--app-ink) 35%, var(--line)); }
.status { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; padding: 7px 14px 7px 11px; border-radius: 999px; font-weight: 600; font-size: .9rem; background: color-mix(in srgb, var(--st) 12%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--st) 35%, var(--line)); }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 22%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--st) 6%, transparent); } }
.pitch { margin-top: 18px; font: 600 clamp(1.3rem, 2.4vw, 1.7rem)/1.25 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.tagline { color: var(--app-ink); }
.aud { display: block; margin-top: 12px; color: var(--muted); font-size: 1.04rem; max-width: 34em; padding: 0; border: 0; background: none; font-weight: 400; border-radius: 0; }
.aud::after { content: none; }
.aud:hover { transform: none; border-color: transparent; }
.plats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.plat { font-size: .84rem; font-weight: 500; padding: 5px 11px; border-radius: 8px; background: var(--panel); color: var(--ink); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn { font: 600 .95rem var(--font-body); padding: 12px 20px; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-app { background: var(--app-l); color: #fff; }
.btn-line { border-color: var(--line); background: var(--surface); color: var(--ink); }
.soon { margin-top: 14px; font-size: .86rem; color: var(--faint); }

/* Device frame: initials and "Screens coming soon" until screenshots are set in js/apps.js */
.stage { position: relative; height: auto; display: grid; place-items: center; padding: 28px; border-radius: 26px; background: radial-gradient(120% 90% at 70% 10%, color-mix(in srgb, var(--app) 22%, var(--panel)), var(--panel) 70%); border: 1px solid var(--line); min-height: 380px; overflow: visible; }
.phone { width: 200px; aspect-ratio: 9 / 19; max-width: 100%; border-radius: 34px; background: var(--surface); border: 8px solid var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; }
.browser { width: 100%; max-width: 380px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.browser-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-body { aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; }
.ph-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; font: 800 1.2rem var(--font-display); background: var(--app-l); overflow: hidden; }
.ph-name { font: 700 1.05rem var(--font-display); }
.ph-note { font: 500 .7rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.phone.shot, .browser-body.shot { padding: 0; overflow: hidden; }
.phone.shot img, .browser-body.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone.shot img { border-radius: 26px; }
.shots { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.shots img { height: 120px; width: auto; flex: none; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }

/* Notice */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--st) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--st) 30%, var(--line)); }
.notice svg { flex: none; width: 22px; height: 22px; color: var(--st); margin-top: 2px; }
.notice p { color: var(--ink); }
.notice p span { color: var(--muted); }

/* Sections */
section.s { padding-block: clamp(44px, 6vw, 72px); border-top: 1px solid var(--line); }
.eyebrow { font: 500 .76rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--app-ink); }
.s h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.1; margin-top: 10px; }
.ps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.ps > div { min-width: 0; padding: 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ps h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.ps h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--faint); }
.ps .sol h3::before { background: var(--app); }
.ps p { color: var(--muted); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.feat { min-width: 0; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.feat .n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--app) 16%, var(--surface)); color: var(--app-ink); font: 600 .8rem var(--font-mono); }
.feat h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.015em; }
.feat p { color: var(--muted); font-size: .95rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 28px; }
.step { min-width: 0; padding: 4px 24px 4px 0; display: grid; gap: 10px; align-content: start; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step b { font: 500 .76rem var(--font-mono); color: var(--app-ink); letter-spacing: .06em; }
.step p { font-size: 1.02rem; }
.two { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.two > * { min-width: 0; }
.faq { margin-top: 24px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 2px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.2rem/1 var(--font-mono); color: var(--app-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 2px 18px; color: var(--muted); max-width: 60ch; }
.side { display: grid; gap: 16px; margin-top: 24px; }
.card { grid-column: auto; display: block; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: visible; transition: none; scroll-margin-top: 0; }
.card:hover { transform: none; box-shadow: none; border-color: var(--line); }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.6; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .93rem; color: var(--muted); }
.card li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.card li::before { content: "✓"; color: var(--app-ink); font-weight: 700; }
.card .more { display: inline-block; margin-top: 12px; font-size: .88rem; font-weight: 400; color: var(--app-ink); text-decoration: underline; }
.card.disc { background: var(--panel); }
.card.disc p, .card.note p { font-size: .9rem; color: var(--muted); }
.suite-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--app) 35%, var(--line)); background: color-mix(in srgb, var(--app) 7%, var(--surface)); margin-top: 28px; }
.suite-card p { color: var(--muted); max-width: 46ch; }
.suite-card h3 { font-size: 1.15rem; margin-bottom: 4px; }

/* More apps */
.more-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-top: 24px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0; transition: border-color .2s; color: inherit; }
.mini:hover { border-color: var(--faint); }
.mini .icon { width: 40px; height: 40px; border-radius: 11px; font-size: .9rem; box-shadow: none; }
.mini b { display: block; font-size: .95rem; }
.mini span { font-size: .8rem; color: var(--faint); }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 36px 48px; margin-top: 24px; color: var(--muted); font-size: .9rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot code { font: 500 .9rem var(--font-mono); color: var(--ink); }

@media (max-width: 880px) {
  .hero, .two, .ps { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr 1fr; }
  .stage { min-height: 300px; }
}
@media (max-width: 600px) {
  .feats, .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 14px 0; border-left: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
}
