/* ===========================
   Font Declarations
   =========================== */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegibleNext-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegibleNext-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ===========================
   CSS Variables - Colors from PDF
   =========================== */
:root {
  /* Colors directly from the PDF */
  --color-bg-cream: #fffaeb; /* Main background cream from Adobe XD */
  --color-text-dark: #4a3f36; /* Dark brown text */
  --color-text-heading: #6b5b50; /* Heading brown */
  --color-logo-brown: #5d4037; /* Logo brown color */
  --color-green-mint: #dcedc8; /* Mint green button */
  --color-light-pink: #fce4ec; /* Light pink background */
  --color-light-pink-50: rgba(
    252,
    228,
    236,
    0.5
  ); /* Light pink at 50% opacity */
  --color-footer-dark: #4a3f36; /* Footer background */

  /* Typography */
  --font-primary: "Atkinson Hyperlegible", -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
}

/* ===========================
   Reset & Base
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-cream);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ===========================
   Container
   =========================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===========================
   Header
   =========================== */
.header {
  padding: var(--space-md) 0;
  position: relative;
  z-index: 100;
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  text-align: right;
}

.header__languages {
  display: inline-flex;
  gap: var(--space-xs);
}

.lang-btn {
  background: transparent;
  color: var(--color-text-dark);
  padding: var(--space-xs) var(--space-sm);
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.002em;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  border: none;
  text-decoration: none;
}

.lang-btn:hover {
  opacity: 0.7;
}

.lang-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-sm);
  right: var(--space-sm);
  height: 1px;
  background-color: var(--color-text-dark);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  position: relative;
  padding: var(--space-2xl) 0 30vw;
  min-height: 80vh;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  background-image: url("/images/worm.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 122vw auto;
  z-index: 1;
  pointer-events: none;
}

/* Hero content */
.hero__content {
  position: relative;
  width: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__title {
  margin: 0;
  font-size: inherit;
  font-weight: normal;
}

.hero__logo {
  display: inline-block;
  max-width: 100%;
  height: auto;
  width: clamp(200px, 50vw, 400px);
  fill: var(--color-logo-brown);
}

.hero__subtitle {
  font-family: "Roboto Mono", monospace;
  font-weight: 500; /* Medium weight */
  font-size: 19px;
  letter-spacing: 0.002em;
  line-height: 23px;
  color: var(--color-text-dark);
  margin-bottom: var(--space-lg);
}

.hero__description {
  font-size: 19px;
  line-height: 23px;
  letter-spacing: 0.002em;
  color: var(--color-text-dark);
  max-width: 1024px;
  margin: 0 auto var(--space-md);
}

.hero__tagline-wrapper {
  position: relative;
  display: flex;
  flex-direction: column-reverse; /* Computer below tagline on mobile */
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-heading);
  font-weight: 500;
}

.hero__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
}

/* Computer character illustration */
.hero__illustration {
  position: static; /* Default: in-flow for mobile */
  margin: 0 auto;
  text-align: center;
}

.computer-image {
  width: 190px;
  height: auto;
  animation: bounce-gentle 3s ease-in-out infinite;
}

@keyframes bounce-gentle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===========================
   Buttons
   =========================== */
.btn {
  height: 76px;
  padding: 0 var(--space-2xl);
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  border-radius: 38px; /* Half of height for pill shape */
  transition: all 0.3s ease;
  min-width: 280px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  line-height: 1;
}

.btn:focus {
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(168, 230, 207, 0.5);
}

.btn--primary {
  background: var(--color-green-mint);
  color: var(--color-text-dark);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn--secondary {
  background: white;
  color: var(--color-text-dark);
}

.btn--secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===========================
   Feature Sections
   =========================== */
.feature {
  padding: 0 0 calc(var(--space-3xl) * 2) 0;
  position: relative;
}

/* All feature sections use same background color */
.feature--safe,
.feature--voices,
.feature--visual,
.feature--parents {
  background: transparent; /* Inherits the #FFFAEB from body */
}

.feature--always {
  background: var(--color-light-pink-50);
  text-align: center;
  padding-bottom: var(--space-3xl); /* Keep padding for content spacing */
  padding-top: var(--space-2xl);
  margin-bottom: 0; /* Ensure no gap before footer */
  position: relative;
  overflow: hidden;
}

.feature--always::after {
  content: "";
  position: absolute;
  bottom: 70px;
  right: 70px;
  width: 70px;
  height: 70px;
  background-image: url("/images/star2.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
}

.feature--always .container {
  position: relative;
  z-index: 2;
}

.feature--always .container::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5vw;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  background-image: url("/images/star.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .feature--always .container::before {
    left: -5vw; /* Pushes partially out of view on mobile */
    width: 80px;
    height: 80px;
  }
}

.feature--always .feature__description {
  position: relative;
  text-align: center;
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  z-index: 2;
}

.feature--always .btn {
  margin-top: 2rem;
}

.feature__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: end; /* Bottom align items */
}

