@import url("./fonts.css");

/* =============================================================================
   Vrăjeală — design system
   Colors are the app's SwiftUI tokens, translated 1:1 to CSS oklch() so the
   web matches the app exactly. The 5-tone spectrum sweep is the signature.
   ========================================================================== */

:root {
  /* — Plum-tinted near-black surface family (hue 318) — */
  --bg:        oklch(0.16  0.018 318);
  --sunken:    oklch(0.135 0.016 318);
  --surface:   oklch(0.205 0.022 318);
  --elevated:  oklch(0.25  0.028 318);

  /* — Text — */
  --text:      oklch(0.97 0.008 80);
  --text-2:    oklch(0.74 0.014 315);
  --text-muted:oklch(0.57 0.016 315);

  /* — Accent (rose-red) — */
  --accent:        oklch(0.68 0.205 12);
  --accent-pressed:oklch(0.60 0.195 12);
  --on-accent:     oklch(0.98 0.010 60);

  /* — The 5 tones (Funny → Flirty → Charismatic → Spicy → Smooth).
       DERIVED warm spectrum across the accent hues — swap these 5 values for the
       app's exact Tone.base oklch() and the whole site updates. — */
  --tone-funny:       oklch(0.80 0.155 70);   /* gold      */
  --tone-flirty:      oklch(0.74 0.180 40);   /* coral     */
  --tone-charismatic: oklch(0.68 0.205 18);   /* rose-red  */
  --tone-spicy:       oklch(0.64 0.220 8);    /* crimson   */
  --tone-smooth:      oklch(0.62 0.175 325);  /* plum-purple — resolves into the app's plum hue */

  /* — Signature sweep. App angles: hero 105°, brand mark 135° (CSS angle =
       clockwise from "to top", same convention the app uses). — */
  --spectrum-105: linear-gradient(105deg,
      var(--tone-funny), var(--tone-flirty), var(--tone-charismatic),
      var(--tone-spicy), var(--tone-smooth));
  --spectrum-135: linear-gradient(135deg,
      var(--tone-funny), var(--tone-flirty), var(--tone-charismatic),
      var(--tone-spicy), var(--tone-smooth));

  /* — Premium (Vrăjeală+) gradient, 135° amber → red — */
  --premium: linear-gradient(135deg, oklch(0.78 0.160 45), oklch(0.67 0.205 28));

  /* — Hairlines & shadows (warm white at low alpha) — */
  --line:        oklch(0.97 0.008 80 / 0.10);
  --line-strong: oklch(0.97 0.008 80 / 0.16);
  --shadow:      0 1px 2px oklch(0 0 0 / 0.4), 0 12px 40px -12px oklch(0 0 0 / 0.55);
  --shadow-lift: 0 2px 4px oklch(0 0 0 / 0.4), 0 28px 70px -24px oklch(0 0 0 / 0.65);

  --radius:   18px;
  --radius-sm:12px;
  --maxw:     1120px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* — 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; } }

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.125rem);
  line-height: 1.65;
  color: var(--text-2);
  background-color: var(--bg);
  /* ambient plum glow + a faint spectrum bloom behind the top of the page */
  background-image:
    radial-gradient(120% 90% at 50% -10%, oklch(0.30 0.05 350 / 0.30), transparent 60%),
    radial-gradient(80% 60% at 85% 0%,    oklch(0.55 0.13 45  / 0.10), transparent 55%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* — Headings — */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 540;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

/* — Layout primitives — */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-muted);
}

/* — Spectrum helpers — */
.spectrum-text {
  background: var(--spectrum-105);
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.spectrum-rule {
  height: 3px; border: 0; border-radius: 99px;
  background: var(--spectrum-105);
}

/* =========================== Header / nav ============================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.16 0.018 318 / 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.85rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  width: 40px; height: 40px; flex: none; display: block;
  border-radius: 22%;  /* matches the icon's baked iOS squircle so the rim hugs the tile */
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.12), 0 5px 14px -6px oklch(0 0 0 / 0.6);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.3rem; letter-spacing: -0.018em;
  color: var(--text); line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a.nav-link {
  font-size: 0.95rem; font-weight: 500; color: var(--text-2);
  transition: color 0.15s ease;
}
.nav-links a.nav-link:hover { color: var(--text); }

/* =========================== Buttons ================================== */
.btn { font-family: var(--font-body); cursor: pointer; border: 0; }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.2rem 0.7rem 1.05rem;
  background: var(--text); color: oklch(0.16 0.018 318);
  border-radius: 14px; font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.appstore:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.appstore:active { transform: translateY(0); }
