/* ============================================================
   RoundFair — marketing site styles
   Plain CSS, no build step. Light & dark via custom properties.
   ============================================================ */

:root {
  --accent: #2bb491;
  --accent-strong: #1f9679;
  --accent-soft: rgba(43, 180, 145, 0.12);
  --accent-softer: rgba(43, 180, 145, 0.07);

  --bg: #f4f6f8;
  --bg-elevated: #ffffff;
  --bg-strip: #0e2a3a;
  --text: #22303c;
  --text-muted: #5b6b78;
  --text-faint: #8a97a3;
  --border: rgba(34, 48, 60, 0.08);
  --shadow: 0 2px 6px rgba(20, 40, 55, 0.04), 0 12px 32px rgba(20, 40, 55, 0.08);
  --shadow-lift: 0 4px 10px rgba(20, 40, 55, 0.06), 0 20px 44px rgba(20, 40, 55, 0.12);
  --nav-bg: rgba(244, 246, 248, 0.82);
  --phone-frame: #10202c;

  --radius: 20px;
  --radius-sm: 14px;
  --max-width: 1080px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --accent: #34c9a3;
  --accent-strong: #2bb491;
  --accent-soft: rgba(52, 201, 163, 0.16);
  --accent-softer: rgba(52, 201, 163, 0.08);

  --bg: #0e1519;
  --bg-elevated: #18222a;
  --bg-strip: #0a1c28;
  --text: #e9eff2;
  --text-muted: #9fb0bb;
  --text-faint: #6d7d88;
  --border: rgba(233, 239, 242, 0.09);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.3), 0 20px 44px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(14, 21, 25, 0.82);
  --phone-frame: #2a3942;

  color-scheme: dark;
}

/* ---------- Base ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.theme-toggle:hover {
  transform: scale(1.08);
}

@media (max-width: 640px) {
  .nav-links a:not(.theme-toggle) {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-copy .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 32px;
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 20px 10px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.appstore-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.appstore-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.appstore-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.appstore-badge .badge-small {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.appstore-badge .badge-big {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- iPhone mockup ---------- */

.hero-phone {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone {
  width: 290px;
  border-radius: 46px;
  background: var(--phone-frame);
  padding: 12px;
  box-shadow: var(--shadow-lift);
  position: relative;
  transform: rotate(2deg);
  z-index: 1;
}

.phone-back {
  position: absolute;
  width: 250px;
  top: 44px;
  right: calc(50% + 60px);
  transform: rotate(-6deg);
  z-index: 0;
  opacity: 0.9;
}

.phone-screen {
  border-radius: 36px;
  background: var(--bg-elevated);
  overflow: hidden;
  aspect-ratio: 640 / 1390;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  position: relative;
}

.step-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-soft);
  line-height: 1;
}

.icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.icon-bubble svg {
  width: 26px;
  height: 26px;
}

.step-card h3,
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.step-card p,
.feature-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- Features ---------- */

.features {
  background: linear-gradient(180deg, transparent, var(--accent-softer) 30%, transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* ---------- Languages strip ---------- */

.languages {
  background: var(--bg-strip);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}

.languages h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.85);
}

.language-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}

.language-chips li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(225deg);
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 14px 0;
}

.footer .copyright {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Privacy page ---------- */

.privacy-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.privacy-page h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.privacy-page .updated {
  color: var(--text-faint);
  margin-bottom: 32px;
}

.privacy-page .privacy-hero {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 40px;
}

.privacy-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
}

.privacy-page p,
.privacy-page li {
  color: var(--text-muted);
}

.privacy-page ul {
  padding-left: 22px;
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-weight: 500;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .steps,
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .phone-back {
    display: none;
  }
}

@media (max-width: 820px) {
  .hero {
    padding: 56px 0 64px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 56px;
  }
  .hero-copy .app-icon {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .phone {
    transform: none;
  }
}

@media (max-width: 600px) {
  section {
    padding: 56px 0;
  }
  .steps,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
