/**
 * Fixiv — Design System Tokens
 * Source of truth: mobile/src/theme/ (paigetech/fixiv)
 * Web equivalents of the React Native token files.
 *
 * Usage: import this stylesheet and reference the CSS custom properties
 * in any Fixiv-branded HTML/web artifact.
 */

/* ─────────────────────────────────────────────────────────────
   LIGHT MODE (default)
   ───────────────────────────────────────────────────────────── */
:root {

  /* ── Primary purples ──────────────────────────────────────── */
  --purple-700: #7B5EA7;   /* brand, active tab, gauge fill, checkmarks, CTAs */
  --purple-500: #9B7FD0;   /* secondary purple, upcoming task dots, gauge fill */
  --purple-300: #C4B8D8;   /* unchecked borders, inactive elements, dividers */
  --purple-200: #DDD5ED;   /* gauge track, light pill backgrounds */
  --purple-100: #E8E0F0;   /* subtle section fills */
  --purple-bg: rgba(123, 94, 167, 0.08);    /* icon background tint */
  --purple-bg-strong: rgba(123, 94, 167, 0.10); /* appliance icon chips */

  /* ── Accent pinks (reserved for "needs attention") ───────── */
  --pink-500: #D4537E;     /* overdue state, attention, warnings */
  --pink-bg: rgba(211, 83, 126, 0.08);   /* overdue task row background */
  --pink-border: rgba(211, 83, 126, 0.12); /* overdue task row border */

  /* ── Text neutrals (purple-tinted, not pure gray) ─────────── */
  --text-primary: #2A1F3D;   /* headings, primary body */
  --text-secondary: #6B5E7B; /* secondary body, descriptions */
  --text-muted: #8B7EA0;     /* labels, metadata, timestamps */
  --text-faint: #B8ADCA;     /* inactive states, placeholders */

  /* ── Surfaces ─────────────────────────────────────────────── */
  --surface-card: #FFFFFF;                    /* floating card panels — always opaque */
  --surface-summary: rgba(255,255,255,0.50);  /* home summary cards, appliance chips */
  --surface-preview: rgba(255,255,255,0.45);  /* task preview rows on home screen */
  --surface-tabbar: rgba(255,255,255,0.70);   /* tab bar background */
  --card-border: rgba(255,255,255,0.60);      /* card / chip border */

  /* ── Misc ─────────────────────────────────────────────────── */
  --row-divider: rgba(0, 0, 0, 0.05);
  --drag-handle: rgba(0, 0, 0, 0.12);

  /* ── Signature background gradient ──────────────────────────
     The single most recognizable brand element. Use as hero/page bg.
     Reads as lavender → pink, top-left to bottom-right (170deg).
  */
  --bg-gradient: linear-gradient(
    170deg,
    #F0EBF7 0%,
    #E8E0F4 20%,
    #DDD5ED 40%,
    #E4DAF0 55%,
    #ECDFEF 70%,
    #F2E6F0 85%,
    #F8F0F4 100%
  );

  /* ── Logo gradient (used on app icon stroke) ─────────────── */
  --logo-gradient: linear-gradient(135deg, #7B5EA7 0%, #D4537E 100%);

  /* ── Spacing ──────────────────────────────────────────────── */
  --card-margin: 10px;         /* gap between floating card and viewport edge */
  --screen-padding-h: 24px;    /* horizontal padding inside cards */
  --section-gap: 20px;         /* gap between major sections on home screen */
  --list-item-pad-y: 15px;     /* vertical padding per list row */

  /* ── Radii ────────────────────────────────────────────────── */
  --radius-card: 32px;         /* floating card panels, primary content blocks */
  --radius-chip: 16px;         /* home summary cards, task preview rows, chips */
  --radius-icon: 12px;         /* appliance icon backgrounds */
  --radius-button: 14px;       /* primary buttons */
  --radius-checkbox: 7px;      /* task checkboxes */

  /* ── Elevation / Shadow ───────────────────────────────────── */
  --shadow-card: 0 10px 40px rgba(42, 31, 61, 0.08);        /* floating cards */
  --shadow-card-hero: 0 30px 80px rgba(42, 31, 61, 0.15);   /* phone mockups */

  /* ── Motion ───────────────────────────────────────────────── */
  --spring-easing: cubic-bezier(0.32, 0.72, 0, 1);  /* card slide spring */
  --spring-duration: 500ms;
  --micro-duration: 150ms;     /* hover/press opacity transitions */
}

/* Dark mode intentionally omitted — this is a light-only marketing page. */

/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHY SYSTEM
   Font: system font stack (SF Pro on iOS/macOS, Segoe UI on Windows,
   sans-serif everywhere else). No custom font files needed.
   ───────────────────────────────────────────────────────────── */
:root {
  --font-sans: -apple-system, "SF Pro Display", "SF Pro Text",
               system-ui, "Segoe UI", Roboto, sans-serif;

  /* ── Web type scale (scaled up from mobile sizes) ────────── */

  /* Hero headline: 56–72px / bold */
  --text-hero-size: clamp(52px, 6vw, 72px);
  --text-hero-weight: 700;
  --text-hero-line-height: 1.1;
  --text-hero-color: var(--text-primary);

  /* Section heading: 32–40px / bold */
  --text-section-size: clamp(28px, 3.5vw, 40px);
  --text-section-weight: 700;
  --text-section-line-height: 1.2;
  --text-section-color: var(--text-primary);

  /* Sub-headline: 20–24px / regular */
  --text-subhead-size: clamp(18px, 2vw, 24px);
  --text-subhead-weight: 400;
  --text-subhead-line-height: 1.5;
  --text-subhead-color: var(--text-secondary);

  /* Card / feature title: 22–26px / bold */
  --text-card-title-size: clamp(20px, 2vw, 26px);
  --text-card-title-weight: 700;
  --text-card-title-color: var(--text-primary);

  /* Body: 16–18px / regular */
  --text-body-size: clamp(15px, 1.2vw, 18px);
  --text-body-weight: 400;
  --text-body-line-height: 1.6;
  --text-body-color: var(--text-secondary);

  /* ── Mobile type scale (as-coded in typography.ts) ─────────── */

  /* Screen title: 26px / 700 */
  --text-screen-title-size: 26px;
  --text-screen-title-weight: 700;

  /* Card title: 22px / 700 */
  --text-card-size: 22px;
  --text-card-weight: 700;

  /* Gauge number: 28px / 700 */
  --text-gauge-size: 28px;
  --text-gauge-weight: 700;

  /* List item title: 15px / 500 */
  --text-list-size: 15px;
  --text-list-weight: 500;

  /* Body mobile: 13px / 400 */
  --text-body-mobile-size: 13px;
  --text-body-mobile-weight: 400;

  /* Section label: 12px / 500 / uppercase / 0.8px letter-spacing */
  --text-label-size: 12px;
  --text-label-weight: 500;
  --text-label-transform: uppercase;
  --text-label-spacing: 0.8px;
  --text-label-color: var(--text-muted);

  /* Link / CTA: 13px / 500 / --purple-700 */
  --text-link-size: 13px;
  --text-link-weight: 500;
  --text-link-color: var(--purple-700);

  /* Metadata / fine print: 11–12px / 400 / --text-muted */
  --text-meta-size: 12px;
  --text-meta-weight: 400;
  --text-meta-color: var(--text-muted);

  /* Overdue label: 12px / 500 / --pink-500 */
  --text-overdue-size: 12px;
  --text-overdue-weight: 500;
  --text-overdue-color: var(--pink-500);

  /* Tab bar: 10px / 400 inactive, 500 active */
  --text-tab-size: 10px;
}

/* ─────────────────────────────────────────────────────────────
   SEMANTIC ELEMENT DEFAULTS
   ───────────────────────────────────────────────────────────── */
body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line-height);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: var(--text-hero-size);
  font-weight: var(--text-hero-weight);
  line-height: var(--text-hero-line-height);
  color: var(--text-hero-color);
  font-family: var(--font-sans);
}