.appstore svg { width: 26px; height: 26px; fill: oklch(0.16 0.018 318); }
.appstore .as-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore .as-small { font-size: 0.64rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.appstore .as-big { font-size: 1.18rem; font-weight: 650; letter-spacing: -0.01em; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.1rem; border-radius: 12px;
  color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); font-weight: 550; font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover { background: oklch(0.97 0.008 80 / 0.06); border-color: var(--text-muted); }

/* =========================== Hero ===================================== */
.hero { position: relative; padding-block: clamp(3.5rem, 11vw, 8rem) clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

/* the product, shown: three toned replies */
.hero-preview {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px); padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow-lift);
}
.hero-preview::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--spectrum-105); }
.preview-head { display: flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; font-weight: 600; color: var(--text); }
.preview-head .swatch { width: 11px; height: 11px; border-radius: 99px; background: var(--tone-flirty); box-shadow: 0 0 12px -1px var(--tone-flirty); }
.preview-head .preview-count { margin-left: auto; color: var(--text-muted); font-weight: 500; font-size: 0.82rem; }
.preview-list { margin-top: 1.05rem; display: grid; gap: 0.6rem; padding: 0; }
.preview-list li {
  list-style: none; padding: 0.78rem 0.9rem; border-radius: 12px;
  background: oklch(0.97 0.008 80 / 0.035); border: 1px solid var(--line);
  color: var(--text); font-size: 0.98rem; line-height: 1.45;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.preview-list li:hover { border-color: var(--line-strong); transform: translateX(2px); }
.preview-foot { margin-top: 1.05rem; color: var(--text-muted); font-size: 0.82rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-preview { max-width: 480px; }
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; }
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); }
.hero h1 {
  font-size: clamp(2.85rem, 8.5vw, 6.1rem);
  font-weight: 560; line-height: 1.0; letter-spacing: -0.028em;
  max-width: 16ch;
}
.hero h1 .swept {
  /* the brand word wears the 105° sweep; a slow shimmer brings it to life */
  background: var(--spectrum-105); background-size: 220% 100%;
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  font-style: italic; font-weight: 500;
}
.hero .lead {
  margin-top: 1.6rem; max-width: 46ch;
  font-size: clamp(1.12rem, 0.95rem + 0.9vw, 1.42rem);
  line-height: 1.55; color: var(--text-2);
}
.hero .lead em { color: var(--text); font-style: italic; }
.hero-cta { margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero-fine { margin-top: 1.1rem; font-size: 0.92rem; color: var(--text-muted); }
.hero-fine .sep { opacity: 0.4; margin-inline: 0.55rem; }

/* =========================== Tones strip ============================== */
.tones { border-block: 1px solid var(--line); background: var(--sunken); }
.tones .container { padding-block: clamp(2.5rem, 6vw, 4rem); }
.tones-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1rem; margin-bottom: 1.6rem; }
.tones-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.tones-head p { color: var(--text-muted); font-size: 0.98rem; }
.tones-bar { height: 10px; border-radius: 99px; background: var(--spectrum-105);
  box-shadow: 0 0 36px -6px oklch(0.65 0.2 20 / 0.5); }
.tone-row {
  margin-top: 1.4rem; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(5, 1fr);
}
.tone {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.85rem; border-radius: var(--radius-sm);
  background: oklch(0.97 0.008 80 / 0.03); border: 1px solid var(--line);
}
.tone .swatch { width: 13px; height: 13px; border-radius: 99px; flex: none;
  box-shadow: 0 0 14px -2px currentColor; }
.tone b { font-family: var(--font-body); color: var(--text); font-weight: 600; font-size: 0.98rem; }
.tone span { display: block; color: var(--text-muted); font-size: 0.82rem; line-height: 1.3; }
.t-funny       { color: var(--tone-funny); }
.t-flirty      { color: var(--tone-flirty); }
.t-charismatic { color: var(--tone-charismatic); }
.t-spicy       { color: var(--tone-spicy); }
.t-smooth      { color: var(--tone-smooth); }
.tone .swatch.t-funny       { background: var(--tone-funny); }
.tone .swatch.t-flirty      { background: var(--tone-flirty); }
.tone .swatch.t-charismatic { background: var(--tone-charismatic); }
.tone .swatch.t-spicy       { background: var(--tone-spicy); }
.tone .swatch.t-smooth      { background: var(--tone-smooth); }

/* =========================== Modes grid ============================== */
.section-head { max-width: 52ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-top: 0.7rem; }
.section-head p { margin-top: 1rem; color: var(--text-2); font-size: 1.08rem; }

