/*
  Vocabu marketing site styles
  - Plain CSS
  - Mobile-first, blue/white palette
*/

:root {
  --color-bg: #f5f7fb;
  --color-bg-alt: #ffffff;
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-accent: #22c55e;
  --color-text: #0f172a;
  --color-text-muted: #6b7280;
  --color-border-subtle: #e5e7eb;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0; /* ensure no body margin so hero can touch edges */
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #d9d9d9;
  background: linear-gradient(to bottom, #030910 0%, #1b2b41 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover; /* full-page gradient background */
}

main {
  flex: 1 0 auto;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / Navigation */

.site-header {
  position: fixed; /* keep header always visible at top */
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(3, 9, 16, 0.5); /* dark, but see-through */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* Safari */
  border-bottom: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.menu-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-toggle.is-open .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.logo-image {
  height: 56px; /* 70% of original 80px height */
  width: auto;
  display: block;
  padding-top: 6px; /* small gap above the icon */
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.nav-link {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: #7cbed0; /* new nav text color */
  font-size: 1rem; /* slightly bigger than before */
}

.nav-link[aria-selected="true"] {
  font-weight: 700;
  text-decoration: underline;
}

.nav-link[aria-selected="false"] {
  font-weight: 400;
  text-decoration: none;
}

.nav-link-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Hero */

.hero {
  padding-top: 2rem; /* space above hero */
  padding-bottom: 2rem; /* space below hero */
  background: transparent;
  color: #ffffff;
  position: relative;
}

.hero .container {
  max-width: 100%;
  padding: 0;
}

.hero-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.75rem;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero-tagline {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: #e5f3ff;
}

.hero-description {
  margin: 0 0 1.25rem;
  color: #d1d5db;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.store-button-ios {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(#fba98f, #bd4f50); /* top → bottom gradient */
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 500; /* Medium */
  font-size: 45px; /* ≈ 34pt */
  line-height: 1.1;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 2px 4px 5px rgba(244, 233, 206, 0.5);
}

.store-button-android {
  background: #ffffff;
  color: var(--color-primary-dark);
  border-color: rgba(15, 23, 42, 0.12);
}

.store-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.hero-illustrations {
  position: relative;
  margin: 0;
  padding: 0;
  line-height: 0; /* remove whitespace gap between images */
}

.hero-illustration {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Panel that sits over the stretched hero images */
.hero-text-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block; /* no flex: let width be driven by content */
  width: max-content; /* hug content width */
  max-width: 90vw; /* keep within viewport on small screens */
  padding: 2rem 3rem; /* horizontal padding around text */
  border-radius: 50px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  box-shadow: 0 0 50px #2d4c63;
  z-index: 2; /* middle layer: rectangle + text */
}

/* Center the text inside the hero rectangle card */
.hero-content.hero-overlay-text {
  position: static;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  max-width: 70rem; /* slightly wider card while still hugging content */
}

.hero-overlay-text h1 {
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 19.5vw, 273px); /* 65% of previous 80px, 30vw, 420px */
  line-height: 0.8;
  color: #00ffcc;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.hero-overlay-text .hero-tagline {
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 2.5vw, 34px);
  line-height: 1.4;
  color: #d9d9d9;
  margin: 0 0 1.5rem;
}

.hero-overlay-text .store-buttons {
  display: flex;
  justify-content: center;
}

/* Responsive sizing for the hero primary button text */
.hero-overlay-text .store-button.store-button-ios {
  font-weight: 500;
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.2;
  padding: clamp(0.6rem, 1vw, 0.8rem) clamp(1.2rem, 2.4vw, 1.8rem);
}

/* hero-1 and hero-2 can be layered if needed later */
.hero-illustration.hero-1 {
  position: relative;
  z-index: 1; /* back */
}

.hero-illustration.hero-2 {
  position: relative;
  z-index: 3; /* front */
}

/* Features */

.features {
  padding: 1.5rem 0 2.5rem;
}

.features h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.feature-list h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

/* Feature card titles use the accent mint color */
.features h3 {
  color: #00ffcc;
}

.feature-list p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  overflow-x: hidden;
}

/* Feature section titles inside split panels */
.section-split .split-text-panel h2 {
  color: #00ffcc;
}

main {
  padding-top: 90px; /* offset for fixed header height */
}

/* Extra offset for legal subpages so titles clear the fixed header */
.page-legal main {
  padding-top: 84px; /* keep clear of fixed header, but reduce excess whitespace */
}

/* Split sections (two-column layout below hero) */

.section-split {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-split .split {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.split-column {
  flex: 1;
}

.split-text {
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 400; /* Regular */
  color: #d9d9d9;
}

.split-text h2 {
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  color: #d9d9d9;
  margin-bottom: 1rem;
}

.split-text p {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.split-text-panel {
  position: relative;
  padding: clamp(1.75rem, 4.5vw, 3.75rem) clamp(1.5rem, 3.5vw, 3.25rem);
  border-radius: 50px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  box-shadow: 0 0 50px #2d4c63;
  max-width: 80%; /* keep panel width tighter so height feels closer to 80% of the illustration */
}

.split-text-panel h2,
.split-text-panel p {
  margin: 0 0 0.75rem;
  color: #d9d9d9;
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 400;
}

.split-illustration {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Feedback section */

/* Full-width feedback strip on homepage */
.section-feedback {
  width: 100%;
  padding: 0;
}

.feedback-strip {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  box-shadow: 0 0 50px #2d4c63;
  border-radius: 0; /* no radius on corners for the strip */
  padding: 2.5rem 1.5rem; /* controls inner spacing left/right */
  display: flex;
  flex-direction: column;
  align-items: center; /* center icon, heading, button horizontally */
  justify-content: center;
  text-align: center;
}

.feedback-icon {
  width: 96px;
  height: auto;
  margin-bottom: 1.25rem;
}

.legal-hint:empty {
  display: none;
}

.feedback-heading {
  margin: 0 0 1.25rem;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 3vw, 28px);
  color: #d9d9d9;
}

.feedback-wrapper {
  display: flex;
  justify-content: center; /* center the button horizontally */
}

/* Feedback form styles (used on contact.html) */

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.feedback-privacy-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #9ca3af;
}

.feedback-privacy-hint a {
  color: inherit;
  text-decoration: underline;
}

.feedback-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #d9d9d9;
}

.feedback-consent input {
  margin-top: 0.15rem;
}

.feedback-form label {
  font-size: 0.9rem;
  color: #d9d9d9;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.95rem;
}

.feedback-form input::placeholder,
.feedback-form textarea::placeholder {
  color: #6b7280;
}

.feedback-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: clamp(14px, 2vw, 18px); /* slightly smaller text than hero */
}

.feedback-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.feedback-thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding-top: 0.5rem;
}

