/*
 * GearSafe marketing site.
 * Tokens mirror the `Gear Safe` Figma file (Design System v2 — Prototype 2.0),
 * as implemented in the app at src/constants/gear-vault-theme.ts.
 * Standing rule: "Look like GearSafe. Behave like iOS."
 */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Semantic color */
  --bg-canvas: #07080b;
  --bg-surface: #181a23;
  --bg-elevated: #22242e;
  --bg-accent-subtle: #422d06;
  --bg-success-subtle: #0f3321;
  --bg-info-subtle: #142a45;
  --text-primary: #f6f7fb;
  --text-secondary: #9ea4b5;
  --text-accent: #ffb530;
  --text-inverse: #000000;
  --text-success: #4fde8c;
  --text-info: #60a5fa;
  --border-default: #383c4a;
  --border-soft: #343846;
  --border-focus: #ffb530;
  --nav-bg: rgba(17, 19, 26, 0.98);
  --nav-pill: #1b1e27;
  --nav-inactive: #8f94a3;

  /* Measures */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-control: 16px;
  --radius-card: 18px;
  --radius-lg: 20px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --touch-min: 44px;

  /* Effects */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-floating: 0 28px 70px rgba(0, 0, 0, 0.5);
  --focus-amber: 0 0 0 3px rgba(255, 181, 48, 0.4);

  --page-max: 1120px;
  --gutter: clamp(16px, 5vw, 24px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-amber);
  border-radius: var(--radius-sm);
}

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--text-accent);
  color: var(--text-inverse);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 11, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  min-height: var(--touch-min);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 12px;
  color: var(--nav-inactive);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.nav a:hover {
  color: var(--text-primary);
  background: var(--nav-pill);
}

@media (max-width: 720px) {
  .nav .nav-link {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 120ms ease, background-color 120ms ease;
}

.btn:active {
  opacity: 0.86;
}

.btn-primary {
  background: var(--text-accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: #ffb833;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
}

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: var(--text-inverse);
  background: var(--text-accent);
}

.nav a.btn-primary:hover {
  background: #ffb833;
}

.nav .btn {
  border-radius: var(--radius-control);
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  margin-left: 6px;
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-subtle);
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.04;
  font-weight: 800;
}

h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.12;
  font-weight: 800;
}

h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.lede {
  margin: 20px 0 0;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 19px);
}

.accent {
  color: var(--text-accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 104px) clamp(56px, 8vw, 96px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(closest-side, rgba(255, 181, 48, 0.14), rgba(255, 181, 48, 0));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--nav-inactive);
  font-size: 13px;
}

/* ---------- Device mock (illustrative, built from app tokens) ---------- */

.device {
  justify-self: center;
  width: min(100%, 360px);
  padding: 12px;
  border-radius: 46px;
  background: #0d0e13;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-floating);
}

.screen {
  border-radius: 36px;
  background: var(--bg-canvas);
  padding: 22px 16px 14px;
  overflow: hidden;
}

.screen-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px 6px 16px;
}

.screen-title {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 800;
}

.screen-sub {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.value-card {
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  margin-bottom: 12px;
}

.value-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.value-amount {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.value-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.chip-success {
  background: var(--bg-success-subtle);
  color: var(--text-success);
}

.chip-accent {
  background: var(--bg-accent-subtle);
  color: var(--text-accent);
}

.chip-info {
  background: var(--bg-info-subtle);
  color: var(--text-info);
}

.gear-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  margin-bottom: 8px;
}

.gear-thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-accent);
}

.gear-thumb svg {
  width: 22px;
  height: 22px;
}

.gear-body {
  min-width: 0;
  flex: 1;
}

.gear-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-detail {
  color: var(--text-secondary);
  font-size: 12px;
}

.gear-value {
  font-size: 13px;
  font-weight: 700;
}

.tabbar {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  padding: 8px;
  border-radius: 22px;
  background: var(--nav-bg);
  border: 1px solid var(--border-soft);
}

.tab {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 17px;
  color: var(--nav-inactive);
  font-size: 10px;
  font-weight: 700;
}

.tab svg {
  width: 20px;
  height: 20px;
}

.tab.is-active {
  background: var(--nav-pill);
  color: #ffb833;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 104px);
  border-top: 1px solid var(--border-soft);
}

.section-head {
  max-width: 40em;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.section-head p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}

.card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-accent-subtle);
  color: var(--text-accent);
  display: grid;
  place-items: center;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-default);
  background: linear-gradient(180deg, var(--bg-surface), rgba(24, 26, 35, 0.4));
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--text-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.steps p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Privacy ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.checklist .tick {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--bg-success-subtle);
  color: var(--text-success);
  display: grid;
  place-items: center;
}

.checklist .tick svg {
  width: 16px;
  height: 16px;
}

.checklist strong {
  display: block;
  font-size: 15px;
}

.checklist span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Partners / contact ---------- */

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-sheet);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 181, 48, 0.12), rgba(255, 181, 48, 0) 55%),
    var(--bg-surface);
  border: 1px solid var(--border-default);
}

@media (max-width: 820px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  text-decoration: none;
}

.contact-list a:hover {
  border-color: var(--text-accent);
}

.contact-list .label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-list .addr {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--border-soft);
  color: var(--nav-inactive);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ---------- Legal page ---------- */

.legal {
  padding-block: clamp(48px, 8vw, 88px);
}

.legal article {
  max-width: 44em;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 46px);
}

.legal .updated {
  margin: 12px 0 0;
  color: var(--nav-inactive);
  font-size: 14px;
}

.legal h2 {
  margin-top: 44px;
  font-size: 22px;
}

.legal p,
.legal li {
  color: var(--text-secondary);
}

.legal li + li {
  margin-top: 6px;
}

.legal strong {
  color: var(--text-primary);
}

.callout {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--bg-accent-subtle);
  border: 1px solid rgba(255, 181, 48, 0.35);
  color: var(--text-primary);
}

.callout p {
  margin: 0;
  color: var(--text-primary);
}

/* ---------- Layout refinements ---------- */

/* Section eyebrows keep their pill style inside section heads and panels. */
.section-head .eyebrow,
.panel .eyebrow {
  margin: 0 0 16px;
  color: var(--text-accent);
  font-size: 12px;
}

/* Feature cards: 4-up on wide screens, 2x2 on tablets, stacked on phones. */
.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Contact rows: label above address so long addresses never break mid-word. */
.contact-list a {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 16px;
}

.contact-list .addr {
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 380px) {
  .contact-list .addr {
    font-size: 13px;
  }
}

.legal .eyebrow {
  margin: 0 0 16px;
  color: var(--text-accent);
  font-size: 12px;
}

/* ---------- Partners list + single contact card ---------- */

.partner-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  font-size: 15px;
  font-weight: 600;
}

.partner-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--text-accent);
  box-shadow: 0 0 0 4px var(--bg-accent-subtle);
}

.contact {
  text-align: center;
}

.contact-card {
  max-width: 640px;
  margin: 0 auto;
}

.contact-card .eyebrow {
  margin: 0 0 16px;
  color: var(--text-accent);
  font-size: 12px;
}

.contact-card > p:not(.eyebrow) {
  margin: 14px auto 0;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: 17px;
}

.contact-address {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  min-height: 60px;
  padding: 0 24px 0 12px;
  border-radius: var(--radius-control);
  background: var(--text-accent);
  color: var(--text-inverse);
  font-size: clamp(16px, 3.6vw, 19px);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: background-color 120ms ease, opacity 120ms ease;
}

.contact-address:hover {
  background: #ffb833;
}

.contact-address:active {
  opacity: 0.86;
}

.contact-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.14);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}
