/* ============================================================
   CleanSync Premium — Brand stylesheet
   Palette from docs/frontend/client-design-system.md
   ============================================================ */

:root {
  --green-900: #0d3b10;
  --green-800: #14471a;
  --green-700: #1b5e20;
  --green-600: #2e7d32;
  --green-50: #eef6ee;
  --blue-600: #1e88e5;
  --blue-800: #1565c0;
  --blue-50: #e8f2fc;
  --cyan: #00acc1;
  --gold: #ffb300;
  --gold-dark: #b7791f;
  --ink: #212121;
  --muted: #5f6b63;
  --bg: #f7f9f7;
  --surface: #ffffff;
  --line: #e3e8e3;
  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-sm: 0 1px 2px rgba(13, 59, 16, 0.06), 0 2px 8px rgba(13, 59, 16, 0.06);
  --shadow-md: 0 4px 12px rgba(13, 59, 16, 0.08), 0 12px 32px rgba(13, 59, 16, 0.1);
  --shadow-lg: 0 12px 28px rgba(13, 59, 16, 0.14), 0 28px 64px rgba(13, 59, 16, 0.16);
  --font: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--green-900);
  box-shadow: 0 6px 18px rgba(255, 179, 0, 0.35);
}
.btn-primary:hover { background: #ffc233; box-shadow: 0 10px 24px rgba(255, 179, 0, 0.45); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.6); }

.btn-green {
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 6px 18px rgba(27, 94, 32, 0.28);
}
.btn-green:hover { background: var(--green-600); }

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-nav .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--green-900);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .brand-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: #fff7e0;
  border: 1px solid #f3dfa8;
  border-radius: 999px;
  padding: 3px 8px;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--green-700); text-decoration: none; }
.nav-links .btn { padding: 10px 18px; font-size: 0.9rem; }

@media (max-width: 860px) {
  .nav-links a:not(.btn) { display: none; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(0, 172, 193, 0.25), transparent 60%),
    linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-600) 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 96px 0 120px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe9b0;
  background: rgba(255, 179, 0, 0.12);
  border: 1px solid rgba(255, 179, 0, 0.35);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--gold); }

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin: 0 0 34px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-note {
  margin-top: 26px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Decorative leaves */
.hero-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-leaves svg { position: absolute; opacity: 0.5; }

/* Hero phones */
.hero-phones {
  position: relative;
  height: 560px;
}
.hero-phones .phone {
  position: absolute;
  width: 240px;
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s ease;
}
.hero-phones .phone-1 { left: 50%; top: 0; transform: translateX(-50%) rotate(0deg); z-index: 3; }
.hero-phones .phone-2 { left: 4%; top: 90px; transform: rotate(-8deg); z-index: 2; width: 210px; opacity: 0.95; }
.hero-phones .phone-3 { right: 4%; top: 90px; transform: rotate(8deg); z-index: 2; width: 210px; opacity: 0.95; }
.hero-phones .phone:hover { transform: translateY(-10px); }
.hero-phones .phone-2:hover { transform: rotate(-8deg) translateY(-10px); }
.hero-phones .phone-3:hover { transform: rotate(8deg) translateY(-10px); }

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; padding: 72px 0 80px; }
  .hero-phones { height: 480px; max-width: 560px; margin-inline: auto; width: 100%; }
}

@media (max-width: 560px) {
  .hero-phones { height: 420px; }
  .hero-phones .phone { width: 190px; }
  .hero-phones .phone-2, .hero-phones .phone-3 { width: 160px; top: 110px; }
}

/* Single-phone hero (client-focused landing) */
.hero-phones.single {
  display: flex;
  justify-content: center;
  height: auto;
}
.hero-phones.single .phone {
  position: static;
  width: 280px;
  transform: none;
}
.hero-phones.single .phone:hover { transform: translateY(-10px); }

@media (max-width: 560px) {
  .hero-phones.single .phone { width: 230px; }
}

/* ---------- Stats strip ---------- */

.stats {
  background: var(--green-900);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 34px 0;
}
.stat { text-align: center; }
.stat .stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.stat .stat-label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); }

@media (max-width: 760px) {
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--surface); }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; color: var(--green-900); }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- Steps (how it works) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green-600), var(--green-900));
  margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; color: var(--green-900); }
