/* ==========================================================================
   Offloadr — Landing Page Styles
   Dark pro-tool aesthetic. Brand red (#D93B34) + "Safe to Format" green.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  --bg: #0d0e11;
  --bg-alt: #111318;
  --bg-card: #16181e;
  --bg-card-2: #1b1e25;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f2f3f5;
  --text-dim: #9aa0ab;
  --text-faint: #8d95a3;

  --brand: #e4463d;          /* accents/links on dark */
  --brand-solid: #d93b34;    /* solid buttons */
  --brand-hi: #ff5c52;
  --brand-glow: rgba(217, 59, 52, 0.35);

  --safe: #35c759;           /* verification / "Safe to Format" */
  --safe-dim: rgba(53, 199, 89, 0.14);
  --info: #4c8dff;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --container: 1180px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-red: 0 20px 50px -18px var(--brand-glow);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--brand); color: #fff; }

/* --- Layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: 96px; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: 64px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--brand);
  display: inline-block;
}

h1, h2, h3 { line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-top: 18px;
  max-width: 20ch;
}
.section-intro {
  color: var(--text-dim);
  font-size: 1.12rem;
  margin-top: 18px;
  max-width: 62ch;
}
.section-head { margin-bottom: 56px; }
.text-safe { color: var(--safe); }
.text-brand { color: var(--brand); }
.mono { font-family: var(--font-mono); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand-solid);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover { background: var(--brand-hi); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--brand); color: #fff; background: rgba(255,255,255,0.03); }
.btn--sm { padding: 10px 16px; font-size: 0.92rem; }

/* App Store badge (inline SVG wrapper) */
.appstore-badge { display: inline-flex; transition: transform 0.2s var(--ease), opacity 0.2s; }
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge svg { height: 54px; width: auto; }

/* --- Header / Nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(160%) blur(14px);
  background: rgba(13, 14, 17, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.brand .brand-name {
  font-family: var(--font-mono);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.lang-switch a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  color: var(--text-faint);
  transition: background 0.2s, color 0.2s;
}
.lang-switch a.is-active { background: var(--brand-solid); color: #fff; }
.lang-switch a:not(.is-active):hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text); }
.nav-toggle svg { width: 26px; height: 26px; }

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; padding-top: 84px; padding-bottom: 96px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, rgba(217,59,52,0.22), transparent 60%),
    radial-gradient(45% 40% at 8% 30%, rgba(217,59,52,0.10), transparent 60%);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.03em;
  margin-top: 22px;
}
.hero h1 .accent { color: var(--brand); }
.hero-sub {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: var(--text-dim);
  margin-top: 22px;
  max-width: 52ch;
}
.hero-cta { display: flex; align-items: center; gap: 18px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta .n { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: #fff; }
.hero-meta .l { font-size: 0.82rem; color: var(--text-faint); letter-spacing: 0.02em; }

/* Hero device / app card mock */
.hero-visual { position: relative; }
.device {
  background: linear-gradient(160deg, #1c1f27, #131519);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.device::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(217,59,52,0.14), transparent 55%);
  pointer-events: none;
}
.device-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.device-title { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.05em; }
.pill {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; letter-spacing: 0.06em;
}
.pill--net { background: rgba(76,141,255,0.15); color: var(--info); }
.pill--safe { background: var(--safe-dim); color: var(--safe); }

.filerow {
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.82rem;
}
.filerow:last-child { border-bottom: 0; }
.filerow .fname { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filerow .fhash { color: var(--text-faint); font-size: 0.74rem; }
.check { width: 18px; height: 18px; color: var(--safe); }

.progress-wrap { margin-top: 18px; }
.progress-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-dim); margin-bottom: 8px; }
.progress-track { height: 8px; background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 74%; background: linear-gradient(90deg, var(--brand-solid), var(--brand-hi)); border-radius: 999px; }

.safe-banner {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
  background: var(--safe-dim);
  border: 1px solid rgba(53,199,89,0.35);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.04em;
  color: var(--safe);
}
.safe-banner svg { width: 22px; height: 22px; }

/* Floating badge on hero visual */
.float-badge {
  position: absolute; left: -18px; bottom: 26px;
  background: var(--bg-card); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px; font-size: 0.86rem;
}
.float-badge .dot { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--safe-dim); color: var(--safe); flex: none; }
.float-badge b { color: #fff; }
.float-badge span { color: var(--text-faint); font-size: 0.76rem; }

/* --- Logo strip ---------------------------------------------------------- */
.compat { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.compat-inner { display: flex; align-items: center; gap: 34px; padding-block: 26px; flex-wrap: wrap; justify-content: center; }
.compat-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.compat-item { font-family: var(--font-mono); font-weight: 700; color: var(--text-dim); font-size: 1.02rem; letter-spacing: 0.02em; }

/* --- Generic grids ------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--bg-card-2); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: rgba(217,59,52,0.12); color: var(--brand);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.98rem; }
.card .tag { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }

/* --- Pillars (why different) -------------------------------------------- */
.pillar .icon { background: var(--safe-dim); color: var(--safe); }

/* --- Steps --------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { position: relative; padding: 28px 24px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.step .num {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-solid); color: #fff; margin-bottom: 18px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.94rem; }

/* --- Feature blocks (alternating) --------------------------------------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding-block: 60px;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.reverse .feature-media { order: -1; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 16px 0 16px; }
.feature p { color: var(--text-dim); font-size: 1.06rem; margin-bottom: 16px; }
.feature-list { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 22px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: 0.98rem; }
.feature-list svg { width: 20px; height: 20px; color: var(--safe); flex: none; margin-top: 3px; }

.mock {
  background: linear-gradient(160deg, #1a1d24, #121419);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.mock-glow { position: absolute; inset: 0; background: radial-gradient(90% 60% at 20% 0%, rgba(217,59,52,0.10), transparent 60%); pointer-events: none; }
.mock h3 { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); letter-spacing: 0.06em; margin-bottom: 18px; text-transform: uppercase; }

/* code / hash blocks */
.codeblock {
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.9;
  background: #0b0c0f; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; color: var(--text-dim); overflow-x: auto;
}
.codeblock .k { color: var(--brand); }
.codeblock .g { color: var(--safe); }
.codeblock .c { color: var(--text-faint); }

.speed-bars { display: grid; gap: 14px; }
.speed-bar .top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 6px; }
.speed-bar .top .v { color: #fff; }
.speed-bar .top .n { color: var(--text-dim); }
.bar-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-solid), var(--brand-hi)); }
.bar-fill.slow { background: rgba(255,255,255,0.18); }

