/* MotWise marketing site. Tokens mirror lib/theme/app_colors.dart and
   docs/UI_GUIDELINES.md ("Studio" design system) - keep them in step. */

@font-face {
  font-family: "Merriweather";
  src: url("assets/Merriweather-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("assets/Oxanium-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("assets/Oxanium-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --background: #fdfbf7;
  --surface: #f8f4ee;
  --card: #ffffff;
  --text: #4a3b33;
  --text-secondary: #78716c;
  --accent: #b45309;
  --accent-dark: #8f3f08;
  --accent-tint: #fceee0;
  --accent-2: #e4c090;
  --border: #e4d9bc;
  --shadow: 0 4px 14px rgba(74, 59, 51, 0.18);
  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-pill: 999px;
  --max: 960px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Oxanium", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); margin-top: 2em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; }

p { margin: 0 0 1em; }
ul { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: var(--radius-small); }
.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 56px 0 48px; }
.hero .wrap {
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero p.lead { font-size: 1.15rem; color: var(--text-secondary); max-width: 34em; }
.hero-art img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius-medium);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-small);
  background: var(--accent);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); color: #ffffff; }
.btn[aria-disabled="true"] {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: default;
}

/* Sections and cards */
section { padding: 24px 0 8px; }
section h2:first-child { margin-top: 0; }

.grid { display: grid; gap: 16px; margin-top: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--text-secondary); }

/* Legal pages */
.legal { padding: 40px 0 24px; max-width: 720px; }
.legal .updated { color: var(--text-secondary); font-size: 0.95rem; }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 16px 20px;
  margin: 1.2em 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }

@media (min-width: 720px) {
  .hero .wrap { grid-template-columns: 1.4fr 1fr; }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Landing page ---------- */

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(253, 251, 247, 0.92); backdrop-filter: blur(8px); }

.hero {
  padding: 48px 0 56px;
  background:
    radial-gradient(60% 70% at 85% 20%, var(--accent-tint) 0%, rgba(252, 238, 224, 0) 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(228, 192, 144, 0.28) 0%, rgba(228, 192, 144, 0) 70%);
}
.hero .wrap { gap: 40px; }
.hero h1 { margin-bottom: 0.5em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.secondary:hover { background: var(--accent-tint); color: var(--accent-dark); }
.hero-note { margin: 14px 0 0; font-size: 0.9rem; color: var(--text-secondary); }

/* Phone frame */
.phone {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 270px;
  padding: 9px;
  background: #2b211c;
  border-radius: 38px;
  box-shadow: 0 24px 48px rgba(74, 59, 51, 0.28), 0 4px 10px rgba(74, 59, 51, 0.18);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
  background: var(--background);
}
.phone::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #2b211c;
  z-index: 1;
}

.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 420px;
}
.hero-phones .phone.back {
  position: absolute;
  max-width: 190px;
  top: 40px;
  left: 4%;
  transform: rotate(-6deg);
}
.hero-phones .phone.front {
  position: relative;
  z-index: 1;
  max-width: 240px;
  margin-left: auto;
  margin-right: 4%;
  transform: rotate(3deg);
}

/* Facts strip */
.facts { padding: 8px 0 0; }
.facts .wrap {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.fact {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 16px;
  text-align: center;
}
.fact strong {
  display: block;
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1.2;
}
.fact span { font-size: 0.9rem; color: var(--text-secondary); }

/* Feature rows */
.feature { padding: 56px 0 8px; }
.feature .wrap { display: grid; gap: 28px; align-items: center; justify-items: center; }
.feature .copy { width: 100%; }
.feature .eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.feature h2 { margin-top: 0; }
.feature p { color: var(--text-secondary); max-width: 32em; }
.feature ul { color: var(--text-secondary); max-width: 32em; padding-left: 1.2em; }
.feature .pair { display: flex; gap: 16px; justify-content: center; }
.feature .pair .phone { max-width: 200px; }
.feature .pair .phone:last-child { margin-top: 36px; }

/* Steps */
.steps { padding-top: 64px; }
.steps h2 { margin-top: 0; text-align: center; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Closing call to action */
.cta { padding-top: 64px; }
.cta-box {
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-medium);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-box h2 { margin: 0 0 0.4em; color: #ffffff; }
.cta-box p { margin: 0 auto 20px; max-width: 32em; color: rgba(255, 255, 255, 0.9); }
.cta-box .btn { background: #ffffff; color: var(--accent-dark); }
.cta-box .btn:hover { background: var(--accent-tint); }

/* Scroll reveal. Content stays visible without JS or with reduced motion. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (min-width: 720px) {
  .hero { padding: 72px 0 80px; }
  .hero-phones { min-height: 520px; }
  .hero .wrap { grid-template-columns: 1.15fr 1fr; }
  .hero-phones .phone.back { max-width: 210px; top: 56px; left: 0; }
  .hero-phones .phone.front { max-width: 260px; margin-right: 0; }
  .facts .wrap { grid-template-columns: repeat(4, 1fr); }
  .feature .wrap { grid-template-columns: 1fr 1fr; gap: 56px; }
  .feature.flip .copy { order: 2; }
  .feature .pair .phone { max-width: 230px; }
  .cta-box { padding: 56px 40px; }
}
