/*
  Double Field Corp. — Brand Design System
  Typography: Plus Jakarta Sans (Apple-adjacent, humanist, free)
  Brand: Precision · Tokyo × New York · Clean Velocity
  Colors based on "Pattern C — Clean Velocity" brief
*/

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

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
*:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }
html { scroll-behavior: smooth; }

/* ─── DESIGN TOKENS ─── */
:root {
  /* Brand Colors — Pattern C: Clean Velocity */
  --electric:    #2563eb;   /* Electric Blue — primary CTA, accents */
  --electric-dk: #1d4ed8;   /* Deeper blue for hover states */
  --midnight:    #1e293b;   /* Near-black — headings, nav, footer */
  --midnight-dk: #0f172a;   /* Deepest dark — footer bg */
  --emerald:     #10b981;   /* Emerald — success, trust badges */
  --ice:         #eff6ff;   /* Ice Blue — subtle bg tints */

  /* Neutral Palette */
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --gray-50:     #f1f5f9;
  --gray-100:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-700:    #334155;
  --text:        #1e293b;   /* Body text */
  --muted:       #64748b;   /* Secondary text */
  --border:      #e2e8f0;   /* Default border */

  /* Typography */
  --font-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem) 5%;
  --max-w: 1140px;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── BASE ─── */
body {
  font-family: var(--font-base);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

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

/* ─── GLOBAL NAV ─── */
.df-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(226,232,240,0.7);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.df-nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 24px rgba(0,0,0,0.07);
}
.df-nav--dark {
  background: rgba(15,23,42,0.6);
  border-bottom-color: rgba(255,255,255,0.08);
}
.df-nav--dark.scrolled {
  background: rgba(15,23,42,0.96);
}

/* Logo */
.df-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.df-logo-mark {
  /* SVG logo — transparent background, dark-green #0E3319 fill */
  height: 32px;
  width: auto;
  flex-shrink: 0;
  display: block;
  transition: filter 0.2s;
  /* No blend mode needed — SVG has genuine transparency */
}
/* On dark nav (QII page): invert the dark-green to white */
.df-nav--dark .df-logo-mark {
  filter: brightness(0) invert(1);
}
.df-logo-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--midnight);
  line-height: 1;
}
.df-logo-text span { color: var(--electric); }
.df-nav--dark .df-logo-text { color: #fff; }
.df-nav--dark .df-logo-text span { color: #60a5fa; }

/* Nav links */
.df-nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}
.df-nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.df-nav-links a:hover { color: var(--midnight); }
.df-nav--dark .df-nav-links a { color: rgba(255,255,255,0.65); }
.df-nav--dark .df-nav-links a:hover { color: #fff; }
.df-nav-links a.active { color: var(--electric); }
.df-nav--dark .df-nav-links a.active { color: #60a5fa; }

/* Nav CTA */
.df-nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile menu */
.df-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.df-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--midnight);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.df-nav--dark .df-hamburger span { background: #fff; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--r-sm);
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--electric);
  color: #fff;
  border-color: var(--electric);
}
.btn--primary:hover {
  background: var(--electric-dk);
  border-color: var(--electric-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.75);
}
.btn--outline {
  background: transparent;
  color: var(--electric);
  border-color: var(--electric);
}
.btn--outline:hover {
  background: var(--electric);
  color: #fff;
}
.btn--dark {
  background: var(--midnight);
  color: #fff;
  border-color: var(--midnight);
}
.btn--dark:hover {
  background: var(--midnight-dk);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}
.btn--lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

/* ─── SECTION STRUCTURE ─── */
.section { padding: var(--section-pad); }
.section--light { background: var(--off-white); }
.section--ice   { background: var(--ice); }
.section--dark  { background: var(--midnight); color: rgba(255,255,255,0.85); }

.section-inner {
  max-width: var(--max-w);
  margin-inline: auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 0.75rem;
}
.section--dark .section-label { color: #93c5fd; }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--midnight);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.section--dark .section-title { color: #fff; }

.section-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 660px;
}
.section--dark .section-body { color: rgba(255,255,255,0.65); }

.divider {
  width: 36px;
  height: 2px;
  background: var(--electric);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.section--dark .divider { background: #60a5fa; }

/* ─── CARDS ─── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--electric);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card:hover::before { transform: scaleX(1); }

.card-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 0.75rem;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--midnight);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.card-body {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.85;
}

/* ─── TRUST BADGES ─── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--midnight);
}
.trust-badge::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ─── STAT ITEMS ─── */
.stat-item { text-align: center; }
.stat-num {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--electric);
  letter-spacing: -0.03em;
  line-height: 1;
}
.section--dark .stat-num { color: #93c5fd; }
.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}
.section--dark .stat-label { color: rgba(255,255,255,0.5); }

/* ─── FOOTER ─── */
.df-footer {
  background: var(--midnight-dk);
  color: rgba(255,255,255,0.5);
  padding: 3rem 5%;
  font-size: 0.85rem;
}
.df-footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.df-footer-logo { color: #fff; font-weight: 700; font-size: 1rem; }
.df-footer-logo span { color: #60a5fa; }
.df-footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.df-footer-links a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}
.df-footer-links a:hover { color: rgba(255,255,255,0.9); }
.df-footer-copy { color: rgba(255,255,255,0.35); font-size: 0.8rem; }

/* ─── LANG TOGGLE ─── */
.lang-toggle {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--r-pill);
  overflow: hidden;
  padding: 2px;
  gap: 2px;
}
.lang-toggle button {
  padding: 0.25rem 0.8rem;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-base);
  background: transparent;
  color: var(--muted);
  border-radius: var(--r-pill);
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.lang-toggle button.active {
  background: var(--midnight);
  color: white;
}

/* ─── FORMS ─── */
.form-group { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-base);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* ─── UTILITIES ─── */
.hidden { display: none !important; }
.en, .ja { transition: opacity 0.15s; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-xs { margin-top: 0.5rem; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .df-nav-links { display: none; }
  .df-hamburger { display: flex; }
  .df-nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--white);
    padding: 2rem 5%;
    gap: 1.5rem;
    z-index: 199;
    border-top: 1px solid var(--border);
  }
  .df-nav-links.open a { font-size: 1.1rem; color: var(--midnight); }
  .form-row { grid-template-columns: 1fr; }
  .df-footer-inner { flex-direction: column; text-align: center; }
  .df-footer-links { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}
