/* High-contrast, touch-friendly additions shared by desktop and mobile. */
:root {
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --panel-alt: rgba(241, 245, 249, 0.96);
  --border: rgba(51, 65, 85, 0.18);
  --border-strong: rgba(30, 41, 59, 0.3);
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-mute: #475569;
}

html[data-theme="dark"] {
  --panel: rgba(20, 29, 48, 0.94);
  --panel-strong: rgba(10, 15, 29, 0.98);
  --panel-alt: rgba(20, 27, 46, 0.97);
  --border: rgba(203, 213, 225, 0.2);
  --border-strong: rgba(226, 232, 240, 0.34);
  --ink: #f8fafc;
  --ink-soft: #d7deea;
  --ink-mute: #bac5d6;
}

html,
body {
  font-size: 16px;
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg,
canvas {
  max-width: 100%;
}

:is(.nav, .nav-list, .hero-inner, .about-grid, .card-grid, .contact-grid, .footer-grid) > *,
:is(.about-grid, .card-grid, .contact-grid, .footer-grid) > * {
  min-width: 0;
}

:is(h1, h2, h3, p, a, span, strong, label) {
  overflow-wrap: anywhere;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.glass {
  background: var(--panel);
  border-color: var(--border-strong);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.nav.scrolled,
.section,
.footer {
  background: var(--panel-strong);
}

.nav {
  width: min(1180px, 100%);
}

.nav-list {
  min-width: 0;
}

.section.alt {
  background: var(--panel-alt);
}

.hero-inner {
  width: min(760px, 100%);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: clamp(20px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.88);
  background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.hero-actions .btn {
  max-width: 100%;
}

html[data-theme="dark"] .hero-inner {
  background: rgba(10, 15, 29, 0.88);
  background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.nav-link,
.nav-cta,
.btn,
.marquee span,
.info-row,
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-size: 1rem;
}

.btn,
.nav-cta,
.nav-toggle,
.theme-toggle,
.graphics-toggle,
.language-toggle,
.social-icon {
  min-height: 44px;
  min-width: 44px;
}

.nav-toggle {
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  width: auto;
  min-width: 102px;
  padding: 0 13px 0 38px;
  border-radius: 999px;
}

.theme-toggle .theme-icon {
  left: 12px;
}

.theme-toggle .theme-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  font-size: 0.82rem;
  font-weight: 700;
}

.language-code,
.eyebrow,
.badge,
.tag,
.hero-float small,
.about-mark p,
.stat-label,
.follow-label,
.field label,
.form-note,
.footer-brand-col p,
.footer-col h6,
.footer-col a,
.footer-bottom {
  font-size: 0.875rem;
}

.card p,
.process-step p {
  font-size: 1rem;
  line-height: 1.7;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card,
.about-mark,
.contact-info,
.contact-form {
  min-width: 0;
}

.info-row > div,
.process-step > div:last-child {
  min-width: 0;
}

.info-row a,
.footer a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-form :is(input, select, textarea) {
  width: 100%;
  max-width: 100%;
}

.field label {
  color: var(--ink);
}

.contact-form input,
.contact-form select {
  min-height: 48px;
}

.contact-form textarea {
  min-height: 144px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-mute);
  opacity: 1;
}

@media (max-width: 1180px) {
  .nav-wrap {
    padding-left: max(0.9rem, env(safe-area-inset-left));
    padding-right: max(0.9rem, env(safe-area-inset-right));
  }

  .nav-list {
    width: 100%;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  }

  .theme-toggle {
    min-width: 100%;
    padding-left: 2.7rem;
  }

  .theme-toggle .theme-icon {
    left: 0.7rem;
  }

  .theme-toggle .theme-label {
    font-size: 0.95rem;
    font-weight: 600;
  }
}

@media (max-width: 900px) {
  .section {
    padding-block: 5.25rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .hero {
    min-height: 100dvh;
    padding: calc(var(--nav-h) + 2rem) max(1rem, env(safe-area-inset-right)) 3.5rem max(1rem, env(safe-area-inset-left));
  }

  .hero-title {
    line-height: 1.12;
  }

  .hero-inner {
    padding: 1.5rem 1.15rem;
  }

  .section-head {
    margin-bottom: 2.3rem;
  }

  .section-head h2,
  .about-copy h3 {
    text-wrap: balance;
  }

  .process-step {
    gap: 1rem;
  }

  .contact-info,
  .contact-form,
  .card,
  .about-mark {
    padding: 1.5rem 1.25rem;
  }

  .footer {
    padding-bottom: calc(1.8rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-inline: max(1rem, env(safe-area-inset-left));
  }

  .nav {
    padding: 0.55rem 0.65rem 0.55rem 0.8rem;
  }

  .brand-logo-frame {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding: 4.25rem 0;
  }

  .hero-title {
    font-size: clamp(1.9rem, 10.5vw, 2.45rem);
  }

  .hero-sub {
    font-size: 1rem;
    line-height: 1.65;
  }

  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .process::before {
    left: 23px;
  }

  .step-num {
    width: 48px;
    height: 48px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-brand-col {
    grid-column: auto;
  }
}

@media (max-width: 360px) {
  .nav-wrap {
    padding-top: 0.45rem;
  }

  .hero-inner,
  .contact-info,
  .contact-form,
  .card,
  .about-mark {
    padding-inline: 1rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .process-step {
    align-items: flex-start;
  }

  .process::before {
    display: none;
  }

  .step-num {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
  }

  .nav-list {
    max-height: calc(100dvh - 82px);
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(15, 23, 42, 0.38);
    --border-strong: rgba(15, 23, 42, 0.58);
  }

  html[data-theme="dark"] {
    --border: rgba(248, 250, 252, 0.38);
    --border-strong: rgba(248, 250, 252, 0.62);
  }
}
