/* =====================================================
   EverHuman — Main CSS
   Design tokens, resets, typography, shared components
   ===================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg:         #FAF8F5;
  --color-bg-alt:     #F4F1EC;
  --color-bg-dark:    #1A1A18;
  --color-black:      #111111;
  --color-white:      #FFFFFF;
  --color-accent:     #FF6B4A;
  --color-accent-alt: #FF8C6B;
  --color-muted:      #7A7670;
  --color-border:     #E8E4DC;
  --color-card:       #FFFFFF;

  /* Support bar */
  --color-bar-bg:     #1A1A18;
  --color-bar-text:   #C8C4BC;
  --color-bar-link:   #FFFFFF;

  /* Typography */
  --font-family:    'Instrument Sans', sans-serif;
  --font-size-xs:   0.75rem;    /* 12px */
  --font-size-sm:   0.875rem;   /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-md:   1.125rem;   /* 18px */
  --font-size-lg:   1.25rem;    /* 20px */
  --font-size-xl:   1.5rem;     /* 24px */
  --font-size-2xl:  2rem;       /* 32px */
  --font-size-3xl:  2.75rem;    /* 44px */
  --font-size-4xl:  3.5rem;     /* 56px */
  --font-size-5xl:  4.5rem;     /* 72px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1400px;

  /* Radius */
  --radius-sm:  0.5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-xl:  2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Header height */
  --header-height: 68px;
  --bar-height: 44px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.65;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--wide {
  max-width: var(--container-wide);
}

/* --- Support Bar --- */
.support-bar {
  background-color: var(--color-bar-bg);
  color: var(--color-bar-text);
  font-size: var(--font-size-sm);
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: var(--space-4);
  position: relative;
  z-index: 100;
}

.support-bar a {
  color: var(--color-bar-link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition-fast);
}

.support-bar a:hover {
  opacity: 0.75;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: rgba(250, 248, 245, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-black);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__lang {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
}

@media (max-width: 900px) {
  .nav__lang .lang-name,
  .nav__lang svg {
    display: none;
  }
  .nav__lang {
    padding: var(--space-2);
  }
  .nav__lang .lang-flag {
    font-size: 1.5em;
    line-height: 1;
  }
}

.nav__lang:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-black);
}

.nav__lang svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 350px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 200;
}

.lang-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.lang-dropdown a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-black);
  transition: background-color var(--transition-fast);
}

.lang-dropdown a:hover {
  background-color: var(--color-bg);
}

.lang-dropdown a.active {
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  border: none;
}

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

.btn--primary:hover {
  background-color: #2A2A28;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

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

.btn--secondary {
  background-color: var(--color-white);
  color: var(--color-black);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: #C8C4BC;
}

.btn--accent {
  background: linear-gradient(135deg, #FF6B4A, #FF8C6B);
  color: var(--color-white);
}

.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 74, 0.35);
}

.btn--lg {
  padding: 0.875rem var(--space-8);
  font-size: var(--font-size-base);
  border-radius: var(--radius-full);
}

.btn--xl {
  padding: 1.1rem var(--space-10);
  font-size: var(--font-size-md);
  border-radius: var(--radius-full);
}

/* --- Section styles --- */
.section {
  padding-block: var(--space-24);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section__headline {
  font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-3xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-black);
  max-width: 20ch;
}

.section__subheadline {
  font-size: var(--font-size-md);
  color: var(--color-muted);
  max-width: 52ch;
  margin-top: var(--space-4);
  line-height: 1.65;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__header .section__headline {
  margin-inline: auto;
}

.section__header .section__subheadline {
  margin-inline: auto;
}

/* --- Star Rating --- */
.star {
  color: #F5A623;
  font-size: var(--font-size-sm);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-bar-text);
  padding-block: var(--space-16) var(--space-8);
  border-radius: 40px 40px 0 0;
  margin-top: -40px;
  position: relative;
  z-index: 25;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-8);
}

.footer__brand-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: var(--color-bar-text);
  line-height: 1.6;
  max-width: 28ch;
  margin-bottom: var(--space-6);
}

.footer__store-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__store-link {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.footer__store-link:hover {
  opacity: 0.75;
}

.footer__store-link img,
.footer__store-link svg {
  height: 36px;
  width: auto;
  max-width: 140px;
}

.footer__col-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-bar-text);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copyright {
  font-size: var(--font-size-xs);
  color: rgba(200,196,188,0.6);
}

.footer__lang-select {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-bar-text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast);
}

.footer__lang-select:hover {
  background: rgba(255,255,255,0.1);
}

/* --- Mobile Nav Toggle --- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
  border: none;
  background: none;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-black);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* --- Mobile Nav Drawer --- */
.nav__mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 80;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav__mobile.open {
  opacity: 1;
  pointer-events: all;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  :root {
    --header-height: 60px;
  }

  /* Hide navigation actions on mobile as requested */
  .nav__actions > .btn {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8) var(--space-6);
  }
}

@media (max-width: 600px) {
  :root {
    --bar-height: auto;
  }

  .support-bar {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8rem;
    height: auto;
  }

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

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .container {
    padding-inline: var(--space-4);
  }
  
  .btn {
    white-space: normal;
    text-align: center;
    padding-inline: var(--space-4);
  }
  
  .btn--xl {
    padding: 0.8rem var(--space-4);
    font-size: var(--font-size-base);
  }
  
  .mobile-hidden {
    display: none !important;
  }
  
  .support-bar__question {
    display: none !important;
  }
}
