/* TapBridg — coming soon (shared by / and /en/) */
:root {
  --ink: #0B1324;
  --ink-700: #344054;
  --text-secondary: #667085;
  --canvas: #FBFBFC;
  --white: #FFFFFF;
  --surface-subtle: #F6F7F9;
  --border: #E3E7EC;
  --border-strong: #D0D5DD;
  --teal-500: #17B8B2;
  --teal-700: #078F8A;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: 16px;
  --header-h: 64px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (min-width: 768px) { :root { --gutter: 24px; --header-h: 72px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell { width: 100%; max-width: calc(1120px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 251, 252, 0.92); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid transparent; transition: border-color 220ms var(--ease); }
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; }
.logo svg { width: 34px; height: 22px; color: var(--ink); }
/* Official two-tone logo (assets/tapbridg_logo.svg) on light surfaces; the footer keeps it white */
.site-header .logo svg, .mark { --logo-upper: #12202e; --logo-lower: #404a58; }
.logo span { font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-700); border-radius: 8px; transition: color 140ms var(--ease); }
@media (hover: hover) { .nav-links a:hover { color: var(--ink); } }
@media (max-width: 479px) { .nav-links a:first-child { display: none; } }

/* Hero */
.hero { position: relative; min-height: min(calc(100svh - var(--header-h)), 860px); display: grid; place-items: center; text-align: center; padding-block: 48px 112px; }
.hero-inner { display: grid; justify-items: center; gap: 24px; }

/* Logo motion graphic: the two halves of the bridge meet, then a tap lands on it */
.mark { position: relative; width: 168px; height: 112px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 24px; touch-action: manipulation; }
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark .half-right { fill: var(--logo-upper); }
.mark .half-left { fill: var(--logo-lower); }
.mark .tap { fill: var(--teal-500); opacity: 0; transform-box: fill-box; transform-origin: center; }
.mark .bridge { transform-origin: 62px 73px; transform-box: view-box; }
.mark:active .bridge { transform: scale(0.96); transition: transform 100ms var(--ease); }
.play .half-right { animation: inFromRight 900ms var(--ease) 120ms both; }
.play .half-left { animation: inFromLeft 900ms var(--ease) 220ms both; }
.play .tap { animation: tapDrop 700ms var(--ease) 950ms both; }
.play .bridge { animation: press 420ms var(--ease) 1260ms both; }
@keyframes inFromRight { from { opacity: 0; transform: translate(22px, -10px); } to { opacity: 1; transform: none; } }
@keyframes inFromLeft { from { opacity: 0; transform: translate(-22px, 10px); } to { opacity: 1; transform: none; } }
@keyframes tapDrop {
  0% { opacity: 0; transform: translateY(-26px); }
  35% { opacity: 1; }
  55% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0) scale(0.4); }
}
@keyframes press { 0% { transform: none; } 30% { transform: scale(0.95); } 100% { transform: none; } }

.overline { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-700); }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.125; max-width: 760px; }
.cycle { font-size: 18px; line-height: 28px; color: var(--text-secondary); }
.rot { display: inline-block; position: relative; height: 28px; vertical-align: bottom; overflow: hidden; text-align: left; color: var(--ink); font-weight: 600; }
.rot span { display: block; white-space: nowrap; }
.contact { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.contact b { color: var(--ink); font-weight: 500; user-select: all; }

.fade-up { opacity: 0; transform: translateY(12px); animation: fadeUp 600ms var(--ease) both; }
.d1 { animation-delay: 1400ms; } .d2 { animation-delay: 1520ms; } .d3 { animation-delay: 1640ms; } .d4 { animation-delay: 1760ms; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.scroll-cue { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--ink-700); border-radius: 12px; white-space: nowrap; }
.scroll-cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .scroll-cue:hover { color: var(--ink); } }
.hero-controls { position: absolute; right: var(--gutter); bottom: 24px; display: flex; gap: 8px; }
.motion-toggle, .sound-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); display: grid; place-items: center; cursor: pointer; color: var(--ink-700); transition: transform 100ms var(--ease); }
.motion-toggle:active, .sound-toggle:active { transform: scale(0.94); }
.motion-toggle svg, .sound-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.sound-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle .i-off { display: none; }
.sound-toggle[aria-pressed="false"] .i-on { display: none; }
.sound-toggle[aria-pressed="false"] .i-off { display: block; }
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }

/* About — what TapBridg is (for visitors and service reviewers) */
.about { padding-block: 64px 96px; background: var(--white); border-top: 1px solid var(--border); scroll-margin-top: var(--header-h); }
@media (min-width: 1024px) { .about { padding-block: 112px; } }
.about-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; } }
.about h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.17; }
.about-body { display: grid; gap: 16px; max-width: 640px; }
.about-body h3 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: 0; margin-top: 16px; }
.about-body p { font-size: 16px; line-height: 24px; color: var(--ink-700); }
.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; font-size: 15px; line-height: 22px; color: var(--ink-700); }
.points svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--teal-700); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--border); font-size: 14px; line-height: 20px; }
.legal-links a { color: var(--teal-700); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; padding-block: 12px; }

/* Footer */
footer { background: var(--ink); color: #B6BDC8; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-inner { display: grid; gap: 16px; justify-items: center; align-items: center; text-align: center; padding-block: 40px; font-size: 14px; line-height: 20px; }
footer .logo svg { color: var(--white); width: 28px; height: 18px; }
footer .logo span { color: var(--white); font-size: 16px; }
.footer-legal { display: flex; gap: 8px; }
.footer-legal a { padding: 12px; color: var(--white); border-radius: 8px; }
@media (hover: hover) { .footer-legal a:hover { text-decoration: underline; text-underline-offset: 4px; } }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: auto 1fr auto auto; justify-items: start; text-align: left; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .play .half-right, .play .half-left { animation: fadeIn 400ms linear both; }
  .play .tap, .play .bridge { animation: none; }
  .fade-up { transform: none; animation-name: fadeIn; animation-duration: 300ms; }
  .d1, .d2, .d3, .d4 { animation-delay: 200ms; }
  .mark:active .bridge { transform: none; }
  .motion-toggle { display: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--canvas); backdrop-filter: none; -webkit-backdrop-filter: none; } }

@media (max-width: 559px) { .scroll-cue { left: var(--gutter); transform: none; padding-left: 0; } }
