/* StorageMax marketing site
 * Mirrors the app's palette + typography so the site and the product feel
 * like one thing. Dark navy first, accent purple only where it earns it.
 * Pure CSS — no JS, no framework. Loads <50KB total.
 */

/* ---- 1. Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---- 2. Tokens ----------------------------------------------------- */
:root {
  --bg:           #0A0E27;
  --bg-elev:      #141833;
  --bg-card:      #1C2042;
  --bg-card-2:    #232855;
  --border:       rgba(255, 255, 255, 0.07);
  --border-2:     rgba(255, 255, 255, 0.14);
  --text:         #FFFFFF;
  --text-2:       #C8CAD8;
  --text-3:       #7A7E96;
  --primary-1:    #6B4EFF;
  --primary-2:    #B14EFF;
  --success:      #34D399;
  --warning:      #FBBF24;
  --danger:       #FF4E64;
  --maxie-light:  #C593FF;

  --grad-primary: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
  --grad-hero:    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(107, 78, 255, 0.18) 0%, transparent 70%);

  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 20px 60px rgba(107, 78, 255, 0.35);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- 3. Base ------------------------------------------------------- */
html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03"; /* Inter alt forms */
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  font-feature-settings: "ss01";
}

/* Container helpers */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 760px;
}

/* ---- 4. Site header (legal pages) --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark, .footer-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.wordmark img, .footer-wordmark img {
  border-radius: 8px;
}
.site-nav {
  display: flex;
  gap: 24px;
  font-weight: 500;
  color: var(--text-2);
}
.site-nav a:hover { color: var(--text); }

/* ---- 4b. Brand bar (tiny wordmark-only top bar for landing) ------- */
.brand-bar {
  position: relative;
  z-index: 10;
  padding: 22px 0;
}
.brand-bar .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-bar .wordmark img {
  border-radius: 8px;
}

/* ---- 5. Hero ------------------------------------------------------- */
.hero {
  position: relative;
  padding: 80px 0 120px;
  background: var(--grad-hero), var(--bg);
  overflow: hidden;
}

/* Single-screen variant. Removes the bottom padding so the page fits in
   the viewport on desktop, and tightens the top so the brand-bar sits
   just above without a gap. The hero is now the whole page (besides
   footer). */
.hero-tight {
  padding: 16px 0 64px;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-tight {
    padding: 24px 0 72px;
    min-height: calc(100vh - 240px);
  }
}
.hero::after {
  /* Faint conic gradient for depth, far below the fold's main content */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(107, 78, 255, 0.10), transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(177, 78, 255, 0.08), transparent 50%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero {
    padding: 120px 0 160px;
  }
  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 80px;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(107, 78, 255, 0.12);
  border: 1px solid rgba(107, 78, 255, 0.35);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.hero h1 .accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-2);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* CTA group */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  background: var(--grad-primary);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(107, 78, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.cta-primary:active { transform: translateY(1px); }
.cta-secondary {
  font-weight: 600;
  color: var(--text-2);
  padding: 10px 4px;
  transition: color 0.2s;
}
.cta-secondary:hover { color: var(--text); }
.cta-fineprint {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 16px;
  line-height: 1.4;
}

/* ---- 6. Phone mockup + swipe animation ----------------------------- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 580px;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(107, 78, 255, 0.25), transparent 60%);
  filter: blur(40px);
}

.phone {
  position: relative;
  width: 304px;
  height: 624px;
  background: linear-gradient(180deg, #1a1f3d 0%, #0d1129 100%);
  border-radius: 50px;
  border: 1px solid var(--border-2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(107, 78, 255, 0.2);
  padding: 12px;
  animation: phone-float 8s ease-in-out infinite;
}
@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-12px) rotate(1deg); }
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.status-bar .indicators {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--text-2);
}

/* Deck header */
.deck-header {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-2);
}
.deck-header .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.deck-header .title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}
.deck-header .title small {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 400;
  margin-top: 1px;
}