.modes { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, 1fr); }
.mode {
  position: relative; overflow: hidden;
  padding: 1.7rem 1.6rem 1.8rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.mode::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--spectrum-105); opacity: 0.65; transition: opacity 0.2s ease;
}
.mode:hover { transform: translateY(-4px); background: var(--elevated); border-color: var(--line-strong); }
.mode:hover::before { opacity: 1; }
.mode .mode-ix { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-muted); }
.mode h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.28rem;
  letter-spacing: -0.01em; color: var(--text); margin-top: 0.5rem; }
.mode p { margin-top: 0.6rem; color: var(--text-2); font-size: 1.0rem; line-height: 1.55; }

/* =========================== Steps =================================== */
.steps { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { padding-top: 1.4rem; border-top: 1px solid var(--line-strong); }
.step .step-n {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 1.5rem;
  background: var(--spectrum-105); background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.step h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.12rem; color: var(--text); margin-top: 0.5rem; }
.step p { margin-top: 0.4rem; color: var(--text-2); font-size: 0.98rem; }

/* =========================== Premium ================================= */
.premium-wrap { padding-block: clamp(3rem, 7vw, 5rem); }
.premium {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 5vw, 3rem);
  background: var(--surface); border: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.premium::after {
  content: ""; position: absolute; right: -10%; top: -60%;
  width: 60%; height: 220%; transform: rotate(18deg);
  background: var(--premium); opacity: 0.16; filter: blur(40px);
  pointer-events: none;
}
.premium .p-tag {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; border-radius: 99px;
  background: var(--premium); color: oklch(0.18 0.02 30); margin-bottom: 0.9rem;
}
.premium h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.premium p { margin-top: 0.7rem; color: var(--text-2); max-width: 44ch; }
.premium .p-body { position: relative; z-index: 1; }

/* =========================== Footer ================================== */
.site-footer { border-top: 1px solid var(--line); background: var(--sunken); }
.site-footer .container { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-brand .brand-name { font-size: 1.2rem; }
.footer-brand p { margin-top: 0.6rem; color: var(--text-muted); font-size: 0.92rem; max-width: 34ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; }
.footer-links a { color: var(--text-2); font-size: 0.95rem; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text); }
.footer-legal { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: space-between;
  color: var(--text-muted); font-size: 0.85rem; }

/* =========================== Legal pages ============================= */
.legal-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 99px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.4rem 0.85rem; background: transparent; color: var(--text-muted); border: 0; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-toggle button[aria-pressed="true"] { background: var(--text); color: oklch(0.16 0.018 318); }

.legal-hero { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2.2rem); }
.legal-hero .eyebrow { margin-bottom: 0.9rem; }
.legal-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
.legal-hero .updated { margin-top: 1rem; color: var(--text-muted); font-size: 0.92rem; }
.legal-hero .spectrum-rule { margin-top: 1.6rem; max-width: 120px; }

.prose { max-width: 72ch; padding-bottom: clamp(3rem, 8vw, 6rem); }
.prose h2 {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 540;
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--text);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.08rem; color: var(--text); margin-top: 1.6rem; }
.prose p, .prose li { color: var(--text-2); font-size: 1.02rem; line-height: 1.7; }
.prose p { margin-top: 0.9rem; }
.prose ul { margin-top: 0.9rem; padding-left: 1.1rem; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-muted);
  text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose .lead { font-size: 1.12rem; color: var(--text); margin-top: 0; }
.callout {
  margin-top: 1.4rem; padding: 1.1rem 1.25rem; border-radius: var(--radius-sm);
  background: oklch(0.97 0.008 80 / 0.04); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
}
.callout p { margin-top: 0.5rem; }
.callout p:first-child { margin-top: 0; }

/* language visibility — RO default; toggling <html data-lang> swaps it */
[data-lang="ro"] [lang="en"] { display: none; }
[data-lang="en"] [lang="ro"] { display: none; }

/* =========================== A11y / focus =========================== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--text); color: oklch(0.16 0.018 318); padding: 0.6rem 1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* =========================== Motion ================================= */
.reveal { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.14s; }
  .reveal-3 { animation-delay: 0.23s; }
  .reveal-4 { animation-delay: 0.32s; }
  .hero h1 .swept { animation: shimmer 16s ease-in-out infinite alternate; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================== Responsive ============================= */
@media (max-width: 760px) {
  .modes { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tone-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 1rem; }
  .nav-links .nav-link { display: none; }      /* keep only the CTA on small screens */
}
@media (max-width: 420px) {
  .tone-row { grid-template-columns: 1fr; }
}
