/* FCH V2 — Apple-Inspired Design System */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 17px;
  line-height: 1.47;
  font-weight: 400;
  letter-spacing: -0.374px;
  color: #1d1d1f;
  background-color: #ffffff;
}

/* ========== TYPOGRAPHY (Apple tight) ========== */

.display-hero {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
}
.display-h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: -0.374px;
}
.display-h2 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.47;
  letter-spacing: -0.374px;
}
.display-subhead {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
}
.display-lead {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.19;
  letter-spacing: 0.231px;
}
.body-text {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
}
.caption-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
}
.caption-strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: -0.224px;
}
.footer-link {
  font-size: 12px;
  font-weight: 400;
  line-height: 2.41;
  letter-spacing: -0.12px;
}
.footer-heading {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.12px;
}
.fine-print {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.12px;
}

/* Responsive typography */
@media (max-width: 1068px) {
  .display-hero { font-size: 40px; }
  .display-h1 { font-size: 34px; }
  .display-subhead { font-size: 24px; }
}
@media (max-width: 640px) {
  .display-hero { font-size: 32px; }
  .display-h1 { font-size: 28px; }
  .display-h2 { font-size: 24px; }
  .display-subhead { font-size: 21px; }
  .display-lead { font-size: 17px; }
}

/* ========== BLUE PILL CTA ========== */

.pill-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0066cc;
  color: #ffffff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.0;
  border: none;
  border-radius: 980px;
  padding: 11px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.pill-primary:hover {
  background-color: #0071e3;
}
.pill-primary:active {
  transform: scale(0.95);
}


/* Dark surface ghost variant */
.pill-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #2997ff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.0;
  border: 1px solid #2997ff;
  border-radius: 980px;
  padding: 11px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.pill-ghost-light:hover {
  background-color: #2997ff;
  color: #ffffff;
}
.pill-ghost-light:active {
  transform: scale(0.95);
}

/* ========== NAVBAR ========== */

.apple-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.4s ease;
}
.apple-nav.scrolled {
  background-color: rgba(0, 0, 0, 1);
}
.apple-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  text-decoration: none;
  transition: color 0.3s ease;
}
.apple-nav a:hover {
  color: #ffffff;
}
.apple-nav a.active {
  color: #ffffff;
}

/* Nav dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 18px;
  padding: 8px 0;
  min-width: 160px;
}
.nav-dropdown a {
  display: block;
  padding: 6px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}
.nav-dropdown a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}
.dropdown:hover .nav-dropdown,
.dropdown.active .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background-color: rgba(0, 0, 0, 0.98);
}
.mobile-menu.open {
  max-height: 600px;
}
.mobile-menu a {
  display: block;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu a:hover {
  color: #ffffff;
}

/* ========== TILES (Full-bleed sections) ========== */

.tile-dark {
  background-color: #272729;
  color: #ffffff;
}
.tile-white {
  background-color: #ffffff;
  color: #1d1d1f;
}
.tile-parchment {
  background-color: #f5f5f7;
  color: #1d1d1f;
}

/* ========== UTILITY CARD ========== */

.utility-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.utility-card:hover {
  transform: translateY(-2px);
}

/* Focus states — Focus Blue outline */
.pill-primary:focus-visible,
.pill-ghost-light:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}


/* ========== ANIMATIONS ========== */

/* Fade in from bottom */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Hero text step fade */
.hero-step {
  opacity: 0;
  transform: translateY(20px);
  animation: heroStepIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.hero-step-1 { animation-delay: 0.2s; }
.hero-step-2 { animation-delay: 0.5s; }
.hero-step-3 { animation-delay: 0.8s; }

@keyframes heroStepIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale press for all interactive */
.press-scale:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Link styling — Action Blue */
.link-blue {
  color: #0066cc;
  text-decoration: none;
  cursor: pointer;
}
.link-blue:hover {
  text-decoration: underline;
}
/* Email link on dark surfaces — override browser visited color */
.tile-dark a,
.tile-dark a:visited,
.tile-dark a:link {
  color: #ffffff;
}

/* On dark surfaces */
.link-sky {
  color: #2997ff;
  text-decoration: none;
}
.link-sky:hover {
  text-decoration: underline;
}

/* ========== TECH BADGE ========== */

.tech-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 980px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.224px;
  color: #1d1d1f;
  background: #ffffff;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.tech-badge:hover {
  transform: scale(1.05);
  background-color: #f5f5f7;
}
/* Dark surface variant */
.tech-badge-dark {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.224px;
  color: #ffffff;
  background: transparent;
  transition: transform 0.2s ease;
}
.tech-badge-dark:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.06);
}

/* ========== GOOGLE MAPS ========== */

.gmap-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  overflow: hidden;
  border-radius: 18px;
}
.gmap-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== COMPANY INFO TABLE ========== */

.info-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.info-row:last-child {
  border-bottom: none;
}

/* ========== BACK TO TOP ========== */

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 833px) {
  .desktop-nav { display: none !important; }
  #mobile-menu-btn { display: block !important; }
  .tile-dark [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .card-grid-2x2 { grid-template-columns: 1fr !important; }
  .fch-letter-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: center;
  }
  .fch-letter-grid > div:first-child {
    justify-content: center;
  }
  .fch-letter {
    font-size: 80px !important;
  }
}