.feedback-thankyou-icon {
  width: 80px;
  height: auto;
}

.feedback-thankyou p {
  margin: 0;
  color: #d9d9d9;
  font-size: 1rem;
}

/* Reverse order for the second block: image left, text right */
.split-reverse {
  flex-direction: row-reverse;
}

/* Legal pages */

.legal-main {
  padding: 96px 0 1.75rem;
}

.legal-container h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.legal-hint {
  background: #eff6ff;
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.legal-section {
  margin-bottom: 1.1rem;
}

.legal-section h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.legal-section p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.legal-section ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

/* Footer */

.site-footer {
  border-top: none; /* remove top border */
  background: transparent; /* sit directly on page gradient */
  margin-top: auto;
  padding: 1rem 0;
  font-size: clamp(12px, 1.8vw, 14px);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #7cbed0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.footer-nav a {
  color: #7cbed0; /* same as navbar */
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  text-decoration: underline;
}

/* Responsive layout */

@media (max-width: 768px) {
  .site-header {
    min-height: 64px; /* taller bar on mobile */
  }

  .header-inner {
    justify-content: space-between;
    position: relative;
    z-index: 30;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    align-items: center; /* keep content centered vertically */
  }

  /* Hide the app icon image on mobile so only the hamburger shows */
  .logo-image {
    display: none;
  }

  /* Mobile logo button: hamburger when closed, X when open */
  .menu-toggle {
    display: flex; /* show hamburger button on mobile */
    width: 40px; /* reasonable tap area */
    height: 40px;
    padding: 11px 8px;
  }

  .hero {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    margin-top: 0.75rem; /* small gap below sticky header on mobile */
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Mobile nav panel: sits just below the header with its own background */
  .main-nav {
    position: absolute;
    top: 100%; /* just below the header */
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    background: rgba(3, 9, 16, 0.95); /* visible bg behind menu */
    padding: 0.5rem 0;
    z-index: 40;
  }

  .main-nav.nav-open {
    display: flex;
  }

  .main-nav .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
  }

  .section-split .split {
    display: flex;
    flex-direction: column; /* stack items in one column */
  }

  .split-image,
  .split-text {
    width: 100%;
  }

  /* Default mobile order: image first, text second */
  .section-split .split .split-image {
    order: 1;
  }

  .section-split .split .split-text {
    order: 2;
  }

  .hero-text-panel {
    top: 45%;
    transform: translate(-50%, -45%);
    padding: 0.9rem 1.6rem; /* smaller rectangle vertically + horizontally */
    max-width: 90vw; /* slightly tighter than desktop cap */
  }

  /* Mobile-specific hero typography scaling */
  .hero-overlay-text h1 {
    font-size: clamp(32px, 10vw, 52px); /* smaller VOCABU on mobile */
  }

  .hero-overlay-text .hero-tagline {
    font-size: clamp(14px, 3.4vw, 18px); /* smaller tagline */
    margin-bottom: 1rem;
  }

  .hero-overlay-text .store-button.store-button-ios {
    font-size: clamp(14px, 3vw, 18px); /* smaller button text */
    padding: 0.55rem 1.4rem; /* smaller button size */
  }

  /* Center main content (hero + split sections) on mobile */
  main {
    display: flex;
    flex-direction: column;
    align-items: center; /* center all section containers */
  }

  main .container,
  .section-split .split {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  main.legal-main .legal-container {
    text-align: left;
  }

  /* Mobile-specific sizing and alignment for text cards */
  .split-text-panel {
    max-width: 100%;
    width: 100%;
    min-height: 260px; /* adjust as needed to align with illustration height */
    text-align: left; /* left-align headings and paragraphs */
    margin-left: auto;
    margin-right: auto;
  }

  .split-text,
  .split-image {
    display: flex;
    flex-direction: column;
    align-items: center; /* center images and text blocks */
  }

  /* Feedback section mobile tweaks */
  .section-feedback .split {
    flex-direction: column;
  }

  .feedback-panel {
    text-align: center;
  }

  .feedback-submit {
    align-self: center;
  }
}

@media (min-width: 768px) {
  .site-header {
    background: rgba(3, 9, 16, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  /* Desktop split layout: equal-height columns and panels */
  .section-split .split {
    display: flex;
    align-items: stretch; /* make both columns equal height */
  }

  .split-column {
    display: flex;
    flex-direction: column;
  }

  .split-text-panel {
    height: 100%; /* rectangle fills the whole column height */
    max-width: 100%; /* allow it to use full column width */
  }
}