.step p { color: var(--muted); margin: 0; font-size: 0.97rem; }

@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Feature grid ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-700);
  margin-bottom: 18px;
}
.feature h3 { font-size: 1.12rem; color: var(--ink); }
.feature p { color: var(--muted); font-size: 0.95rem; margin: 0; }

@media (max-width: 960px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }

/* ---------- Personas ---------- */

.persona {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
}
.persona + .persona { border-top: 1px solid var(--line); }
.persona:nth-child(even) .persona-media { order: 2; }

.persona-media { text-align: center; }
.persona-media img {
  width: 250px;
  margin-inline: auto;
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
}

.persona-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.persona-badge-green { background: var(--green-50); color: var(--green-700); border: 1px solid #cfe4cf; }
.persona-badge-blue { background: var(--blue-50); color: var(--blue-800); border: 1px solid #c8e0f7; }

.persona h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--green-900); font-weight: 800; }
.persona p.persona-lead { color: var(--muted); font-size: 1.03rem; }

.persona-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.persona-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.98rem;
}
.persona-list .check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.check-green { background: var(--green-50); color: var(--green-700); }
.check-blue { background: var(--blue-50); color: var(--blue-800); }

@media (max-width: 900px) {
  .persona { grid-template-columns: 1fr; gap: 36px; }
  .persona:nth-child(even) .persona-media { order: 0; }
}

/* ---------- Partner / pricing ---------- */

.partner {
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(255, 179, 0, 0.12), transparent 55%),
    linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff;
}
.partner .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.partner h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: #fff; font-weight: 800; }
.partner p { color: rgba(255, 255, 255, 0.8); }
.partner-list { list-style: none; padding: 0; margin: 26px 0 34px; display: grid; gap: 14px; }
.partner-list li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.92); }
.partner-list .check { background: rgba(255, 179, 0, 0.16); color: var(--gold); }

.commission-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(6px);
}
.commission-card .rate {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1;
}
.commission-card .rate-label { color: rgba(255, 255, 255, 0.75); margin: 10px 0 24px; }
.commission-example {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 22px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}
.commission-example strong { color: #fff; }

@media (max-width: 900px) { .partner .container { grid-template-columns: 1fr; } }

/* ---------- Compliance ---------- */

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.compliance-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.compliance-card h3 { font-size: 1.08rem; color: var(--green-900); display: flex; align-items: center; gap: 10px; }
.compliance-card p { color: var(--muted); font-size: 0.94rem; margin: 0; }

@media (max-width: 860px) { .compliance-grid { grid-template-columns: 1fr; } }

/* ---------- Apps ---------- */

.apps .container { text-align: center; }
.apps-phones {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 48px 0;
  flex-wrap: wrap;
}
.apps-phones figure { margin: 0; }
.apps-phones img {
  width: 190px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
}
.apps-phones figcaption {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.apps-phones figcaption span { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); }

.store-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 22px;
  opacity: 0.9;
}
.store-badge:hover { text-decoration: none; opacity: 1; }
.store-badge .small { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; display: block; line-height: 1.2; }
.store-badge .big { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.coming-soon {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
  background: #fff7e0;
  border: 1px solid #f3dfa8;
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255, 255, 255, 0.8); max-width: 36rem; margin: 0 auto 30px; }

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

.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 36px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: #fff; }
.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-disclaimer p { margin: 0 0 8px; }

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */

.legal-body { background: var(--bg); }
.legal-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.legal-main h1 { color: var(--green-900); font-size: 2rem; margin-top: 0; }
.legal-main h2 {
  color: var(--green-900);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-top: 44px;
  font-size: 1.35rem;
}
.legal-main h3 { color: var(--ink); margin-top: 28px; font-size: 1.08rem; }
.legal-main .notice {
  border-left: 4px solid var(--gold-dark);
  background: #fff7e6;
  padding: 14px 18px;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
}
.legal-main .notice-blue {
  border-left: 4px solid var(--blue-600);
  background: var(--blue-50);
  padding: 14px 18px;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
}
.legal-main a { color: var(--green-600); }
.legal-main table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.94rem; }
.legal-main th, .legal-main td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.legal-main th { background: var(--green-50); }
.legal-main ul, .legal-main ol { padding-left: 24px; }
.legal-main hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
