:root {
  --font-display: Spline Sans, Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  --text: #16201a;
  --text-secondary: #687166;
  --background: #f7f8f4;
  --surface: #e9ece4;
  --surface-strong: #d6ddce;
  --line: #d8ded1;
  --forest: #6d8b5b;
  --forest-dark: #4f6f52;
  --sunset: #d99464;
  --water: #5d8aa8;
  --white: #ffffff;
  --header-background: rgba(247, 248, 244, 0.9);
  --image-background: #f9faf6;
  --primary-background: #4f6f52;
  --button-hover: #3f5d43;
  --focus-ring: rgba(109, 139, 91, 0.18);
  --shadow: 0 18px 50px rgba(22, 32, 26, 0.12);
  --radius: 8px;
  --content: 1120px;
}

:root[data-theme='dark'] {
  --text: #eef2eb;
  --text-secondary: #aeb9ad;
  --background: #141a16;
  --surface: #202822;
  --surface-strong: #2b362d;
  --line: #344038;
  --forest: #91ad7f;
  --forest-dark: #a7c795;
  --sunset: #e5a578;
  --water: #83aac4;
  --white: #ffffff;
  --header-background: rgba(20, 26, 22, 0.9);
  --image-background: #202822;
  --primary-background: #59774f;
  --button-hover: #6f915e;
  --focus-ring: rgba(145, 173, 127, 0.24);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--background);
  font-family: var(--font-display);
  line-height: 1.5;
  transition: color 180ms ease, background-color 180ms ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--forest-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 16px 0;
  background: var(--header-background);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  border-radius: 8px;
  object-fit: cover;
}

.nav,
.site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a[aria-current='page'] {
  color: var(--text);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  color: var(--forest-dark);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-toggle svg {
  position: absolute;
  width: 19px;
  height: 19px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.theme-toggle .icon-sun,
:root[data-theme='dark'] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-toggle .icon-moon,
:root[data-theme='dark'] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-30deg) scale(0.65);
}

.theme-toggle--floating {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr);
  gap: 56px;
  align-items: center;
  width: min(100% - 32px, var(--content));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 36px 0 72px;
}

.hero-copy,
.signup-copy,
.preview-copy,
.section-heading {
  display: grid;
  gap: 14px;
  align-content: start;
}

.eyebrow {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.22;
}

.lead {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--primary-background);
}

.button.primary:hover {
  color: var(--white);
  background: var(--button-hover);
}

.button.secondary {
  color: var(--text);
  background: var(--surface);
}

.button.full {
  width: 100%;
}

.hero-visual {
  justify-self: center;
  width: min(100%, 390px);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--image-background);
  box-shadow: var(--shadow);
}

.band,
.preview-section,
.signup-section,
.legal-page {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 84px 0;
}

.band {
  display: grid;
  gap: 28px;
  border-top: 1px solid var(--line);
}

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

.feature-card {
  display: grid;
  min-height: 168px;
  align-content: space-between;
  gap: 22px;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.feature-card p,
.preview-copy p,
.signup-copy p,
.legal-content p,
.not-found p {
  color: var(--text-secondary);
}

.accent {
  width: 42px;
  height: 6px;
  border-radius: 3px;
}

.accent.sunset {
  background: var(--sunset);
}

.accent.forest {
  background: var(--forest);
}

.accent.water {
  background: var(--water);
}

.preview-section {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 48px;
  align-items: center;
}

.screen-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.screen-pair img {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--image-background);
  box-shadow: 0 12px 32px rgba(22, 32, 26, 0.1);
}

.screen-pair img:nth-child(2) {
  margin-top: 46px;
}

.screen-pair img:nth-child(3) {
  margin-top: 22px;
}

.signup-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.signup-form {
  display: grid;
  gap: 14px;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.cr-roavyn-form .cr-text {
  display: grid;
  gap: 6px;
}

.cr-roavyn-form .cr-text p,
.cr-roavyn-form .cr-consent-required {
  color: var(--text-secondary);
}

.cr-nope {
  display: none !important;
}

.field {
  display: grid;
  gap: 7px;
}

label,
legend {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 800;
}

label.required::after {
  content: ' *';
}

input[type='text'],
input[type='email'] {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--text);
  background: var(--background);
  font: inherit;
}

input:focus {
  border-color: var(--forest);
  outline: 3px solid var(--focus-ring);
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.choice-group legend {
  width: 100%;
  margin-bottom: 2px;
}

.choice,
.consent,
.cr-consent-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}

.choice {
  align-items: center;
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--surface-strong);
}

.consent {
  font-size: 0.86rem;
  font-weight: 600;
}

.cr-consent-wrapper {
  align-items: flex-start;
}

.cr-consent-wrapper input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.cr-consent-required {
  display: block;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.cr-consent-required::after {
  content: ' *';
}

.consent a,
.cr-consent-required a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-note,
.muted {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-note.is-warning {
  color: #8a4b20;
}

.form-note.is-success {
  color: var(--forest-dark);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-footer > span:first-child {
  color: var(--text);
  font-weight: 800;
}

.legal-page {
  max-width: 850px;
}

.legal-content {
  display: grid;
  gap: 28px;
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}

.legal-content section {
  display: grid;
  gap: 8px;
}

.legal-content h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.legal-content h2 {
  font-size: 1.22rem;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: start;
  gap: 14px;
  width: min(100% - 32px, 680px);
  margin: 0 auto;
}

.not-found h1 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
}

@media (max-width: 840px) {
  .site-header {
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav {
    margin-left: auto;
  }

  .hero,
  .preview-section,
  .signup-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 28px;
  }

  .hero-visual {
    width: min(100%, 340px);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .screen-pair {
    max-width: 560px;
  }
}

@media (max-width: 560px) {
  .site-footer,
  .site-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    width: calc(100% - 24px);
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    margin-left: 0;
    font-size: 0.82rem;
  }

  .nav .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .hero,
  .band,
  .preview-section,
  .signup-section,
  .legal-page {
    width: min(100% - 24px, var(--content));
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .screen-pair {
    grid-template-columns: 1fr;
  }

  .screen-pair img:nth-child(2) {
    margin-top: 0;
  }

  .screen-pair img:nth-child(3) {
    margin-top: 0;
  }

  .signup-form,
  .legal-content {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle,
  .theme-toggle svg {
    transition: none;
  }
}
