/* =========================================================
   Mio Software — site styles
   Plain CSS, no frameworks. Edit the values in :root below
   to change colors/spacing everywhere at once.
   ========================================================= */

:root {
  /* Brand colors */
  --blue:        #2563eb;   /* main brand blue */
  --blue-dark:   #1d4ed8;   /* darker blue for hovers */
  --blue-light:  #eff6ff;   /* very light blue backgrounds */
  --navy:        #0f172a;   /* near-black text / dark sections */

  /* Neutrals */
  --text:        #0f172a;   /* main text */
  --muted:       #5b6472;   /* secondary text */
  --line:        #e5e9f0;   /* borders / dividers */
  --bg:          #ffffff;   /* page background */
  --bg-soft:     #f8fafc;   /* alternating section background */
  --surface:     #ffffff;   /* cards, panels, buttons */
  --header-bg:   rgba(255,255,255,.85);  /* sticky header */

  /* Layout */
  --maxw:        1080px;    /* max content width */
  --radius:      14px;      /* rounded corners */
  --shadow:      0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }
html, body { overscroll-behavior: none; }   /* no white bounce on over-scroll */

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: var(--surface); color: var(--blue); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700;
  color: var(--navy); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 34px; height: 34px; }
.brand span { letter-spacing: -0.02em; }
.brand small { color: var(--muted); font-weight: 500; font-size: .72rem;
  display: block; letter-spacing: .04em; text-transform: uppercase; margin-top: -3px; }

/* ---------- Wordmark logo with a live, pulsing "i" dot ---------- */
.logo-word {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
  display: inline-block;
}
.logo-word .il { position: relative; }        /* wraps the dotless "i" */
.logo-word .live-dot {                          /* the animated dot over the "i" */
  position: absolute;
  left: 50%;
  top: 0.19em;              /* nudge up/down to sit right on the "i" */
  width: 0.2em;
  height: 0.2em;
  margin-left: -0.1em;      /* centers the dot over the stem */
  border-radius: 50%;
  background: var(--blue);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0    rgba(37,99,235,.55); }
  50%      { transform: scale(1.12); box-shadow: 0 0 0 0.24em rgba(37,99,235,0); }
}
/* On the dark footer, brighten the wordmark and dot */
.site-footer .logo-word { color: #fff; }
.site-footer .logo-word .live-dot { background: #60a5fa; }
/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  .logo-word .live-dot { animation: none; }
}

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--blue); text-decoration: none; }

/* Simple mobile menu using a checkbox (no JavaScript needed) */
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 720px) {
  .nav-toggle-label {
    display: block; cursor: pointer; padding: 10px; font-size: 1.4rem; line-height: 1;
    color: var(--navy); background: none; border: 0;
  }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 15px 22px; }
  .nav-toggle:checked ~ .nav-links { max-height: 320px; }
  .nav-actions .theme-toggle.mobile-only { display: inline-grid; }  /* show toggle beside the menu button */
  .theme-li.desktop-only { display: none; }            /* hide the in-menu toggle on mobile */
}

/* ---------- Hero ---------- */
.hero { padding: 78px 0 64px; text-align: center;
  background:
    radial-gradient(1000px 400px at 50% -80px, var(--blue-light), transparent 70%); }
.hero .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-light); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- Feature / value cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-light); color: var(--blue); font-size: 1.4rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- Roadmap / status ---------- */
.roadmap { position: relative; }
.phase-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; font-size: .95rem;
  margin-bottom: 14px;
}
.phase-status {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}
.phase-now  { background: var(--blue-light); color: var(--blue-dark); }
.phase-next { background: #f1f5f9; color: #475569; border: 1px solid var(--line); }
.status-banner {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue-light); border: 1px solid #dbeafe; color: var(--blue-dark);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.status-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--blue);
  animation: live-pulse 1.8s ease-in-out infinite; }

