/* =============================================
   terminal2.care — Homepage v3
   Clean white card layout with emoji icons
   ============================================= */

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

:root {
  /* Colors */
  --navy: #1a2332;
  --navy-light: #243044;
  --navy-muted: #364152;
  --slate: #4a5568;
  --slate-light: #718096;
  --warm-white: #fafaf8;
  --warm-cream: #f5f3ef;
  --warm-gray: #e8e5e0;
  --teal: #0d9488;
  --teal-dark: #0b7c72;
  --teal-light: #14b8a6;
  --teal-bg: #f0fdfa;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --white: #ffffff;
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e0db;
  --border-light: #eeece7;

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 2vw + 1rem, 2rem);
  --text-4xl: clamp(2rem, 3vw + 1rem, 2.75rem);
  --text-5xl: clamp(2.5rem, 5vw + 1rem, 4.5rem);

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.05);
  --shadow-md: 0 2px 8px rgba(26, 35, 50, 0.07), 0 1px 3px rgba(26, 35, 50, 0.04);
  --shadow-lg: 0 4px 16px rgba(26, 35, 50, 0.08), 0 2px 6px rgba(26, 35, 50, 0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;

  /* Layout */
  --content-max: 1200px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.05;
  color: var(--navy);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

p { max-width: 72ch; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
a:hover { color: var(--teal-dark); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  gap: var(--sp-6);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav__logo {
  height: 32px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
}

.nav__links a {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav__links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav__links a.active { color: var(--white); background: rgba(255,255,255,0.15); }

/* --- Dropdown --- */
.nav__dropdown { position: relative; }
.nav__dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.nav__caret { flex-shrink: 0; transition: transform 0.2s ease; }
.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--navy);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  padding: var(--sp-2) 0;
  list-style: none;
  z-index: 110;
}
.nav__dropdown-menu li { margin: 0; }
.nav__dropdown-menu a {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__dropdown-menu a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav__dropdown-menu a.active { color: var(--white); background: rgba(255,255,255,0.12); }
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown:hover .nav__caret { transform: rotate(180deg); }

/* Mobile sub-links */


/* --- Mobile Navigation --- */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  z-index: 102;
  position: relative;
}
.nav__hamburger:hover { background: rgba(255,255,255,0.1); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--navy);
  padding: var(--sp-4) var(--sp-6);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 99;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav__mobile.open { display: flex; flex-direction: column; }

.nav__mobile a {
  display: block;
  color: #fff;
  font-size: var(--text-base);
  font-weight: 500;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
.nav__mobile a:hover, .nav__mobile a.active { color: var(--white); }

.nav__mobile-sub {
  display: none;
  padding-left: var(--sp-4);
  border-left: 2px solid rgba(255,255,255,0.15);
  margin-left: var(--sp-3);
  margin-bottom: var(--sp-1);
}
.nav__mobile-sub.open {
  display: block;
}
.nav__mobile-sub a {
  font-size: var(--text-sm) !important;
  padding: var(--sp-2) 0 !important;
  color: rgba(255,255,255,0.85) !important;
  border-bottom: none !important;
}
.nav__mobile-sub a:hover,
.nav__mobile-sub a.active { color: var(--white) !important; }

body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__hamburger { display: block; }
}

/* --- Hero Section --- */
.hero {
  background: var(--navy);
  padding: var(--sp-16) 0;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(13,148,136,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--teal-light);
  margin-bottom: var(--sp-6);
}

.hero h1 {
  color: var(--white);
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 auto var(--sp-6);
  max-width: 800px;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--teal-light);
}

.hero__graphic {
  margin: 0 auto var(--sp-8);
  max-width: 620px;
}

.hero__handwritten {
  width: 100%;
  height: auto;
  display: block;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  margin: 0 auto var(--sp-10);
  font-weight: 400;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-10);
  margin: var(--sp-10) 0;
  flex-wrap: wrap;
}

.hero__stat { text-align: center; }

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--teal-light);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin-top: var(--sp-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.hero__ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}
.btn--primary:hover { background: var(--teal-dark); color: var(--white); }

.btn--secondary {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn--secondary:hover { background: rgba(255,255,255,0.18); color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn--outline:hover { background: var(--teal-bg); }

.btn--lg {
  font-size: var(--text-base);
  padding: var(--sp-4) var(--sp-8);
}

/* --- Section Headline (big centered text like reference) --- */
.section-headline {
  text-align: center;
  padding: var(--sp-20) 0 var(--sp-12);
}

.section-headline h2 {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 auto var(--sp-6);
  max-width: 750px;
  letter-spacing: -0.03em;
}

.section-headline h2 .accent {
  color: var(--teal);
}

.section-headline p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Card Grid (4-col) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 1200px;
}
@media (max-width: 1024px) {
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .card-grid--4 { grid-template-columns: 1fr; }
}

/* --- Cards: Clean white with emoji icon --- */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color);
  transform: translateY(-2px);
}

