@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  --brand-blue: #0b3d91;
  --brand-blue-hover: #1656b9;
  --platinum: #e5e4e2;
  --silver-dark: #b0c4de;
  --dark-bg: #0f172a;
  --darker-bg: #0b0f19;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --nav-height: 70px;
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

a {
  touch-action: manipulation; /* faster tap response on mobile */
}

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-container img {
  height: 42px;
  width: auto;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--platinum);
  text-decoration: none;
  white-space: nowrap;
}

/* Desktop nav */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--platinum);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 0.4rem 0;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--brand-blue);
}

/* ── Hamburger Button (hidden on desktop) ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--platinum);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav overlay ── */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  nav.open {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
  }

  nav a {
    font-size: 1.6rem;
    font-family: 'Playfair Display', serif;
  }
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  min-height: 100svh; /* svh = safe viewport height, better on mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 3rem;
  background:
    radial-gradient(circle at top right, rgba(11, 61, 145, 0.18), transparent 50%),
    radial-gradient(circle at bottom left, rgba(229, 228, 226, 0.05), transparent 50%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 4rem); /* fluid — never too big or too small */
  line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(to right, var(--platinum), #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  min-height: 48px; /* accessibility: minimum touch target */
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(11, 61, 145, 0.4);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--brand-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 61, 145, 0.6);
}

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

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: rgba(229, 228, 226, 0.1);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════ */
section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--platinum);
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background-color: var(--brand-blue);
  border-radius: 2px;
}

/* ══════════════════════════════════════════
   FEATURE / CARD GRID
══════════════════════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Disable hover lift on touch devices (no hover state) */
@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(229, 228, 226, 0.2);
  }
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--brand-blue);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.75rem;
  color: var(--platinum);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   APP / VIDEO SECTION
══════════════════════════════════════════ */
.app-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.app-text {
  flex: 1;
  min-width: min(100%, 280px);
}

.app-video {
  flex: 1;
  min-width: min(100%, 280px);
}

/* ══════════════════════════════════════════
   VIDEO THUMBNAIL (EM Logo)
══════════════════════════════════════════ */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  background: #0b0f19;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  display: none;
}

.video-wrapper iframe.active { display: block; }

.video-thumbnail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(11, 61, 145, 0.25), #0b0f19 80%);
  transition: opacity 0.4s ease;
}

.video-thumbnail.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-thumbnail img {
  width: 50%;
  max-width: 180px;
  opacity: 0.85;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 20px rgba(11, 61, 145, 0.7));
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (hover: hover) {
  .video-thumbnail:hover img {
    transform: scale(1.05);
    opacity: 1;
  }
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-blue);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(11, 61, 145, 0.6);
  animation: pulse 2s infinite;
  -webkit-tap-highlight-color: transparent;
}

.play-btn i {
  color: white;
  font-size: 1.4rem;
  margin-left: 4px;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(11, 61, 145, 0.6); }
  70%  { box-shadow: 0 0 0 16px rgba(11, 61, 145, 0); }
  100% { box-shadow: 0 0 0 0   rgba(11, 61, 145, 0); }
}

/* ══════════════════════════════════════════
   NEWSLETTER
══════════════════════════════════════════ */
.newsletter-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-row input[type="email"] {
  padding: 0.85rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255,255,255,0.05);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  width: min(260px, 100%);
  min-height: 48px;
  outline: none;
  transition: border-color 0.3s;
}

.newsletter-row input[type="email"]:focus {
  border-color: var(--brand-blue);
}

.newsletter-msg {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  min-height: 1.2em;
}

.newsletter-msg.success { color: #4ade80; }
.newsletter-msg.error   { color: #f87171; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--darker-bg);
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo img {
  height: 56px;
  opacity: 0.8;
  transition: opacity 0.3s;
  margin: 0 auto;
}

.footer-logo img:hover { opacity: 1; }

.footer-social {
  display: flex;
  gap: 1.75rem;
  font-size: 1.5rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover { color: var(--brand-blue); transform: translateY(-2px); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  padding: 0.25rem 0;
}

.footer-links a:hover { color: var(--brand-blue); }

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-up { animation: none; }
  .play-btn   { animation: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ── Tablet / small desktop ── */
@media (max-width: 900px) {
  section { padding: 4rem 1.5rem; }

  .app-section-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .app-text,
  .app-video {
    min-width: 100%;
  }

  .section-title { text-align: center; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .logo-text { font-size: 1.15rem; }
  .logo-container img { height: 38px; }

  /* Hero */
  .hero {
    padding: calc(var(--nav-height) + 2rem) 1.25rem 2.5rem;
    min-height: 100svh;
    align-items: center;
  }

  /* Sections */
  section { padding: 3.5rem 1.25rem; }

  /* Feature cards — single column on small phones */
  .features {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card { padding: 1.75rem 1.25rem; }

  /* Footer social icons — bigger touch targets */
  .footer-social { gap: 2rem; }

  /* Newsletter */
  .newsletter-row {
    flex-direction: column;
    align-items: center;
  }

  .newsletter-row input[type="email"] {
    width: 100%;
    max-width: 360px;
  }

  .newsletter-row .btn {
    width: 100%;
    max-width: 360px;
  }
}

/* ── Small phones (iPhone SE etc.) ── */
@media (max-width: 380px) {
  .logo-text { display: none; } /* show only logo mark on tiny screens */

  .hero h1 { font-size: 1.9rem; }

  .btn { padding: 0.8rem 1.5rem; font-size: 0.95rem; }
}
