/* ============================================================
   OptiScape — marketing site
   Design language from Figma: deep green, lime accent,
   white surfaces, rounded cards, grotesque type.
   ============================================================ */

/* Self-hosted Inter (variable, latin) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green-950: #0A2C21;
  --green-900: #0E3B2C;
  --green-800: #12482F;
  --green-700: #175B3C;
  --green-600: #1E7049;
  --lime-500: #8FBE45;
  --lime-400: #A3CF5B;
  --lime-300: #C4E384;
  --lime-100: #E9F4D7;
  --lime-050: #F3F9E9;
  --cream: #F8F7F2;
  --white: #FFFFFF;
  --ink: #10241C;
  --muted: #5C6B62;
  --muted-dark: #A9BCB0;
  --line: #E5E8E2;
  --danger: #C4472F;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 2px 6px rgba(16, 36, 28, 0.05), 0 16px 40px rgba(16, 36, 28, 0.07);
  --shadow-pop: 0 4px 12px rgba(16, 36, 28, 0.08), 0 24px 64px rgba(16, 36, 28, 0.12);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

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

a { color: inherit; }

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

/* ------------------------------------------------------------
   App Store badge
   ------------------------------------------------------------ */
.badge {
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.badge img,
.badge svg {
  height: 44px;
  width: auto;
}
.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 36, 28, 0.18);
}
/* black badge needs a light plate on dark sections */
.badge-plate {
  display: inline-block;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 7px;
  line-height: 0;
}
.badge-plate .badge { border-radius: 6px; }
.badge-plate:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16, 36, 28, 0.07);
}
.site-header .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand .brand-logo {
  height: 48px;
  width: auto;
  display: block;
}
.site-header .brand-logo { height: 56px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a.nav-link {
  text-decoration: none;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
  transition: color 0.15s ease;
}
.main-nav a.nav-link:hover { color: var(--green-600); }
.header-cta .badge img,
.header-cta .badge svg { height: 40px; }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 85% -10%, var(--lime-100) 0%, rgba(233, 244, 215, 0) 60%),
    radial-gradient(700px 420px at -10% 110%, #EAF2EC 0%, rgba(234, 242, 236, 0) 55%),
    var(--white);
}
.hero .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding: 84px 0 92px;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--green-950);
}
.hero h1 .accent { color: var(--green-600); }
.hero .lead {
  margin: 0 0 12px;
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.65;
  color: var(--ink);
  max-width: 54ch;
}
.hero .sub {
  margin: 0 0 32px;
  font-size: clamp(15.5px, 1.4vw, 17.5px);
  color: var(--muted);
  max-width: 50ch;
}
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* Hero visual: yard transformation */
.yard-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.yard-step {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--lime-050);
  border: 1px solid rgba(23, 91, 60, 0.08);
  box-shadow: var(--shadow-card);
}
.yard-step svg { width: 100%; height: auto; }
.yard-step img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 236;
  object-fit: cover;
}
/* 3-card layout: two steps on top, the finished yard spans the full row below */
.yard-steps .yard-step:last-child { grid-column: 1 / -1; }
.yard-steps .yard-step:last-child img { aspect-ratio: 16 / 10; }
.yard-steps { position: relative; }

/* ------------------------------------------------------------
   Sections — shared
   ------------------------------------------------------------ */
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--green-950);
}
.section-head p {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Features
   ------------------------------------------------------------ */
.features { background: var(--white); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 30px 28px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
}
.feature-card .icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--lime-100);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.feature-card .icon-tile svg { width: 28px; height: 28px; }
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--green-950);
}
.feature-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
}
.privacy-note svg { width: 15px; height: 15px; flex: none; }

/* ------------------------------------------------------------
   Final CTA
   ------------------------------------------------------------ */
.final-cta { background: var(--white); padding: 48px 0 96px; }
.final-cta .band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(720px 380px at 78% -8%, rgba(163, 207, 91, 0.20) 0%, rgba(163, 207, 91, 0) 60%),
    radial-gradient(560px 360px at 8% 62%, rgba(30, 112, 73, 0.30) 0%, rgba(30, 112, 73, 0) 55%),
    linear-gradient(180deg, var(--green-900) 0%, #0B3123 62%, #0A2C21 100%);
  padding: 92px 56px 84px;
  text-align: center;
  color: var(--white);
}
.final-cta h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  max-width: 21ch;
  margin-inline: auto;
}
.final-cta p {
  margin: 0 0 32px;
  font-size: 17.5px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  margin-inline: auto;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(680px 300px at 88% -10%, rgba(163, 207, 91, 0.10) 0%, rgba(163, 207, 91, 0) 60%),
    radial-gradient(520px 300px at 5% 110%, rgba(30, 112, 73, 0.22) 0%, rgba(30, 112, 73, 0) 55%),
    linear-gradient(180deg, var(--green-950) 0%, #08231A 100%);
  color: var(--muted-dark);
  padding: 56px 0 40px;
}
.site-footer .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer .brand { color: var(--white); }
.footer-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.footer-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-dark);
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--lime-300); }
.site-footer .copy {
  margin: 24px 0 0;
  font-size: 13.5px;
  color: rgba(169, 188, 176, 0.75);
}

