/* TAK Sync — website styles (v2: flat, modern, no glow/shadow chrome) */

*, *::before, *::after { box-sizing: border-box; }

/* Disable text selection across the site (per UX request). Inputs remain
   editable / focus-selectable so people can still type the OTP. */
html, body, .container, .tak-header, .hero, .features, .feature, .steps, .step,
.flow-card, .footer, .tak-modal, .tak-modal-panel, .prose, .pair-progress,
.secure-loader, .btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

:root {
  --bg: #ffffff;
  --bg-soft: #F4F6FB;
  --bg-muted: #EBEFF7;
  --border: #DDE3EF;
  --border-strong: #C2CADC;
  --text: #0E1638;
  --text-muted: #3A4470;
  --text-soft: #5A6488;
  --brand: #2E34BA;
  --brand-dark: #1A2246;
  --brand-darker: #0F1638;
  --accent: #5495FC;
  --accent-soft: #EEF3FF;
  --accent-lime: #A2FF7B;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 16px;
  --radius-lg: 26px;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

a { color: var(--brand); text-decoration: none; transition: color .12s ease; }
a:hover { color: var(--brand-dark); text-decoration: none; }

img { display: block; max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px 22px 80px; }

/* ---------- Header ---------- */
.tak-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 28px;
}
.tak-header .brand { display: flex; align-items: center; gap: 10px; }
.tak-header .brand img { height: 32px; width: auto; }
.tak-header .brand-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.tak-header .nav { display: flex; gap: 6px; align-items: center; }
.tak-header .nav a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .12s ease, color .12s ease;
}
.tak-header .nav a:hover { background: var(--bg-soft); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(46,52,186,0.22) 0%, rgba(46,52,186,0) 55%),
    radial-gradient(70% 90% at -5% 110%, rgba(162,255,123,0.28) 0%, rgba(162,255,123,0) 60%),
    radial-gradient(80% 110% at 50% 100%, rgba(84,149,252,0.16) 0%, rgba(84,149,252,0) 65%),
    linear-gradient(160deg, #1A2246 0%, #2E34BA 100%);
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius-lg);
  padding: 36px 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  color: #fff;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--accent-lime);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.hero .eyebrow svg { width: 12px; height: 12px; }

.hero h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 12px 0;
  color: #fff;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent-lime), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.hero p.lede {
  font-size: 14.5px;
  color: rgba(255,255,255,0.78);
  margin: 0 0 20px 0;
  max-width: 480px;
}

.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.phone-frame {
  justify-self: end;
  display: flex; align-items: center; justify-content: center;
}
.phone-frame img {
  width: 160px; height: auto;
  border-radius: 22px;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.35));
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; text-align: left; }
  .hero h1 { font-size: 26px; }
  .phone-frame { justify-self: center; }
  .phone-frame img { width: 130px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: va

/* On the dark hero background, recolor the CTA so it pops against the
   deep-blue gradient — lime-green-tinted glass with white text. */
.hero .btn-primary {
  background: linear-gradient(135deg, var(--accent-lime) 0%, var(--accent) 100%);
  border-color: transparent;
  color: var(--brand-darker);
  font-weight: 700;
}
.hero .btn-primary:hover {
  background: linear-gradient(135deg, #B7FF94 0%, #6FA9FF 100%);
  border-color: transparent;
  color: var(--brand-darker);
}
.hero .btn-ghost {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero .btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}r(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:active { background: var(--brand-darker); border-color: var(--brand-darker); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); border-color: var(--border-strong); }

.btn-block { width: 100%; }

/* ---------- Feature cards ---------- */
.section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 36px 0 14px;
  color: var(--text);
}
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color .12s ease, background .12s ease;
}
.feature:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.feature .icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.feature .icon svg { width: 16px; height: 16px; }
.feature h3 { margin: 0 0 4px; font-size: 14px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--text-muted); font-size: 13px; }

@media (max-width: 800px) { .features { grid-template-columns: 1fr; } }

