/* ==========================================================================
   Cloudimo — site stylesheet
   No build step. Design tokens live on :root; dark mode follows the OS
   unless data-theme is set explicitly on <html>.
   ========================================================================== */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #0f172a;
  --muted: #4b5567;
  --border: #dfe5ef;
  --primary: #7c5cff;
  --primary-strong: #6647e6;
  --primary-soft: #efeaff;
  --accent: #ff7a6b;
  --accent-soft: #ffece9;
  --success: #12b981;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -16px rgba(15, 23, 42, .18);
  --max: 1120px;
  --gutter: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120;
    --surface: #121a2b;
    --surface-2: #182236;
    --text: #e7ecf5;
    --muted: #a3adc2;
    --border: #243049;
    --primary: #a08cff;
    --primary-strong: #b9a9ff;
    --primary-soft: #2a2350;
    --accent: #ff8f82;
    --accent-soft: #3d2622;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #121a2b;
  --surface-2: #182236;
  --text: #e7ecf5;
  --muted: #a3adc2;
  --border: #243049;
  --primary: #a08cff;
  --primary-strong: #b9a9ff;
  --primary-soft: #2a2350;
  --accent: #ff8f82;
  --accent-soft: #3d2622;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }
.muted { color: var(--muted); }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.skip-link {
  position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff;
  padding: .5rem .75rem; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }
.site-nav { display: none; align-items: center; gap: .25rem; }
.site-nav a {
  color: var(--muted); font-weight: 500; padding: .5rem .75rem; border-radius: 8px; font-size: .95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.site-nav .btn { margin-left: .5rem; }
.site-nav .btn, .site-nav .btn:hover { color: #fff; background: var(--primary); }
.site-nav .btn:hover { background: var(--primary-strong); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (max-width: 899px) {
  .site-nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .75rem var(--gutter) 1rem; box-shadow: var(--shadow);
  }
  .site-nav.is-open a { padding: .75rem .75rem; }
  .site-nav.is-open .btn { margin: .5rem 0 0; justify-content: center; }
}
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem .9rem; font-size: .875rem; }

/* --------------------------------------------------------------------------
   Sections & layout helpers
   -------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: .75rem; }
.card p:last-child { margin-bottom: 0; }
.icon-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.icon-badge svg { width: 22px; height: 22px; }
.icon-badge.accent { background: var(--accent-soft); color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 600;
}
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.two-col { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; }
.checklist svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--success); margin-top: .15rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700;
}
.steps > li > div > strong { display: block; margin-bottom: .2rem; }
.steps > li > div > p { margin: 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
  background:
    radial-gradient(60% 60% at 20% 30%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
    radial-gradient(50% 50% at 80% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-art { width: 100%; max-width: 520px; margin: 0 auto; }

/* Timeline illustration used on the home hero */
.timeline-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem;
  box-shadow: var(--shadow); display: grid; gap: .9rem;
}
.timeline-card .row { display: grid; grid-template-columns: 44px 1fr auto; gap: .9rem; align-items: center; }
.timeline-card .row .icon-badge { width: 44px; height: 44px; }
.timeline-card .row strong { display: block; font-size: .95rem; }
.timeline-card .row span { color: var(--muted); font-size: .85rem; }
.timeline-card .row time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.timeline-card .cloud-sync {
  display: flex; align-items: center; gap: .5rem; padding-top: .9rem; border-top: 1px dashed var(--border);
  color: var(--muted); font-size: .85rem;
}
.timeline-card .cloud-sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* --------------------------------------------------------------------------
   Category tiles
   -------------------------------------------------------------------------- */
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: grid; gap: .6rem; transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile h3 { font-size: 1rem; margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: .92rem; }
.tile .icon-badge { width: 40px; height: 40px; border-radius: 10px; }
[data-tone="1"] .icon-badge { background: #efeaff; color: #7c5cff; }
[data-tone="2"] .icon-badge { background: #e6f9f1; color: #12a06e; }
[data-tone="3"] .icon-badge { background: #fff1e6; color: #ff7a3d; }
[data-tone="4"] .icon-badge { background: #e6eeff; color: #2f6bff; }
[data-tone="5"] .icon-badge { background: #ffe8ef; color: #e0457b; }
[data-tone="6"] .icon-badge { background: #e6f4ff; color: #0ea5e9; }
[data-tone="7"] .icon-badge { background: #fff8e0; color: #d69e00; }
[data-tone="8"] .icon-badge { background: #e9f2ea; color: #3f8f4a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-tone] .icon-badge { filter: saturate(.9) brightness(.85); }
}
:root[data-theme="dark"] [data-tone] .icon-badge { filter: saturate(.9) brightness(.85); }

/* Product line cards on the Apps page */
.product { display: grid; gap: .75rem; }
.product .product-head { display: flex; align-items: center; gap: .9rem; }
.product .product-head h3 { margin: 0; }
.product ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .95rem; }
.product li { margin-bottom: .25rem; }

/* --------------------------------------------------------------------------
   Prose (legal / long-form pages)
   -------------------------------------------------------------------------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: 1.4rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.prose p, .prose li { color: var(--text); }
.prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0 1.5rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose .meta { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.notice {
  background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }

/* Page hero for inner pages */
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }

/* Info list (company facts) */
.info-list { display: grid; gap: 0; margin: 0; }
.info-list div { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { font-size: .85rem; color: var(--muted); font-weight: 600; }
.info-list dd { margin: 0; }
@media (min-width: 640px) { .info-list div { grid-template-columns: 200px 1fr; gap: 1rem; } }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 1.25rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 0 1rem; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Contact block */
.contact-box { display: grid; gap: 1rem; }
.contact-box .card { display: grid; gap: .5rem; }
.contact-box .card a.big { font-size: 1.15rem; font-weight: 700; word-break: break-all; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h4 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--primary); }
.footer-legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
.footer-legal address { font-style: normal; line-height: 1.7; }
.footer-legal .row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .5rem; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
