﻿/* =============================================================
   Vireks+ - styles.css
   Single, hand-written stylesheet (no framework, no build step).
   Follows marketing_kit/website_app/01_standards.md.

   Section map:
     1.  Design tokens (CSS custom properties)
     2.  Reset + base
     3.  Accessibility primitives (skip link, focus, motion)
     4.  Typography
     5.  Layout: container + grid utilities
     6.  Header / nav / footer
     7.  Components: buttons, cards, badges
     8.  Sections: hero, features, screenshots, how-it-works,
                   reviews, security, pricing, faq, cta
     9.  Legal pages (long-form prose)
     10. Print + reduced-motion overrides
   ============================================================= */

/* 1. Design tokens ------------------------------------------------- */
:root {
  /* Brand */
  --brand-primary: #e14b4b;
  --brand-accent:  #22d3ee;

  /* Surface (dark theme is default) */
  --bg:           #0b0f1a;
  --bg-elev-1:    #131826;
  --bg-elev-2:    #1a2030;
  --fg:           #e6ecf5;
  --fg-muted:     #aab2c5;
  --border:       #232a3d;
  --border-hi:    #2e3854;

  /* Type scale (clamp = fluid) */
  --type-xs:   clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --type-sm:   clamp(0.85rem, 0.8rem + 0.3vw, 0.95rem);
  --type-base: clamp(1rem,    0.95rem + 0.3vw, 1.1rem);
  --type-lg:   clamp(1.15rem, 1rem + 0.6vw,    1.35rem);
  --type-xl:   clamp(1.35rem, 1.15rem + 1vw,   1.75rem);
  --type-2xl:  clamp(1.7rem,  1.4rem + 1.5vw,  2.4rem);
  --type-3xl:  clamp(2.2rem,  1.8rem + 2vw,    3.4rem);
  --type-hero: clamp(2.6rem,  2rem + 3vw,      4.5rem);

  /* Spacing scale (4-pt) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.18);
  --shadow-2: 0 4px 16px rgba(0,0,0,.28), 0 12px 32px rgba(0,0,0,.22);

  /* Layout */
  --container-max: 1200px;
  --container-px: clamp(1rem, 4vw, 2rem);

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 400ms;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #ffffff;
    --bg-elev-1: #f7f8fb;
    --bg-elev-2: #eef0f6;
    --fg:        #0b0f1a;
    --fg-muted:  #4b5670;
    --border:    #e1e5ee;
    --border-hi: #cdd3e0;
  }
}

/* 2. Reset + base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji";
  font-size: var(--type-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { font-style: italic; } /* makes broken-image alts more readable */

a { color: var(--brand-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

/* 3. Accessibility primitives -------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elev-2);
  color: var(--fg);
  border-radius: var(--radius-md);
  z-index: 100;
  transition: top var(--duration-base) var(--ease);
}
.skip-link:focus {
  top: 8px;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Typography ---------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--fg);
}
h1 { font-size: var(--type-hero); letter-spacing: -0.02em; }
h2 { font-size: var(--type-3xl); }
h3 { font-size: var(--type-xl); }
h4 { font-size: var(--type-lg); }

p { margin: 0 0 var(--space-4); }
.muted { color: var(--fg-muted); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  font-size: 0.92em;
}
code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
}
pre {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  overflow-x: auto;
}

/* 5. Layout -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-px);
}

section {
  padding-block: var(--space-16);
}

.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 6. Header / nav / footer ---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand__name { letter-spacing: -.01em; }
.brand__mark {
  border-radius: 8px;
  background: var(--bg-elev-1);
}

.nav__links {
  display: none;
  gap: var(--space-6);
  margin: 0 auto 0 var(--space-4);
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .nav__links { display: flex; }
}
.nav__links a {
  color: var(--fg);
  font-size: var(--type-sm);
}

.site-footer {
  background: var(--bg-elev-1);
  border-top: 1px solid var(--border);
  padding-block: var(--space-12);
}
.site-footer__cols {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .site-footer__cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.site-footer h4 {
  font-size: var(--type-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: var(--space-3);
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { margin-bottom: var(--space-2); }
.site-footer a { color: var(--fg); }

/* 7. Components ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--type-base);
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-1);
}
.btn--primary:hover { filter: brightness(1.1); }

.btn--secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-hi);
}
.btn--secondary:hover { background: var(--bg-elev-1); }

.btn--lg { padding: var(--space-4) var(--space-6); font-size: var(--type-lg); }

.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card h3 {
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 8. Sections ----------------------------------------------------- */
.hero {
  padding-block: var(--space-20) var(--space-16);
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--brand-primary) 20%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 60%, color-mix(in srgb, var(--brand-accent) 15%, transparent), transparent 60%);
}
.hero__inner {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1.2fr 1fr; }
}
.hero h1 { margin-bottom: var(--space-4); }
.hero p.lead {
  font-size: var(--type-lg);
  color: var(--fg-muted);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.shots {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px)  { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(4, 1fr); } }

.shot { margin: 0; }
.shot figcaption {
  margin-top: var(--space-2);
  font-size: var(--type-sm);
  color: var(--fg-muted);
}
.shot__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1440;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  background: var(--bg-elev-1);
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: inline-block;
  font-size: var(--type-sm);
  font-weight: 700;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  width: 28px; height: 28px;
  text-align: center;
  line-height: 28px;
  margin-bottom: var(--space-3);
}

.faq__item {
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-4);
}
.faq__q {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  float: right;
  font-weight: 400;
  color: var(--fg-muted);
}
details[open] .faq__q::after { content: "-"; }
.faq__a { margin-top: var(--space-3); color: var(--fg-muted); }

/* 8a. Google Play badge ------------------------------------------- *
 * Official badge artwork from https://play.google.com/intl/en_us/badges/.
 * Brand guidelines FORBID altering the badge artwork itself - no
 * recolour, no border, no drop-shadow on the badge image.
 * Only the wrapper anchor gets motion / focus feedback.
 * The badge ships at native 646x250; render at fixed height with auto
 * width to keep its native aspect ratio and avoid CLS.
 */
.play-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 12px;
  transition: transform var(--duration-base) var(--ease);
}
.play-badge:hover  { transform: translateY(-1px); text-decoration: none; }
.play-badge:active { transform: translateY(0); }
.play-badge img {
  height: 64px;
  width: auto;
  display: block;
}
@media (min-width: 720px) {
  .play-badge img { height: 72px; }
}
@media (forced-colors: active) {
  .play-badge { outline: 1px solid CanvasText; }
}

/* 9. Legal pages -------------------------------------------------- */
.legal {
  padding-block: var(--space-16);
}
.legal article {
  max-width: 72ch;
  margin: 0 auto;
}
.legal h1 { margin-bottom: var(--space-4); }
.legal h2 {
  margin-top: var(--space-12);
  font-size: var(--type-2xl);
  border-top: 1px solid var(--border);
  padding-top: var(--space-8);
}
.legal h3 { margin-top: var(--space-8); font-size: var(--type-lg); }
.legal p, .legal li { color: var(--fg); }

/* 10. Print + final overrides ------------------------------------- */
@media print {
  .site-header, .site-footer, .skip-link, .nav__links,
  .hero__cta, .btn, .play-badge { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  section { padding-block: 1rem; }
}
