/* RapidCloud — www1.rapidcloud.eu
   Built to brand_standard.json: indigo #7c6cff → cyan #6ad0ff → teal #4ad6c8,
   near-black #0b0c10 (dark) / near-white (light), 16px radius, Inter stack.
   Both dark and light are sanctioned themes; dark is default. */

:root {
  --brand: #7c6cff;
  --brand-hi: #8b7cff;
  --brand2: #4ad6c8;
  --accent: #4ad6c8;   /* teal-as-TEXT; overridden in light for contrast */
  --cyan: #6ad0ff;
  --grad: linear-gradient(110deg, #8b7cff 0%, #6ad0ff 55%, #4ad6c8 100%);
  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;

  /* dark (default) */
  --bg: #0b0c10;
  --bg2: #111219;
  --card: #15171f;
  --card2: #1a1d27;
  --line: #262a36;
  --text: #e9ecf2;
  --muted: #9aa3b2;
  --hero-glow: radial-gradient(1100px 600px at 70% -10%, #1a1740 0%, rgba(26,23,64,0) 60%);
  --card-soft: linear-gradient(180deg, rgba(124,108,255,0.08), rgba(124,108,255,0.02));
  --alt-bg: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
  --shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
  --logo-bg: #0b0c10;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f5f7fb;
  --card: #ffffff;
  --card2: #f5f7fb;
  --line: #e4e8f0;
  --text: #1a1d27;
  --muted: #5b6472;
  --hero-glow: radial-gradient(1100px 600px at 70% -10%, rgba(124,108,255,0.14) 0%, rgba(124,108,255,0) 60%);
  --card-soft: linear-gradient(180deg, rgba(124,108,255,0.07), rgba(124,108,255,0.01));
  --alt-bg: linear-gradient(180deg, rgba(10,12,20,0.02), rgba(10,12,20,0));
  --shadow: 0 30px 60px -34px rgba(40,40,90,0.28);
  --logo-bg: #0b0c10;
  --accent: #0e7b6e;   /* darker teal: >=4.5:1 on white */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hero-glow), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Keyboard focus + skip link (a11y) */
:where(a, button, summary, input, [tabindex]):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip-link:focus { left: 12px; top: 10px; background: var(--card); color: var(--text); padding: 9px 15px; border: 1px solid var(--brand); border-radius: 10px; font-size: 14px; font-weight: 600; }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow-mid { max-width: 760px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Announcement bar */
.annbar { background: var(--grad); color: #0b0c10; font-weight: 600; }
.annbar.tone-info { background: var(--card2); color: var(--text); border-bottom: 1px solid var(--line); }
.annbar.tone-launch { background: linear-gradient(110deg, #7c6cff, #6ad0ff); color: #06121a; }
.annbar-inner { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 9px 0; font-size: 14px; flex-wrap: wrap; }
.annbar-cta { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.small { font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links > a:hover { color: var(--text); }
.nav-cta { color: #fff !important; }
.theme-toggle { background: transparent; border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: border .15s ease, background .15s ease; }
.theme-toggle:hover { border-color: var(--brand); }
.theme-ic-light { display: none; }
[data-theme="light"] .theme-ic-dark { display: none; }
[data-theme="light"] .theme-ic-light { display: inline; }
.nav-burger { display: none; background: transparent; border: 0; cursor: pointer; width: 40px; height: 40px; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, background .15s ease, border .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 32px -14px var(--brand); }
.btn-primary:hover { background: var(--brand-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.btn.wide { width: 100%; padding: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }

/* Hero */
.hero { padding: 92px 0 64px; position: relative; }
.subhero { padding: 64px 0 8px; }
.prod-hero { padding: 56px 0 28px; position: relative; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; background: var(--hero-glow); background-repeat: no-repeat; }
.hero .wrap, .prod-hero .wrap { position: relative; }
.pill { display: inline-block; font-size: 12.5px; color: var(--accent); border: 1px solid var(--line); background: var(--card); padding: 6px 13px; border-radius: 999px; margin-bottom: 22px; font-weight: 500; }
h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.04; margin: 0 0 18px; max-width: 18ch; }
.lede { font-size: clamp(16px, 2.1vw, 20px); color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { margin-top: 24px; font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding: 70px 0; }
.section.alt { background: var(--alt-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 62ch; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; max-width: none; }
.row-head > div { max-width: 62ch; }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 44px; height: 44px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 20px; color: var(--accent); background: var(--card2); border: 1px solid var(--line); margin-bottom: 14px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feature.soft { background: var(--card-soft); }

/* Product cards */
.prod-grid { gap: 18px; }
.prod-card { display: flex; flex-direction: column; transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease; }
.prod-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); }
.prod-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prod-logo { width: 56px; height: 56px; border-radius: 13px; background: var(--logo-bg); border: 1px solid var(--line); object-fit: cover; }
.prod-logo.emoji { display: grid; place-items: center; font-size: 26px; }
.chip { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; }
.prod-card h3 { margin: 0 0 6px; font-size: 19px; }
.prod-tag { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.link-more { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Posts */
.post-grid { gap: 20px; }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.post-cover { height: 168px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12.5px; }
.post-card h3 { margin: 0 0 8px; font-size: 19px; }
.post-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; flex: 1; }
.tagchip { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: #0b0c10; background: var(--brand2); }
.tag-launch { background: #5a4fd0; color: #fff; }
.tag-update { background: var(--cyan); color: #06222b; }
.tag-offer { background: var(--grad); color: #06121a; }
.tag-story { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.tag-news { background: var(--brand2); color: #06231f; }

/* Pricing */
.grid.pricing { align-items: start; }
.price { display: flex; flex-direction: column; position: relative; }
.price.featured { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: var(--shadow); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--card)), var(--card)); }
.ribbon { position: absolute; top: -11px; left: 24px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.tier { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em; }
.amount { font-size: 40px; font-weight: 800; margin: 8px 0 4px; }
.amount span { font-size: 15px; color: var(--muted); font-weight: 500; }
.price .who { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.price ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; flex: 1; }
.price li { font-size: 14.5px; padding-left: 24px; position: relative; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.fineprint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 22px; }

/* CTA band */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--card-soft); flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.cta-band p { margin: 0; max-width: 60ch; }

/* Product detail */
.backlink { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 22px; }
.backlink:hover { color: var(--text); }
.prod-hero-row { display: flex; gap: 24px; align-items: center; }
.prod-hero-logo { width: 96px; height: 96px; border-radius: 22px; background: var(--logo-bg); border: 1px solid var(--line); flex-shrink: 0; }
.prod-hero-logo.emoji { display: grid; place-items: center; font-size: 46px; }
.prod-hero-row h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 10px; }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.standfirst { font-size: 18px; color: var(--text); font-weight: 500; margin: 0 0 20px; }
.aside { display: grid; gap: 18px; position: sticky; top: 88px; }
.aside-card h3 { margin: 0 0 14px; font-size: 16px; }
.feat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.feat-list li { font-size: 14.5px; padding-left: 24px; position: relative; color: var(--text); }
.feat-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.aside-cta .muted { font-size: 13.5px; margin: 0 0 14px; }
.aside-cta .btn { margin-top: 8px; }

/* Prose (markdown) */
.prose { font-size: 16.5px; line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { margin: 1.6em 0 0.5em; line-height: 1.25; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 20px; }
.prose p { margin: 0 0 1.05em; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose strong { font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose code { background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 1.2em 0; padding: 4px 0 4px 18px; color: var(--muted); }

/* Tech details */
.tech { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.tech summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
.tech summary::-webkit-details-marker { display: none; }
.tech .chev { transition: transform .2s ease; color: var(--muted); }
.tech[open] .chev { transform: rotate(180deg); }
.tech-body { padding: 0 24px 22px; font-size: 15px; }

/* Article */
.article { padding-top: 40px; }
.article-head { margin-bottom: 26px; }
.article-head h1 { font-size: clamp(30px, 5vw, 46px); max-width: 22ch; margin: 12px 0 14px; }
.article-cover { height: clamp(220px, 38vw, 420px); border-radius: var(--radius); background-size: cover; background-position: center; border: 1px solid var(--line); margin: 8px 0 36px; }
.article-body { margin-bottom: 44px; }
.article-cta { margin-top: 20px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 54px 0 30px; margin-top: 20px; background: var(--bg2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.footer-brand p { font-size: 14px; margin: 12px 0 0; max-width: 42ch; }
.footer-col h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 10px; opacity: .85; }
.footer-col a:hover { color: var(--accent); opacity: 1; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; }
.footer-bottom .muted { font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* Mobile */
@media (max-width: 880px) {
  .grid, .grid.pricing { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .aside { position: static; }
  .row-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-burger { display: flex; }
  .nav-links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 18px; transform: translateY(-130%); transition: transform .25s ease, visibility .25s; visibility: hidden; pointer-events: none; box-shadow: var(--shadow); }
  .nav-links.open { transform: translateY(0); visibility: visible; pointer-events: auto; }
  .nav-links > a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .theme-toggle { margin: 12px 0 4px; width: auto; padding: 0 14px; height: 40px; }
  .nav-cta { margin-top: 8px; }
  .prod-hero-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
