/* SortFlow — shared site styling. Mirrors the app: warm off-white page, white cards
   with a colored left accent stripe + uppercase header, slim frosted test tubes. */

:root {
  /* Liquid palette (tube fills) */
  --blue: #2666FA; --cyan: #05C7E0; --purple: #9E38EB; --pink: #F580C2;
  --magenta: #EB26B8; --orange: #FA8C0D; --yellow: #FAD114; --lime: #9EE01A;
  --green: #1FC761; --red: #EB2E38;

  /* App difficulty/accent colors used for card stripes */
  --c-standard: #2864F5;  /* accent blue */
  --c-daily:    #F28C26;  /* orange */
  --c-time:     #ED4559;  /* red */
  --c-zen:      #2E944C;  /* success green */

  /* Surfaces & text (asset catalog) */
  --page: #F4F3F1; --card: #FFFFFF; --ink: #1A1A1A; --muted: #5A5F6B;
  --line: #E7E5E1; --accent: #2864F5; --success: #2E944C;

  /* Glass (consumed by the tube SVGs) */
  --glass-fill: rgba(255,255,255,.5);
  --glass-line: rgba(20,23,31,.22);
  --glass-rim:  rgba(20,23,31,.13);

  --r: 16px; --r-sm: 12px;           /* AppCornerRadius.large / .medium */
  --shadow: 0 3px 6px rgba(0,0,0,.10);
  --maxw: 1000px;
  --display: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--page); margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-underline-offset: 2px; }

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand .tubemark { width: auto; height: 24px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; margin-left: 1.2rem; }
.topnav a:hover { color: var(--ink); }

/* ---- Hero (light) ---- */
.hero { text-align: center; padding: 1rem 1.25rem 3rem; position: relative; overflow: hidden; }
.hero::before { /* soft liquid glow behind the tubes */
  content: ""; position: absolute; left: 50%; top: 46%; width: 620px; height: 360px; transform: translate(-50%,-50%);
  background: radial-gradient(closest-side, rgba(40,100,245,.10), transparent 70%); pointer-events: none;
}
.eyebrow { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 1.6rem 0 .9rem; }
.hero h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: clamp(2.3rem, 6.5vw, 3.7rem); line-height: 1.05; margin: 0 auto .8rem; max-width: 16ch; color: var(--ink); }
.hero .tagline { color: var(--muted); font-size: clamp(1.02rem, 2.2vw, 1.22rem); margin: 0 auto 1.6rem; max-width: 48ch; }

/* ---- Tubes ---- */
.tube-row { display: flex; gap: clamp(.7rem, 2.6vw, 1.5rem); justify-content: center; align-items: flex-end; margin: 2.2rem 0 2rem; position: relative; }
.tube { width: clamp(46px, 11vw, 64px); height: auto; filter: drop-shadow(0 7px 11px rgba(20,23,31,.13)); }
.tube-row .tube { animation: bob 5.5s ease-in-out infinite; }
.tube-row .tube:nth-child(2) { animation-delay: .5s; }
.tube-row .tube:nth-child(3) { animation-delay: 1s; }
.tube-row .tube:nth-child(4) { animation-delay: 1.5s; }
.tube-row .tube:nth-child(5) { animation-delay: 2s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* fill on load */
.tube [class^="seg"], .tube .seg { animation: fill .7s cubic-bezier(.2,.8,.2,1) both; }

/* ---- Store badge + Android note ---- */
.badges { --bh: 52px; display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.appstore-link { display: inline-block; line-height: 0; transition: transform .15s ease; }
.appstore-link:hover { transform: translateY(-2px); }
.appstore-badge { height: var(--bh); width: auto; display: block; }
.badge-dark { display: none; }                 /* white lockup, shown only in dark mode */
.android-note {
  display: inline-flex; align-items: center; gap: .5rem; height: var(--bh); padding: 0 1.1rem; border-radius: 999px;
  background: rgba(20,23,31,.04); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--display); font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.android-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* ---- Sections ---- */
section.block { padding: 3rem 0; }
.section-title { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.01em; text-align: center; margin: 0 0 .4rem; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 2rem; max-width: 52ch; }

/* ---- Card (white + left accent stripe + uppercase header) — the app's card identity ---- */
.card {
  position: relative; background: var(--card); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); padding: 1.25rem 1.3rem 1.35rem 1.5rem;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--stripe, var(--accent)); }