/* ---------- App list ---------- */
.app { display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); }
.app .app-icon {
  flex: none; width: 60px; height: 60px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.8rem;
  background: var(--blue-light); color: var(--blue);
}
.app-body { flex: 1; }
.app-body h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.app-body p { color: var(--muted); margin: 0 0 10px; }
.app-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge-flagship { background: var(--blue); color: #fff; }
.badge-dev { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-planned { background: #f1f5f9; color: #475569; border: 1px solid var(--line); }
.tag { font-size: .8rem; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }

/* ---------- Privacy / prose pages ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; color: var(--text); }
.callout {
  background: var(--blue-light); border: 1px solid #dbeafe; border-radius: var(--radius);
  padding: 18px 22px; margin: 24px 0;
}
.callout p:last-child { margin: 0; }
.note {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 16px 20px; margin: 20px 0; font-size: .95rem; color: #713f12;
}
.note strong { color: #713f12; }

/* ---------- Contact ---------- */
.contact-card { max-width: 560px; margin: 0 auto; text-align: center; }

/* ---------- Email popup (modal form) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; padding: 20px;
  background: rgba(2, 6, 23, .55);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative; width: 100%; max-width: 460px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, .35);
}
.modal h3 { margin: 0 0 4px; }
.modal-sub { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }
.modal-close {
  position: absolute; top: 12px; right: 15px; background: none; border: 0;
  font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal form { display: grid; gap: 5px; }
.modal label { font-weight: 600; font-size: .9rem; margin-top: 10px; }
.modal input, .modal textarea {
  font-family: var(--font); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; width: 100%;
}
.modal input:focus, .modal textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.modal textarea { resize: vertical; }
.modal .btn { margin-top: 18px; width: 100%; text-align: center; border: 0; }
.modal .hp { position: absolute; left: -9999px; width: 0; height: 0; opacity: 0; }
.form-status { min-height: 1.2em; margin: 12px 0 0; font-size: .92rem; font-weight: 600; }
.form-status.ok  { color: #16a34a; }
.form-status.err { color: #dc2626; }
.contact-row { display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; }
.contact-row:last-child { border-bottom: 0; }
.contact-row .label { color: var(--muted); font-weight: 500; }
.contact-row .value { font-weight: 600; text-align: right; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 46px 0 30px; margin-top: 40px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand { max-width: 320px; }
.footer-brand .brand span { color: #fff; }
.footer-brand p { color: #94a3b8; font-size: .92rem; margin-top: 10px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: .94rem; }
.footer-bottom { padding-top: 22px; font-size: .85rem; color: #94a3b8;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- FAQ (accordion, no JavaScript) ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 22px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600;
  font-size: 1.03rem; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.5rem; font-weight: 400;
  line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { content: "\2013"; }  /* en dash when open */
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ---------- App detail page ---------- */
.app-hero { text-align: center; padding: 60px 0 40px;
  background: radial-gradient(1000px 400px at 50% -80px, var(--blue-light), transparent 70%); }
.app-hero .app-badge-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.app-hero .big-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px;
  display: grid; place-items: center; font-size: 3rem; background: var(--blue-light); color: var(--blue);
  box-shadow: var(--shadow); }
.store-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
  border-radius: 12px; background: #94a3b8; color: #fff; font-weight: 600; cursor: not-allowed; }
.store-btn:hover { text-decoration: none; }

/* Screenshot placeholders */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; }
@media (max-width: 720px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.shot { aspect-ratio: 9 / 19; border-radius: 22px; border: 1px solid var(--line);
  background: var(--bg-soft); display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .85rem; padding: 16px; }

/* Feature rows */
.features { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .fi { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid;
  place-items: center; font-size: 1.2rem; background: var(--blue-light); color: var(--blue); }
.feature h3 { margin: 2px 0 4px; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 100px 0 90px; }
.notfound .code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1;
  color: var(--blue); letter-spacing: -0.04em; margin-bottom: 6px; }

/* ---------- Dark-mode toggle button ---------- */
.theme-li { display: flex; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle.mobile-only { display: none; }   /* hidden on desktop; shown on mobile */
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--navy);
  width: 38px; height: 34px; border-radius: 9px; cursor: pointer; padding: 0;
  display: inline-grid; place-items: center; font-size: 1rem; line-height: 1;
  transition: border-color .15s ease;
}
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle .sun { display: none; }

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --blue-light: #17233c;
  --text:       #e6eaf1;
  --muted:      #9aa7ba;
  --line:       #26324a;
  --bg:         #0b1220;
  --bg-soft:    #111a2b;
  --surface:    #141f33;
  --header-bg:  rgba(11,18,32,.85);
}
[data-theme="dark"] .brand,
[data-theme="dark"] .logo-word,
[data-theme="dark"] .nav-toggle-label,
[data-theme="dark"] .theme-toggle { color: #f1f5f9; }
[data-theme="dark"] .theme-toggle .sun { display: inline; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .callout { border-color: #26456f; }
[data-theme="dark"] .status-banner { color: #93c5fd; border-color: #26456f; }
[data-theme="dark"] .phase-now { color: #93c5fd; }
[data-theme="dark"] .phase-next,
[data-theme="dark"] .badge-planned { background: #1b2740; color: #b8c5db; border-color: #2b3856; }
