/* =====================================================================
   Cloud Media Streamer — shared stylesheet
   One design system, linked by every page (home, privacy, terms).
   Theme: privacy-first "encrypted vault" for Apple platforms.
   ===================================================================== */

:root {
  /* Palette */
  --bg:          #0a0e1a;
  --bg-2:        #0c1120;
  --surface:     #121a2b;
  --surface-2:   #16203400;
  --card:        rgba(18, 26, 43, 0.72);
  --border:      rgba(148, 163, 184, 0.14);
  --border-2:    rgba(148, 163, 184, 0.26);

  --text:        #eaeef7;
  --muted:       #9aa6bc;
  --dim:         #6b7689;

  /* Signature gradient: the "encrypted stream" */
  --c1: #6c5cff;   /* indigo */
  --c2: #4f8dff;   /* blue   */
  --c3: #2ee6c6;   /* teal   */
  --stream: linear-gradient(110deg, var(--c1), var(--c2) 52%, var(--c3));
  --stream-soft: linear-gradient(110deg, rgba(108,92,255,.16), rgba(46,230,198,.16));

  /* Type */
  --display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Metrics */
  --maxw: 1120px;
  --radius: 18px;
  --radius-sm: 12px;
  --gap: clamp(1rem, 3vw, 2rem);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient aurora ----------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  z-index: -2;
  background:
    radial-gradient(40% 55% at 18% 0%, rgba(108, 92, 255, .22), transparent 70%),
    radial-gradient(38% 50% at 82% 8%, rgba(46, 230, 198, .16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg);
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.05), transparent),
    radial-gradient(1px 1px at 75% 60%, rgba(255,255,255,.04), transparent);
}

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

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c3);
  margin: 0 0 .8rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--stream);
}

.gradient-text {
  background: var(--stream);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== Navigation (the shared menu) ================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 26, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-nav.scrolled { border-bottom-color: var(--border); background: rgba(10, 14, 26, 0.86); }

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px var(--border-2); }
.brand b { font-weight: 600; }
.brand .tld { color: var(--dim); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  list-style: none;
  padding: 0; margin-block: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: .95rem;
  padding: .5rem .7rem;
  border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--stream);
  color: #07101f !important;
  font-weight: 600;
  padding: .55rem .95rem !important;
  border-radius: 10px !important;
}
.nav-cta:hover { filter: brightness(1.08); text-decoration: none !important; }

/* language toggle (home only) */
.lang-li { display: flex; align-items: center; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; margin-left: .35rem; }
.lang-toggle button {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .05em;
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  padding: .42rem .56rem;
}
.lang-toggle button + button { border-left: 1px solid var(--border-2); }
.lang-toggle button[aria-pressed="true"] { background: var(--stream); color: #07101f; }

/* hamburger */
.nav-toggle {
  margin-left: auto;
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    margin: 0;
    padding: 1rem clamp(1.1rem, 4vw, 2rem) 1.4rem;
    background: rgba(10, 14, 26, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { padding: .8rem .6rem; font-size: 1.02rem; }
  .nav-cta { justify-content: center; margin-top: .4rem; }
  .lang-toggle { margin: .4rem 0 0; align-self: flex-start; }
}

/* ===================== Buttons ===================================== */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: 1rem;
  padding: .8rem 1.3rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, filter .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--stream); color: #07101f; box-shadow: 0 8px 30px -12px rgba(79,141,255,.7); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn svg { width: 20px; height: 20px; }

/* ===================== Hero ======================================== */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); margin: .2rem 0 1rem; font-weight: 700; }
.hero p.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 38ch; margin: 0 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-note { margin-top: 1.2rem; font-size: .85rem; color: var(--dim); font-family: var(--mono); }

.hero-media { position: relative; width: -moz-fit-content; width: fit-content; max-width: min(300px, 80%); margin-inline: auto; }
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.hero-media::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 30px;
  padding: 1px;
  background: var(--stream);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5;
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero p.lede { max-width: none; }
  .hero-media { order: -1; }
}

/* ===================== Trust strip ================================= */
.trust {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  padding: 1.1rem clamp(1.2rem, 3vw, 1.6rem);
  margin-top: clamp(1.5rem, 4vw, 2.4rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.trust span { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.trust span svg { width: 18px; height: 18px; color: var(--c3); flex: none; }

/* ===================== Sections ==================================== */
section.block { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-head { max-width: 56ch; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head.center { max-width: none; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 .7rem; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.04rem; }

/* Comparison */
.compare { max-width: 940px; margin: 0 auto; }
.compare-head { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .7rem; }
.compare-head .ch { font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; text-transform: uppercase; padding: .15rem .2rem; }
.compare-head .ch.cms { color: var(--text); }
.compare-head .ch.cms::before { content: ""; display: inline-block; width: 22px; height: 2px; vertical-align: middle; margin-right: .5rem; background: var(--stream); border-radius: 2px; }
.compare-head .ch.others { color: var(--muted); }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .9rem; }
.compare .cell { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--border); font-size: .98rem; line-height: 1.45; }
.compare .cell.cms { background: var(--stream-soft); border-color: var(--border-2); color: var(--text); }
.compare .cell.others { background: rgba(255,255,255,.02); color: var(--muted); }
.compare .cell b { color: var(--text); font-weight: 600; }
.compare .cell .ic { flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; margin-top: .05rem; }
.compare .cell .ic svg { width: 14px; height: 14px; }
.compare .cell .ic.ok { background: var(--stream); color: #07101f; }
.compare .cell .ic.no { background: rgba(148,163,184,.16); color: var(--muted); }
.compare .cell .who { display: none; }

@media (max-width: 680px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: .55rem; margin-bottom: 1.1rem; }
  .compare .cell .who { display: block; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; margin-bottom: .25rem; }
}


/* Transparency / Drive card */
.callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stream);
}
.callout h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.callout .lead { color: var(--muted); margin: 0 0 1.4rem; }
.use-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.use-list li { display: grid; grid-template-columns: 26px 1fr; gap: .8rem; align-items: start; }
.use-list .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--stream-soft); display: grid; place-items: center; }
.use-list .ic svg { width: 15px; height: 15px; color: var(--c3); }
.use-list b { color: var(--text); font-weight: 600; }
.use-list span { color: var(--muted); }
.fineprint { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); color: var(--dim); font-size: .9rem; }