.card__emoji {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: var(--sp-5);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card__emoji {
  transform: translateY(4px);
}

/* Shimmer for "What We Cannot Explain" card */
.card__emoji--shimmer {
  position: relative;
  display: inline-block;
  overflow: visible;
}
.card__emoji--shimmer::after {
  content: '';
  position: absolute;
  top: -10%; left: -30%; width: 40%; height: 120%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.7) 50%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  animation: shimmerLoop 2.4s ease-in-out infinite;
}
@keyframes shimmerLoop {
  0% { left: -30%; opacity: 0; }
  10% { opacity: 1; }
  50% { left: 110%; opacity: 0; }
  51% { left: 110%; opacity: 0; }
  60% { opacity: 1; }
  100% { left: -30%; opacity: 0; }
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-3);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.card__arrow {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-5);
  color: var(--teal);
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover .card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Row Dividers (thin line between card rows) --- */
.card-row {
  margin-bottom: var(--sp-5);
}

.card-row:last-child {
  margin-bottom: 0;
}

/* --- World's First Banner --- */
.banner {
  background: var(--warm-cream);
  text-align: center;
  padding: var(--sp-16) 0;
}

.banner__tagline {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--navy);
  margin: 0 auto var(--sp-4);
  max-width: 700px;
  letter-spacing: -0.02em;
}

.banner__sub {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Community CTA Card --- */
.community-section {
  padding: var(--sp-16) 0;
  background: var(--navy);
}

.community-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-10);
  background: linear-gradient(135deg, rgba(30,45,60,0.95) 0%, rgba(26,35,50,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-12);
  position: relative;
  overflow: hidden;
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--teal), transparent);
  opacity: 0.5;
}

.community-card__content {
  flex: 1;
}

.community-card__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: var(--sp-4);
}

.community-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--sp-4);
  letter-spacing: -0.03em;
}

.community-card__text {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  max-width: 580px;
}

.community-card__action {
  text-align: center;
  flex-shrink: 0;
}

.community-card__note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  margin-top: var(--sp-3);
  font-style: italic;
}

.btn--amber {
  background: #c2703a;
  color: var(--white);
  font-size: var(--text-base);
  padding: var(--sp-4) var(--sp-10);
  border-radius: var(--radius-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--duration-fast) ease;
}
.btn--amber:hover {
  background: #a85f30;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(194,112,58,0.3);
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: var(--sp-12) 0 var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 0.7fr 0.7fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-10);
  align-items: start;
}

.footer__brand-link {
  display: inline-block;
  margin-bottom: var(--sp-2);
}

.footer__logo {
  height: 32px;
  width: auto;
  display: block;
}

.footer__stk-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: var(--sp-3);
  opacity: 0.9;
}

.footer__tagline {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--teal-light);
  margin-bottom: var(--sp-4);
}

.footer__disclaimer {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: rgba(255,255,255,0.35);
  max-width: 220px;
}

.footer__col h6 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-4);
  font-weight: 700;
}

.footer__col a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: var(--text-sm);
  padding: var(--sp-1) 0;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
.footer__col a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero { padding: var(--sp-12) 0; }
  .hero h1 { font-size: var(--text-3xl); }
  .hero__graphic { max-width: 400px; }
  .hero__subtitle { font-size: var(--text-base); }
  .hero__stats { gap: var(--sp-6); }
  .hero__stat-number { font-size: var(--text-2xl); }

  .section-headline { padding: var(--sp-12) 0 var(--sp-8); }
  .section-headline h2 { font-size: var(--text-3xl); }

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

  .banner { padding: var(--sp-12) 0; }
  .banner__tagline { font-size: var(--text-2xl); }

  .community-section { padding: var(--sp-12) 0; }

  .community-card {
    flex-direction: column;
    text-align: center;
    padding: var(--sp-8) var(--sp-6);
  }

  .community-card__text { max-width: 100%; }

  .footer__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer__bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }

  .container { padding: 0 var(--sp-4); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: var(--text-2xl); }
  .hero__graphic { max-width: 280px; }
  .hero__stat-number { font-size: var(--text-xl); }
  .hero__stats { gap: var(--sp-4); }
  .section-headline h2 { font-size: var(--text-3xl); }
}