h2 {
  font-size: var(--text-section-size);
  font-weight: var(--text-section-weight);
  line-height: var(--text-section-line-height);
  color: var(--text-section-color);
  font-family: var(--font-sans);
}

h3 {
  font-size: var(--text-card-title-size);
  font-weight: var(--text-card-title-weight);
  color: var(--text-card-title-color);
  font-family: var(--font-sans);
}

p {
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line-height);
  color: var(--text-body-color);
}

a {
  color: var(--text-link-color);
  font-weight: var(--text-link-weight);
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   COMPONENT PATTERNS
   Copy these as base styles; override as needed.
   ───────────────────────────────────────────────────────────── */

/* Primary CTA button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  border-radius: var(--radius-button);
  background: var(--purple-700);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity var(--micro-duration), transform var(--micro-duration);
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { opacity: 0.85; transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Secondary / text button */
.btn-secondary {
  background: transparent;
  border: none;
  color: var(--purple-700);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.btn-secondary:hover { opacity: 0.7; }

/* Floating card (hero / feature container) */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

/* Translucent chip / summary card */
.chip {
  background: var(--surface-summary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-chip);
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Form input */
.input {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--purple-300);
  background: var(--surface-summary);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--micro-duration);
}
.input:focus { border-color: var(--purple-700); }
.input::placeholder { color: var(--text-faint); }

/* Section label eyebrow */
.label-eyebrow {
  font-size: var(--text-label-size);
  font-weight: var(--text-label-weight);
  color: var(--text-label-color);
  text-transform: var(--text-label-transform);
  letter-spacing: var(--text-label-spacing);
}

/* Overdue pill */
.pill-overdue {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pink-bg);
  border: 1px solid var(--pink-border);
  color: var(--pink-500);
  font-size: 11px;
  font-weight: 500;
}

/* Icon background chip */
.icon-bg {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-icon);
  background: var(--purple-bg-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