/* --- Tech specs grid ----------------------------------------------------- */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { background: var(--bg-card); padding: 26px; }
.spec h3 { font-size: 1.06rem; margin-bottom: 8px; display: flex; align-items: center; gap: 9px; }
.spec h3 svg { width: 18px; height: 18px; color: var(--brand); }
.spec p { color: var(--text-dim); font-size: 0.92rem; }
.spec code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--safe); background: rgba(53,199,89,0.08); padding: 1px 6px; border-radius: 5px; }

/* --- Formats table ------------------------------------------------------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.formats { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
table.formats th, table.formats td { text-align: left; padding: 16px 22px; border-bottom: 1px solid var(--line); }
table.formats th { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); background: var(--bg-alt); }
table.formats tr:last-child td { border-bottom: 0; }
table.formats td:first-child { font-weight: 600; width: 160px; }
table.formats .fmt { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.86rem; }

/* --- Privacy ------------------------------------------------------------- */
.privacy { position: relative; overflow: hidden; }
.privacy .section-title { max-width: 24ch; }
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.privacy-item { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; }
.privacy-item .x { width: 26px; height: 26px; border-radius: 8px; background: rgba(217,59,52,0.12); color: var(--brand); display: grid; place-items: center; flex: none; }
.privacy-item .x svg { width: 15px; height: 15px; }
.privacy-item p { font-size: 0.96rem; }
.privacy-item b { color: #fff; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 22px; height: 22px; color: var(--text-faint); transition: transform 0.3s var(--ease); flex: none; }
.faq details[open] summary .chev { transform: rotate(45deg); color: var(--brand); }
.faq .answer { color: var(--text-dim); padding-bottom: 24px; font-size: 1rem; max-width: 68ch; }

/* --- CTA / signup -------------------------------------------------------- */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #17191f, #0f1013);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  text-align: center;
}
.cta-glow { position: absolute; inset: 0; background: radial-gradient(60% 100% at 50% 0%, rgba(217,59,52,0.22), transparent 60%); pointer-events: none; }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); position: relative; }
.cta p { color: var(--text-dim); font-size: 1.14rem; margin: 18px auto 0; max-width: 54ch; position: relative; }
.cta .hero-cta { justify-content: center; }

.signup { max-width: 520px; margin: 32px auto 0; position: relative; }
.signup-form { display: flex; gap: 10px; }
.signup-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--text); font-size: 1rem; font-family: inherit;
}
.signup-form input::placeholder { color: var(--text-faint); }
.signup-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,59,52,0.18); }
.signup-note { font-size: 0.82rem; color: var(--text-faint); margin-top: 12px; }
.form-msg { font-size: 0.92rem; margin-top: 14px; min-height: 20px; font-family: var(--font-mono); }
.form-msg.ok { color: var(--safe); }
.form-msg.err { color: var(--brand-hi); }

/* --- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 40px; background: var(--bg-alt); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-brand p { color: var(--text-dim); font-size: 0.95rem; margin-top: 16px; max-width: 34ch; }
.footer-col h3 { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.95rem; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; flex-wrap: wrap; gap: 14px; }
.footer-bottom p { color: var(--text-faint); font-size: 0.86rem; }
.footer-bottom .legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom .legal a { color: var(--text-faint); font-size: 0.86rem; }
.footer-bottom .legal a:hover { color: var(--text); }

/* --- Width utilities (avoid inline styles for strict CSP) ---------------- */
.w-96 { width: 96%; } .w-74 { width: 74%; } .w-62 { width: 62%; }
.w-58 { width: 58%; } .w-40 { width: 40%; } .w-28 { width: 28%; }
.mt-lg { margin-top: 32px; }

/* --- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 460px; }
  .feature, .privacy-grid { grid-template-columns: 1fr; gap: 34px; }
  .feature.reverse .feature-media { order: 0; }
  .grid-3, .steps, .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .section { padding-block: 68px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open .nav-links {
    display: flex; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 18px 24px;
  }
  .nav.is-open .nav-links a { padding: 10px 0; width: 100%; }
  .grid-3, .grid-2, .steps, .spec-grid, .privacy-grid { grid-template-columns: 1fr; }
  .signup-form { flex-direction: column; }
  .cta { padding: 44px 26px; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-meta { gap: 20px; }
  .float-badge { display: none; }
  .spec-grid { gap: 0; }
}