/* ---------- How-it-works steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.step .num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  margin-bottom: 10px;
}
.step h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; }
.step p { margin: 0; color: var(--text-muted); font-size: 12.5px; }

@media (max-width: 800px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Flow card (pairing) ---------- */
.flow-card {
  max-width: 560px;
  margin: 32px auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.flow-card .step-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.flow-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.flow-card p { color: var(--text-muted); font-size: 15px; margin: 0 0 22px; }

/* ---------- OTP ---------- */
.otp-display { display: flex; justify-content: center; gap: 8px; margin: 20px 0 8px; flex-wrap: wrap; }
.otp-display .digit {
  width: 48px; height: 60px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.otp-input { display: flex; justify-content: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.otp-input input {
  width: 48px; height: 60px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color .12s ease;
}
.otp-input input:focus { border-color: var(--brand); }
.otp-input input.error { border-color: var(--danger); }

.hint { color: var(--text-soft); font-size: 13.5px; text-align: center; margin: 8px 0 0; }
.hint .countdown { color: var(--text); font-weight: 600; }

.alert {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 0 0 18px;
}
.alert.success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }

.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--bg-muted);
  border-top-color: var(--brand);
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.flow-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.flow-actions .btn { flex: 1; min-width: 140px; }

/* ---------- Long-form pages (privacy / terms) ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
}
.prose h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.prose .updated { color: var(--text-soft); font-size: 13.5px; margin: 0 0 28px; }
.prose h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 8px;
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 12px; color: var(--text-muted); font-size: 15px; }
.prose ul { margin: 0 0 12px 18px; padding: 0; color: var(--text-muted); font-size: 15px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--brand); }
.prose a:hover { color: var(--brand-dark); text-decoration: underline; }
.prose code { background: var(--bg-muted); padding: 1px 6px; border-radius: 4px; font-size: 13.5px; }

@media (max-width: 600px) { .prose { padding: 28px 22px; } }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 36px 4px 0;
  color: var(--text-soft);
  font-size: 13.5px;
}
.footer .links { display: flex; gap: 18px; }
.footer .links a { color: var(--text-soft); }
.footer .links a:hover { color: var(--text); }

/* ---------- Centered flow cards ---------- */
.flow-card.centered { text-align: center; padding: 40px 36px; margin-top: 40px; }
.flow-card.centered h2 { margin: 0 0 14px; }
.flow-card.centered p { margin: 0 auto 28px; max-width: 440px; }
.flow-card.centered .flow-actions { justify-content: center; margin-top: 28px; }
.flow-card.centered .otp-display,
.flow-card.centered .otp-input { margin: 24px auto 10px; }

/* ---------- Pair progress (4 icons + connector) ---------- */
.pair-progress {
  list-style: none;
  padding: 0;
  margin: 28px auto 0;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.pair-progress::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 12.5%; right: 12.5%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.pair-progress li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pair-progress li .ic {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.pair-progress li .lb {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}
.pair-progress li.current .ic { border-color: var(--brand); color: var(--brand); }
.pair-progress li.current .lb { color: var(--text); font-weight: 600; }
.pair-progress li.done .ic { background: var(--brand); border-color: var(--brand); color: #fff; }
.pair-progress li.done .lb { color: var(--text); }

/* ---------- Secure unlock loader ---------- */
.secure-loader {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; margin: 24px auto 8px;
}
.secure-loader-ring {
  position: relative;
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.secure-loader-ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid #E2E8F0;
  border-top-color: #2e34ba;
  border-right-color: #5495fc;
  animation: secureSpin 1s linear infinite;
}
.secure-lock { position: relative; z-index: 1; }
@keyframes secureSpin { to { transform: rotate(360deg); } }
.secure-loader-text {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
}

/* ---------- Glass-blur modal (Privacy / Terms) ---------- */
.tak-modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity .18s ease;
}
.tak-modal.open { display: flex; opacity: 1; }
.tak-modal-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  max-width: 560px; width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px 36px 28px;
  color: var(--text);
  -webkit-user-select: text;
  user-select: text;
}
.tak-modal-panel h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tak-modal-panel h3 {
  margin: 18px 0 6px;
  font-size: 14.5px;
  font-weight: 600;
}
.tak-modal-panel p,
.tak-modal-panel ul { font-size: 14px; color: var(--text-muted); margin: 0 0 10px; }
.tak-modal-panel ul { padding-left: 18px; }
.tak-modal-panel li { margin: 3px 0; }
.tak-modal-updated { font-size: 12px; color: var(--text-soft); margin: 0 0 16px !important; }
.tak-modal-close {
  position: absolute; top: 10px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-size: 24px; line-height: 1;
  color: var(--text-soft);
  cursor: pointer; border-radius: 8px;
}
.tak-modal-close:hover { background: rgba(0,0,0,0.05); color: var(--text); }

@media (max-width: 600px) {
  .tak-modal-panel { padding: 24px 22px 20px; }
  .pair-progress li .lb { font-size: 11px; }
  .flow-card.centered { padding: 28px 22px; }
}

/* ---------- Skeleton sweep (initial-load shimmer) ---------- */
@keyframes tak-sweep {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(220%)  skewX(-18deg); }
}
.skel { position: relative; overflow: hidden; }
.skel::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0) 100%);
  animation: tak-sweep 0.95s ease-out 1;
  pointer-events: none;
  z-index: 5;
}
/* Darker variant for the deep-blue hero so the sweep is visible. */
.hero.skel::after {
  background: linear-gradient(90deg,
    rgba(162,255,123,0) 0%,
    rgba(162,255,123,0.22) 50%,
    rgba(84,149,252,0) 100%);
}
