@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

/* --- APPLE DESIGN SYSTEM VARIABLES --- */
:root {
  --apple-blue: #0071E3;
  --sky-blue: #2997FF;
  --soft-gray: #F5F5F7;
  --text-charcoal: #333336;
  --link-blue: #0066CC;
  --white: #FFFFFF;
  --black: #000000;
  --dark-gray: #1D1D1F;
  --border-light: 1px solid #D2D2D7;
  
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- RESET & BASIC STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--white);
  color: var(--text-charcoal);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.45;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-charcoal);
  letter-spacing: -0.015em;
  font-weight: 600;
}

p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: #86868B;
}

.mono {
  font-family: var(--font-mono);
}

/* --- BUTTONS & LINKS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--apple-blue);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 980px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  background-color: #0077ED;
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--soft-gray);
  color: var(--link-blue);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 980px;
  border: 1px solid #D2D2D7;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #E8E8ED;
  border-color: #A2A2A7;
}

.text-link {
  color: var(--link-blue);
  font-family: var(--font-body);
  font-size: 17px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.text-link::after {
  content: " ➔";
  font-size: 11px;
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link:hover::after {
  transform: translateX(3px);
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

.logo-link {
  display: flex;
  align-items: center;
  color: var(--text-charcoal);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.7;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
  margin-right: 24px;
}

.nav-item {
  font-family: var(--font-body);
  font-size: 12px;
  color: #1D1D1F;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  opacity: 1;
  color: var(--apple-blue);
}

/* Dropdown styling */
.nav-links > li {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--white);
  border: var(--border-light);
  border-radius: 12px;
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 8px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Invisible bridge to prevent dropdown from disappearing on hover transition */
.dropdown::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background-color: transparent;
}

.nav-links > li:hover .dropdown {
  display: flex;
}

.dropdown-item {
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-charcoal);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--soft-gray);
  color: var(--apple-blue);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background-color: var(--text-charcoal);
  margin: 2px 0;
  transition: 0.2s ease;
}

/* --- APPLE SYSTEM SECTIONS --- */
.apple-section {
  position: relative;
  width: 100%;
  padding: 80px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-section.light-bg {
  background-color: var(--white);
}

.apple-section.gray-bg {
  background-color: var(--soft-gray);
}

.apple-section.dark-bg {
  background-color: var(--dark-gray);
  color: var(--white);
}

.apple-section.dark-bg h2, 
.apple-section.dark-bg h3 {
  color: var(--white);
}

.apple-section.dark-bg p {
  color: #A1A1A6;
}

/* Section Header Typography */
.section-headline {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 10px;
}

.section-subhead {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  color: #86868B;
  max-width: 600px;
  margin-bottom: 24px;
}

.dark-bg .section-subhead {
  color: #A1A1A6;
}

/* --- SCROLL REVEAL TIMING --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- FOOTER STYLING (APPLE RESTRICTION) --- */
footer {
  background-color: var(--soft-gray);
  color: #86868B;
  padding: 48px 22px 34px 22px;
  font-family: var(--font-body);
  font-size: 12px;
  border-top: 1px solid #D2D2D7;
}

.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 32px;
  border-bottom: 1px solid #D2D2D7;
  padding-bottom: 30px;
  margin-bottom: 20px;
}

.footer-brand h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-charcoal);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 12px;
  line-height: 1.4;
  color: #86868B;
  margin-bottom: 12px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-charcoal);
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #515154;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col ul li a:hover {
  color: var(--apple-blue);
  text-decoration: underline;
}

.legal-details {
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px;
  border-radius: 8px;
  margin-top: 20px;
  line-height: 1.5;
}

.legal-title {
  font-weight: 600;
  color: var(--text-charcoal);
  margin-bottom: 6px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
  color: #6E6E73;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 15px;
}

.footer-copy {
  color: #86868B;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    align-items: flex-start;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--soft-gray);
    width: 100%;
    margin-top: 8px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .section-headline {
    font-size: 28px;
  }
  
  .section-subhead {
    font-size: 17px;
  }
}
