/* Red Poppy Software — single stylesheet. No external fonts, no frameworks. */
:root {
  --poppy: #d7263d;
  --poppy-dark: #b01c30;
  --azure: #2898ff;
  --azure-dark: #0b6fd1;
  --azure-soft: #e6f2ff;
  --offwhite: #faf8f3;
  --white: #ffffff;
  --charcoal: #22252a;
  --muted: #5b616b;
  --line: #e4e1d8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(34,37,42,.06), 0 8px 24px rgba(34,37,42,.07);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--charcoal); background: var(--offwhite);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azure-dark); text-underline-offset: 3px; }
a:hover { color: var(--poppy); }
:focus-visible { outline: 3px solid var(--poppy); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--charcoal); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Header */
.site-header { background: rgba(250,248,243,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(8px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--charcoal); font-weight: 800; font-size: 1.1rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand:hover { color: var(--charcoal); }
.nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a.navlink { text-decoration: none; color: var(--charcoal); font-weight: 600; font-size: .98rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a.navlink:hover, .nav a.navlink[aria-current="page"] { color: var(--poppy); border-bottom-color: var(--poppy); }

/* Buttons & badges */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--poppy); color: #fff; }
.btn-primary:hover { background: var(--poppy-dark); color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--charcoal); background: transparent; }
.btn-ghost:hover { color: var(--poppy); }
.btn-light { background: #fff; color: var(--charcoal); }
.btn-light:hover { color: var(--poppy); }
.badge { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; background: #fde7ea; color: var(--poppy-dark); }
.badge-azure { background: var(--azure-soft); color: var(--azure-dark); }
.eyebrow { font-size: .85rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--poppy); margin-bottom: .6rem; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero p.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 42ch; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-art { justify-self: center; width: min(100%, 380px); }
.hero-art img { border-radius: 28px; box-shadow: 0 20px 50px rgba(40,152,255,.28); }
.hero-studio { background: linear-gradient(180deg, var(--offwhite) 0%, var(--azure-soft) 100%); }
.hero-studio h1 .accent { color: var(--poppy); }
.hero-app { background: linear-gradient(180deg, var(--offwhite) 0%, #fff3e8 100%); }
.hero-app .hero-art img { box-shadow: 0 20px 50px rgba(255,120,30,.25); }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 1.25rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.section-alt .card { background: var(--offwhite); box-shadow: none; }
.card p { color: var(--muted); margin: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; background: var(--azure-soft); color: var(--azure-dark); }
.icon.red { background: #fde7ea; color: var(--poppy); }
.icon svg { width: 26px; height: 26px; }

/* App cards */
.app-card { display: flex; gap: 1.4rem; align-items: center; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.app-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(34,37,42,.12); color: inherit; }
.app-card img { width: 112px; height: 112px; border-radius: 22px; flex: none; }
.app-card h3 { font-size: 1.45rem; margin: .5rem 0 .35rem; }
.app-card .more { display: inline-block; margin-top: .7rem; font-weight: 700; color: var(--azure-dark); }
.app-card.placeholder { border-style: dashed; box-shadow: none; background: transparent; }
.placeholder-mark { width: 112px; height: 112px; border-radius: 22px; flex: none; display: grid; place-items: center; border: 2px dashed #cfcabe; color: #9b968b; font-size: 2.4rem; font-weight: 300; }

/* Problem/solution */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.split .card h3 { display: flex; align-items: center; gap: .5rem; }
.problem { border-top: 4px solid var(--poppy); }
.solution { border-top: 4px solid var(--azure); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 3.6rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 1.6rem; left: 1.6rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--poppy); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps li.card { padding-top: 5rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1.05rem 1.3rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--poppy); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.3rem 1.1rem; color: var(--muted); }
.faq strong.answer { color: var(--charcoal); }

/* CTA band */
.cta { background: var(--azure); color: #fff; border-radius: 24px; padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.cta h2 { color: #fff; }
.cta p { margin: 0; color: #f0f7ff; }
.cta small { display: block; margin-top: .6rem; color: #dcecff; font-size: .9rem; }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* 404 */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.notfound img { width: 160px; margin: 0 auto 1.5rem; border-radius: 28px; }
.notfound .code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: var(--poppy); line-height: 1; margin-bottom: .5rem; }

/* Footer */
.site-footer { background: var(--charcoal); color: #cfd3da; padding: 3rem 0 2rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ff8a98; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: #9aa1ab; margin-bottom: .8rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: .6rem; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-bottom { border-top: 1px solid #3a3e45; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .9rem; color: #9aa1ab; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero-grid, .split, .grid-2, .footer-grid, .cta { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(70%, 260px); }
  .hero { text-align: left; }
  .nav { padding: .6rem 0; }
  .nav ul { gap: 1rem; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .app-card { flex-direction: column; align-items: flex-start; }
  .app-card img, .placeholder-mark { width: 88px; height: 88px; }
}
.app-card picture, .brand picture, .footer-brand picture { flex: none; }

/* v2: detailed app cards (three apps, per-app platform / connectivity / status) */
.apps-grid { align-items: stretch; }
.app-card.app-detail { flex-direction: column; align-items: stretch; gap: 1rem; }
.app-top { display: flex; gap: 1.1rem; align-items: center; }
.app-detail .app-top img { width: 88px; height: 88px; border-radius: 20px; }
.app-detail h3 { font-size: 1.35rem; margin: .45rem 0 0; }
.app-detail > p { color: var(--charcoal); }
.app-mark { width: 88px; height: 88px; border-radius: 20px; flex: none; display: grid; place-items: center; background: #fde7ea; color: var(--poppy-dark); font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; }
.app-mark-azure { background: var(--azure-soft); color: var(--azure-dark); font-size: 1.45rem; }
.badge-green { background: #e3f5e9; color: #1d6b3a; }
.app-meta { margin: 0; display: grid; grid-template-columns: 1fr; gap: .15rem; font-size: .95rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.app-meta dt { font-weight: 800; color: var(--charcoal); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding-top: .2rem; }
.app-meta dd { margin: 0 0 .7rem; color: var(--muted); }
.app-meta dd:last-child { margin-bottom: 0; }
.mode { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 6px; margin-right: .35rem; vertical-align: 1px; }
.mode-local { background: var(--azure-soft); color: var(--azure-dark); }
.mode-connected { background: #fff1e0; color: #9a4b00; }
.app-detail .more { margin-top: auto; font-weight: 700; }
@media (max-width: 480px) {
  .app-card.app-detail { align-items: stretch; }
  .app-detail .app-top img, .app-mark { width: 72px; height: 72px; }
}