/* ------------------------------------------------------------
   Support page
   ------------------------------------------------------------ */
.page-hero {
  background:
    radial-gradient(700px 360px at 50% -20%, var(--lime-100) 0%, rgba(233, 244, 215, 0) 65%),
    var(--cream);
  padding: 72px 0 64px;
  text-align: center;
}
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--green-950);
}
.page-hero p {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 17px;
  color: var(--muted);
}

.support-section { padding: 16px 0 96px; background: var(--cream); }
.support-card {
  max-width: 620px;
  margin: -48px auto 0;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop);
  padding: 40px;
}
.support-form .field { margin-bottom: 20px; }
.support-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-950);
}
.support-form label .req { color: var(--danger); }
.support-form input,
.support-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.support-form textarea { min-height: 140px; resize: vertical; }
.support-form input::placeholder,
.support-form textarea::placeholder { color: #9AA8A0; }
.support-form input:focus,
.support-form textarea:focus {
  outline: none;
  border-color: var(--lime-500);
  box-shadow: 0 0 0 4px rgba(143, 190, 69, 0.18);
}
.support-form .field.error input,
.support-form .field.error textarea { border-color: var(--danger); }
.support-form .err-text {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--danger);
}
.support-form .field.error .err-text { display: block; }

.support-form .field.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 15px 30px;
  background: var(--green-900);
  color: var(--white);
  transition: background 0.15s ease, transform 0.15s ease;
  width: 100%;
}
.btn:hover { background: var(--green-700); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.success-box { text-align: center; display: none; }
.success-box .check {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--lime-100);
  display: grid;
  place-items: center;
}
.success-box .check svg { width: 34px; height: 34px; }
.success-box h2 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--green-950);
}
.success-box p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  max-width: 44ch;
  margin-inline: auto;
}
.success-box .again {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
  border-bottom: 1.5px solid var(--lime-400);
  padding-bottom: 2px;
}
.success-box .again:hover { color: var(--green-900); }

/* ------------------------------------------------------------
   Legal pages (Privacy / Terms)
   ------------------------------------------------------------ */
.legal-hero {
  background:
    radial-gradient(700px 340px at 50% -25%, rgba(163, 207, 91, 0.22) 0%, rgba(163, 207, 91, 0) 65%),
    var(--green-900);
  color: var(--white);
  padding: 64px 0 56px;
}
.legal-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.025em;
  font-weight: 800;
}
.legal-hero .meta {
  font-size: 14.5px;
  color: var(--muted-dark);
}
.legal-hero .meta b { color: var(--lime-300); font-weight: 600; }

.legal-body { padding: 64px 0 96px; background: var(--white); }

.legal-content {
  max-width: 900px;
  margin-inline: auto;
  font-size: 15.5px;
}
.legal-content > h2 {
  font-size: 22px;
  letter-spacing: -0.015em;
  font-weight: 750;
  color: var(--green-950);
  margin: 44px 0 14px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.legal-content > h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 14px; color: #2A3B33; }
.legal-content ul, .legal-content ol { margin: 0 0 16px; padding-left: 22px; }
.legal-content li { margin: 7px 0; color: #2A3B33; }
.legal-content strong { color: var(--green-950); }
.legal-content a { color: var(--green-700); }

.tldr {
  background: var(--lime-050);
  border: 1px solid var(--lime-300);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin: 0 0 12px;
}
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin: 9px 0; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .hero .inner { grid-template-columns: 1fr; gap: 44px; padding: 60px 0 72px; }
  .feature-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .container { width: min(var(--container), 100% - 36px); }
  .main-nav a.nav-link { display: none; }
  .brand .brand-logo { height: 38px; }
  .site-header .brand-logo { height: 44px; }
  .header-cta .badge img, .header-cta .badge svg { height: 36px; }
  .section { padding: 64px 0; }
  .final-cta { padding-top: 32px; }
  .final-cta .band { padding: 64px 24px 60px; }
  .support-card { padding: 28px 22px; }
  .yard-steps { gap: 10px; }
}

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