.card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.card-head .ic { width: 17px; height: 17px; color: var(--stripe, var(--accent)); flex: none; }
.card-eyebrow { font-family: var(--display); font-weight: 700; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.card-head .chev { margin-left: auto; width: 13px; height: 13px; color: var(--muted); opacity: .55; }

/* Modes grid */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.mode { text-align: center; padding-bottom: 1.5rem; }
.mode .card-head { margin-bottom: .6rem; }
.mode .glyph { width: 40px; height: 40px; color: var(--stripe); margin: .6rem auto .7rem; }
.mode h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 0 0 .3rem; color: var(--ink); }
.mode p { margin: 0 auto; max-width: 30ch; color: var(--muted); font-size: .95rem; }

/* Features — one grouped white card, iOS-list style rows */
.features-card { padding: .4rem 1.4rem; }
.features { list-style: none; margin: 0; padding: 0; }
.features li { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.features li:last-child { border-bottom: 0; }
.features .ic { width: 22px; height: 22px; flex: none; margin-top: .1rem; }
.features b { font-weight: 700; color: var(--ink); }
.features span { color: var(--muted); }

/* Closing CTA — soft tinted panel (no dark band) */
.cta-band { text-align: center; border-radius: 22px; padding: 2.6rem 1.5rem; margin: 1rem 0 3rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card)); border: 1px solid var(--line); }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: 1.7rem; margin: 0 0 1.4rem; color: var(--ink); }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding: 2rem 1.25rem 2.6rem; text-align: center; }
.footnav a { color: var(--muted); text-decoration: none; margin: 0 .7rem; font-weight: 600; font-size: .92rem; }
.footnav a:hover { color: var(--ink); }
.copyright { color: var(--muted); font-size: .82rem; margin-top: .9rem; opacity: .8; }

/* ---- Content pages (privacy / support / changelog) ---- */
.doc { max-width: 720px; margin: 0 auto; padding: 2.4rem 1.25rem 3.5rem; }
.doc h1 { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -.01em; margin: 0 0 .25rem; }
.doc .subtitle, .doc .effective-date { color: var(--muted); font-size: .92rem; margin-bottom: 2rem; }
.doc h2 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 2rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.doc p { margin: .5rem 0; } .doc ul { margin: .5rem 0; padding-left: 1.4rem; } .doc li { margin-bottom: .35rem; }
.doc .faq-q { font-weight: 700; margin-top: 1.1rem; }
.doc .contact { background: color-mix(in srgb, var(--accent) 6%, var(--card)); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1rem 1.25rem; margin: 1.2rem 0; }
.doc .contact p { margin: .25rem 0; }
.doc .nav { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .92rem; }
.doc .nav a { margin-right: 1rem; font-weight: 600; text-decoration: none; }

/* Changelog */
.version-block { margin-bottom: 2.4rem; }
.version-header { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .35rem; margin-bottom: .75rem; }
.version-header h2 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 0; border: 0; padding: 0; }
.version-date { font-size: .85rem; color: var(--muted); }
.section-label { font-family: var(--display); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .9rem 0 .3rem; }
.tag { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--success) 16%, var(--card)); color: color-mix(in srgb, var(--success) 62%, var(--ink)); margin-left: .15rem; vertical-align: middle; }

/* ---- Responsive ---- */
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } .topnav { display: none; } }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tube-row .tube, .tube .seg, .tube [class^="seg"] { animation: none; } .appstore-link { transition: none; } }

/* ---- Focus ---- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- Dark mode (mirrors the app's dark surfaces) ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --page: #14171F; --card: #1E2330; --ink: #ECECEC; --muted: #9AA0AD; --line: #2A2F3B;
    --glass-fill: rgba(255,255,255,.06); --glass-line: rgba(255,255,255,.28); --glass-rim: rgba(255,255,255,.18);
    --shadow: 0 4px 14px rgba(0,0,0,.45);
  }
  .hero::before { background: radial-gradient(closest-side, rgba(60,120,255,.16), transparent 70%); }
  .badge-light { display: none; } .badge-dark { display: block; }
  .android-note { background: rgba(255,255,255,.05); }
  .tube { filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
}