.deck-progress {
  position: relative;
  height: 3px;
  margin: 6px 18px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.deck-progress::after {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  background: var(--success);
  border-radius: 999px;
  animation: progress-fill 16s linear infinite;
}
@keyframes progress-fill {
  0% { width: 0%; }
  100% { width: 90%; }
}

/* Stat row */
.stat-row {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
}
.stat-card {
  flex: 1;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.stat-card .label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.stat-card .value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 2px;
}
.stat-card.kept .label { color: var(--warning); }
.stat-card.trash .label { color: var(--danger); }

/* Card stack */
.card-stack {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 30px;
}
.swipe-card {
  position: absolute;
  width: 200px;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  background: var(--bg-card);
  border: 1px solid var(--border-2);
}
.swipe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stamps */
.swipe-card .stamp {
  position: absolute;
  top: 28px;
  padding: 6px 14px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 8px;
  border: 3px solid currentColor;
  opacity: 0;
  transform: rotate(-12deg);
}
.swipe-card .stamp.keep   { right: 18px; color: var(--success); }
.swipe-card .stamp.delete { left: 18px;  color: var(--danger); transform: rotate(12deg); }

/* Static phantom cards behind the active one — give the stack depth */
.swipe-card.phantom-1 {
  transform: translateY(-6px) scale(0.96);
  filter: brightness(0.75);
  z-index: 1;
}
.swipe-card.phantom-2 {
  transform: translateY(-12px) scale(0.92);
  filter: brightness(0.55);
  z-index: 0;
}

/* Active card 1 — swipes right (keep) */
.swipe-card.active-a {
  z-index: 3;
  animation: swipe-right 8s var(--ease-out) infinite;
}
.swipe-card.active-a .stamp.keep {
  animation: stamp-keep-a 8s linear infinite;
}

/* Active card 2 — swipes left (delete) — offset by 4s */
.swipe-card.active-b {
  z-index: 2;
  animation: swipe-left 8s var(--ease-out) infinite;
  animation-delay: -4s;
}
.swipe-card.active-b .stamp.delete {
  animation: stamp-del-b 8s linear infinite;
  animation-delay: -4s;
}

/* Keep timing: 0-1.5s rest, 1.5-3s swipe right, 3-4s hidden, then back behind */
@keyframes swipe-right {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  18%  { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  38%  { transform: translate(140%, -10%) rotate(20deg); opacity: 1; }
  44%  { transform: translate(180%, -10%) rotate(20deg); opacity: 0; }
  /* off-screen, hidden, return to behind the b card */
  50%  { transform: translate(0, 0) rotate(0deg) scale(0.92); opacity: 0; z-index: 0; }
  99%  { transform: translate(0, 0) rotate(0deg) scale(0.92); opacity: 0; z-index: 0; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; z-index: 3; }
}
@keyframes swipe-left {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  18%  { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  38%  { transform: translate(-140%, -10%) rotate(-20deg); opacity: 1; }
  44%  { transform: translate(-180%, -10%) rotate(-20deg); opacity: 0; }
  50%  { transform: translate(0, 0) rotate(0deg) scale(0.92); opacity: 0; z-index: 0; }
  99%  { transform: translate(0, 0) rotate(0deg) scale(0.92); opacity: 0; z-index: 0; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; z-index: 3; }
}

@keyframes stamp-keep-a {
  0%, 18%   { opacity: 0; }
  28%       { opacity: 1; }
  44%       { opacity: 1; }
  47%, 100% { opacity: 0; }
}
@keyframes stamp-del-b {
  0%, 18%   { opacity: 0; }
  28%       { opacity: 1; }
  44%       { opacity: 1; }
  47%, 100% { opacity: 0; }
}

/* Action buttons under the deck */
.action-row {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
}
.action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid;
}
.action-btn.delete {
  color: var(--danger);
  border-color: rgba(255, 78, 100, 0.35);
  background: rgba(255, 78, 100, 0.10);
}
.action-btn.keep {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.10);
}

/* Home indicator */
.home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
}

/* ---- 7. Section: features ----------------------------------------- */
.section {
  padding: 100px 0;
}
.section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 16px;
}
.section .lede {
  font-size: 17px;
  color: var(--text-2);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 56px;
  line-height: 1.5;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  position: relative;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  overflow: hidden;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--accent, transparent) 0%, transparent 40%);
  opacity: 0.10;
  pointer-events: none;
}
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--accent-bg, var(--bg-card-2));
  color: var(--accent, var(--primary-1));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

/* per-category accent */
.feature.similar     { --accent: var(--primary-2); --accent-bg: rgba(177, 78, 255, 0.14); }
.feature.duplicates  { --accent: #FF7A8B;          --accent-bg: rgba(255, 122, 139, 0.14); }
.feature.screenshots { --accent: var(--warning);   --accent-bg: rgba(251, 191, 36, 0.14); }
.feature.blurry      { --accent: #5EEAD4;          --accent-bg: rgba(94, 234, 212, 0.14); }
.feature.live        { --accent: #F472B6;          --accent-bg: rgba(244, 114, 182, 0.14); }
.feature.videos      { --accent: var(--danger);    --accent-bg: rgba(255, 78, 100, 0.14); }

/* ---- 8. Privacy section ------------------------------------------- */
.privacy {
  padding: 100px 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(52, 211, 153, 0.06), transparent 70%),
    var(--bg);
}
.privacy .container {
  text-align: center;
}
.privacy-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.privacy h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 24px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.privacy-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 540px;
  margin: 36px auto 0;
  text-align: left;
}
.privacy-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
}
.privacy-list .check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.18);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- 9. Final CTA -------------------------------------------------- */
.final-cta {
  padding: 100px 0 140px;
  background:
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(107, 78, 255, 0.20), transparent 70%),
    var(--bg);
}
.final-cta .container { text-align: center; }
.final-cta h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta p {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 auto 36px;
  max-width: 540px;
}
.final-cta .cta-row {
  justify-content: center;
}

/* ---- 10. Footer ---------------------------------------------------- */
.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.footer-nav a:hover { color: var(--text); }
.footer-fineprint {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

/* ---- 11. Legal / prose -------------------------------------------- */
.legal-main {
  padding: 60px 0 80px;
}
.prose {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
}
.prose h1 {
  color: var(--text);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  line-height: 1.15;
}
.prose h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}
.prose h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.prose p { margin: 12px 0; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a {
  color: var(--maxie-light);
  border-bottom: 1px solid rgba(197, 147, 255, 0.4);
  transition: border-color 0.2s, color 0.2s;
}
.prose a:hover { color: var(--text); border-color: var(--text); }
.prose ul, .prose ol {
  padding-left: 1.25em;
  margin: 12px 0;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 6px 0; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.prose th {
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* Last-updated bump for the legal docs */
.prose > p:first-of-type strong {
  display: inline-block;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- 12. Misc ------------------------------------------------------ */
::selection {
  background: var(--primary-1);
  color: white;
}

/* Reduce motion for users who ask for it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
