/* ==========================================================================
   FOURM — Landing page styles
   Mobile-first · Primary #1f2838 · Accent #ffc107
   ========================================================================== */

:root {
  --color-primary: #1f2838;
  --color-accent: #ffc107;
  --color-accent-hover: #e6ad06;
  --color-text: #2c3e50;
  --color-text-muted: #5a6a7a;
  --color-white: #ffffff;
  /* Lighter overlay (~32%) — lets hero image show through while keeping text readable */
  --color-overlay: rgba(31, 40, 56, 0.32);

  --font-family: "Inter", system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(31, 40, 56, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 40, 56, 0.12);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --header-height: 4.5rem;
  --max-width: 72rem;
  --logo-width-max: 11.25rem; /* ~180px desktop */
  --logo-width-min: 7.5rem;   /* ~120px mobile */
}

/* Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Offset fixed header when anchoring to #newsletter from hero CTA */
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

/* Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3 {
  margin: 0 0 var(--space-sm);
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* Layout utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  background-color: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

/* Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: var(--header-height);
  padding-block: var(--space-xs);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 40, 56, 0.08);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Image logo — no border/background; scales between ~120px and ~180px wide */
.logo {
  display: block;
  line-height: 0;
}

.logo__img {
  width: clamp(var(--logo-width-min), 26vw, var(--logo-width-max));
  height: auto;
  object-fit: contain;
}

.nav-list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-primary);
}

.nav-list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

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

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  background-image: url("../images/hero_image.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: var(--header-height);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

/* Same .container as nav — aligns hero copy with logo left edge */
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__content {
  max-width: 40rem;
  padding-block: var(--space-xl);
}

.hero h1,
.hero p {
  color: var(--color-white);
  /* Subtle shadow preserves contrast on the lighter overlay */
  text-shadow:
    0 1px 2px rgba(31, 40, 56, 0.45),
    0 4px 16px rgba(31, 40, 56, 0.35);
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  opacity: 0.98;
  margin-bottom: var(--space-lg);
  max-width: 36rem;
}

.hero .btn {
  text-shadow: none;
}

/* Content sections (quiz & contract)
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--space-2xl);
}

.section--alt {
  background-color: #f7f8fa;
}

.section__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.section__text {
  max-width: 32rem;
}

.section__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.section__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Newsletter
   -------------------------------------------------------------------------- */

.newsletter {
  background-color: var(--color-primary);
  padding-block: var(--space-2xl);
}

.newsletter h2,
.newsletter p {
  color: var(--color-white);
  max-width: 40rem;
}

.newsletter p {
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 28rem;
}

.newsletter__form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.newsletter__input-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.newsletter__form input[type="email"] {
  flex: 1;
  padding: 0.875rem 1rem;
  font-family: var(--font-family);
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  color: var(--color-primary);
}

.newsletter__form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.newsletter__form input[type="email"]::placeholder {
  color: var(--color-text-muted);
}

.newsletter .btn {
  width: 100%;
}

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

.site-footer {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(31, 40, 56, 0.08);
}

/* Tablet and up
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .newsletter__input-row {
    flex-direction: row;
  }

  .newsletter .btn {
    width: auto;
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  .section__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .section__grid--reverse .section__text {
    order: 2;
  }

  .section__grid--reverse .section__image {
    order: 1;
  }
}

@media (min-width: 768px) {
  :root {
    --logo-width-min: 9.375rem; /* ~150px from tablet up */
  }
}

@media (min-width: 1024px) {
  :root {
    --space-2xl: 7rem;
  }

  .container {
    padding-inline: var(--space-lg);
  }
}