/* ===================== Feature rows ================================ */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: center;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
}
.feature:nth-child(even) .feature-media { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: .4rem 0 .8rem; }
.feature p { color: var(--muted); margin: 0 0 1.1rem; }
.feature-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  box-shadow: 0 30px 60px -38px rgba(0,0,0,.8);
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .03em;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border-2);
  padding: .34rem .65rem; border-radius: 8px;
}
.chip.flow { background: var(--stream-soft); border-color: rgba(46,230,198,.25); }

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: -1; }
  .feature-media { order: -1; }
}

/* ===================== Cloud + format grids ======================= */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.mini {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1.2rem 1.3rem;
}
.mini h4 { margin: 0 0 .5rem; font-family: var(--display); font-size: 1.02rem; font-weight: 600; }
.mini p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ===================== Download band ============================== */
.cta-band {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2.2rem, 6vw, 3.6rem);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 120% at 50% 0%, rgba(108,92,255,.18), transparent 70%);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 0 0 .7rem; }
.cta-band p { color: var(--muted); max-width: 48ch; margin: 0 auto 1.6rem; }

/* App Store badge button */
.appstore {
  display: inline-flex; align-items: center; gap: .7rem;
  background: #fff; color: #000;
  padding: .7rem 1.2rem; border-radius: 13px; font-weight: 600;
}
.appstore:hover { text-decoration: none; filter: brightness(.96); }
.appstore svg { width: 26px; height: 26px; }
.appstore small { display: block; font-size: .68rem; font-weight: 500; opacity: .7; line-height: 1; }
.appstore strong { font-size: 1.12rem; line-height: 1.1; }

/* ===================== Legal pages ================================= */
.legal { padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.legal-head { margin-bottom: 2rem; }
.legal-head .badge {
  display: inline-block; font-family: var(--mono); font-size: .76rem; letter-spacing: .1em;
  color: var(--muted); border: 1px solid var(--border-2); border-radius: 999px; padding: .3rem .8rem;
  margin-bottom: 1rem;
}
.legal-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .5rem; }
.legal-head .updated { color: var(--dim); font-family: var(--mono); font-size: .85rem; }

.legal article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3.5vw, 2rem);
  margin-bottom: 1rem;
}
.legal article h2 { font-size: 1.2rem; margin: 0 0 .7rem; }
.legal article h2 .num { color: var(--c3); font-family: var(--mono); font-size: .85em; margin-right: .5rem; }
.legal article p { color: var(--muted); margin: 0 0 .8rem; }
.legal article p:last-child { margin-bottom: 0; }
.legal article ul { margin: 0; color: var(--muted); }
.legal article li { margin-bottom: .5rem; }
.legal article strong { color: var(--text); }
.legal .email-img { display: inline-block; background: rgba(2,6,16,.55); padding: .4rem .7rem; border-radius: 8px; border: 1px solid var(--border); vertical-align: middle; }
.legal .email-img img { display: block; }

/* ===================== Footer ===================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 2.5rem;
  margin-top: 2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 34ch; margin: .8rem 0 0; }
.footer-col h5 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--dim); margin: 0 0 .9rem; font-weight: 600; }
.footer-col a { display: block; color: var(--muted); padding: .25rem 0; font-size: .94rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--dim); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; }

@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ===================== Scroll reveal ==============================
   Only hide when JS is available (html.js). Without JS — and for any
   crawler or fallback — content stays fully visible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ===================== Lang visibility ============================ */
/* Language visibility: hide only the inactive languages, never override the
   display type of the visible element (keeps inline-flex pills, inline spans).
   Default (no body class) = English. */
body:not(.lang-fr):not(.lang-de) [data-lang="fr"],
body:not(.lang-fr):not(.lang-de) [data-lang="de"] { display: none !important; }
body.lang-fr [data-lang="en"],
body.lang-fr [data-lang="de"] { display: none !important; }
body.lang-de [data-lang="en"],
body.lang-de [data-lang="fr"] { display: none !important; }

:focus-visible { outline: 2px solid var(--c3); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