/* No special styling needed for mobile - stacks naturally */

.feature__content {
  max-width: 500px;
  margin-left: 2rem;
  margin-right: 2rem;
}

.feature__title {
  font-size: 53px;
  line-height: 67px;
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-weight: 500; /* Medium weight */
  letter-spacing: 0.002em;
  color: var(--color-text-heading);
}

.feature__subtitle {
  font-family: "Roboto Mono", monospace;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.002em;
  line-height: 29px;
  color: var(--color-text-dark);
  margin-bottom: var(--space-md);
  opacity: 0.8;
}

.feature__description {
  font-size: 16px;
  letter-spacing: 0.002em;
  color: var(--color-text-dark);
  line-height: 22px;
  max-width: 500px;
}

.feature__illustration {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Bottom align the image within its container */
}

.feature__illustration img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: var(--radius-xl);
}

/* Center aligned section */
.feature__center {
  margin: 0 auto;
}

/* ===========================
   Footer
   =========================== */
.footer {
  background: var(--color-footer-dark);
  color: var(--color-light-pink);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: 0; /* Remove top margin to connect with always section */
}

.footer__header {
  width: 100%;
  text-align: left;
  margin-bottom: var(--space-xl);
  padding: 0 var(--space-md);
}

.footer__logo {
  /* No margin */
}

.footer__logo-svg {
  width: 280px;
  height: auto;
  fill: var(--color-light-pink);
}

.footer__tagline {
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
  opacity: 0.9;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 10rem; /* Large gap between columns */
  row-gap: var(--space-xl);
  width: 100%;
  padding: 0 var(--space-md);
}

.footer__column {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.footer__label {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 0.75rem; /* Small margin after the line */
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-light-pink);
}

.footer__link {
  color: var(--color-light-pink);
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem; /* Smaller margin between links */
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.footer__link:hover {
  opacity: 1;
}

/* Removed .footer__link--email styles as email is now in middle column without special styling */

.footer__social-links {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
}

.footer__social-link {
  display: inline-block;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.footer__social-link:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.footer__social-link svg {
  width: 24px;
  height: 24px;
  fill: var(--color-light-pink);
}

.footer__copyright {
  margin-top: var(--space-xs); /* Reduced margin */
  opacity: 0.7;
  font-size: 0.875rem;
}

/* ===========================
   Responsive Design
   =========================== */

/* Mobile adjustments */
@media (max-width: 767px) {
  .btn {
    height: 60px;
    font-size: 13px;
    min-width: 240px;
    border-radius: 30px;
    padding: 0 var(--space-lg);
  }
}

@media (min-width: 768px) {
  /* Keep buttons stacked vertically as per design */
  .hero__buttons {
    flex-direction: column;
    justify-content: center;
  }

  /* Keep content centered */
  .hero__content {
    text-align: center;
  }

  .computer-image {
    width: 190px;
  }

  .hero__description {
    margin: 0 0 var(--space-md) 0;
  }

  .feature__grid {
    grid-template-columns: 1.2fr 0.8fr; /* Give more space to text column */
  }

  /* Reverse Safe by Design and Visual sections (1st and 3rd) */
  .feature--safe .feature__illustration,
  .feature--visual .feature__illustration {
    order: 2;
  }

  .feature--safe .feature__content,
  .feature--visual .feature__content {
    order: 1;
  }

  /* Prevent title wrapping on desktop */
  .feature__title {
    white-space: nowrap; /* Prevent line breaks */
    font-size: 48px; /* Slightly smaller if needed to fit */
  }

  .feature__content {
    max-width: 600px; /* Give more room for content */
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .footer__column {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 90vh;
  }

  /* Move computer illustration to the left side on desktop */
  .hero__tagline-wrapper {
    flex-direction: row; /* Back to horizontal */
    min-height: 100px;
    align-items: flex-start; /* Align to top on desktop */
    margin-top: 1rem;
  }

  .hero__illustration {
    position: absolute; /* Take out of flow on desktop */
    left: -200px;
    top: 0;
    z-index: 1;
    margin: 0;
  }

  .computer-image {
    width: 190px;
  }

  .feature__illustration img {
    max-width: 260px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
