@import url("brand/tokens.css");

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 var(--space-4);
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
}
h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p  { margin: 0 0 var(--space-4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pulse);
  margin-bottom: var(--space-4);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-9) 0;
}
.section--cloud { background: var(--cloud); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink h2, .section--ink h3 { color: var(--white); }

/* ---------- Header (dark ink) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 31, 68, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand img { height: 26px; }
.menu {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.menu a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
}
.menu a:hover { color: var(--turquoise); text-decoration: none; }
.menu .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}
.menu .btn-secondary:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: #0d2956; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--mist);
}
.btn-secondary:hover { border-color: var(--ink); text-decoration: none; }
.btn-link {
  font-weight: 600;
  color: var(--pulse);
}
.btn-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 55% 60% at 88% 18%, rgba(25, 211, 224, 0.20), transparent 65%),
    radial-gradient(ellipse 45% 50% at 12% 85%, rgba(46, 107, 246, 0.10), transparent 70%),
    linear-gradient(180deg, var(--cloud) 0%, var(--white) 95%);
  padding: var(--space-9) 0 var(--space-8);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero .container { position: relative; z-index: 1; }
.hero .mark {
  width: 56px;
  height: auto;
  margin-bottom: var(--space-5);
  opacity: 0.95;
}
.hero h1 {
  max-width: 22ch;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  background: var(--cahow-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .lede {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  margin-top: var(--space-3);
}
.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ---------- Services (What we do) ---------- */
.services {
  border-top: 1px solid var(--border);
}
.services .heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 64ch;
  margin-bottom: var(--space-7);
}
.services .heading p { color: var(--text-muted); margin: 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}
.service {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cahow-gradient);
  opacity: 0.85;
}
.service:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service .num {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--pulse);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.service h3 { margin: 0; }
.service p { color: var(--text-muted); margin: 0; }

/* ---------- Clients ---------- */
.clients .label {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  text-align: center;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-9);
  row-gap: var(--space-7);
}
.clients-row img {
  /* baseline height — source files cropped to tight bounding box */
  height: 40px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
/* Wordmark-only logos with very wide aspect ratios fill more horizontal
   space at the same height, so dial them down to balance the strip. */
.clients-row img[alt="Coinbase"]  { height: 30px; }
.clients-row img[alt="Freetrade"] { height: 32px; }

.clients-row img:hover { opacity: 1; filter: grayscale(0%); }

/* ---------- Why (dark anchor section) ---------- */
.why {
  background: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.why::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 60%;
  background:
    radial-gradient(ellipse 40% 80% at 90% 50%, rgba(25, 211, 224, 0.18), transparent 70%),
    radial-gradient(ellipse 30% 60% at 5% 0%, rgba(46, 107, 246, 0.18), transparent 70%);
  pointer-events: none;
}
.why .container { position: relative; z-index: 1; }
.why .heading { max-width: 52ch; margin-bottom: var(--space-7); }
.why .heading h2 { color: var(--white); }
.why .heading p { color: rgba(255, 255, 255, 0.72); margin: 0; }
.why .heading .eyebrow { color: var(--turquoise); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-7);
}
.why-item h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: var(--space-3);
}
.why-item p { color: rgba(255, 255, 255, 0.72); margin: 0; }
.why-item .accent {
  width: 32px;
  height: 2px;
  background: var(--turquoise);
  margin-bottom: var(--space-4);
}

/* ---------- About (cahow) ---------- */
.about p {
  max-width: 64ch;
  color: var(--text-muted);
}
.about p strong { color: var(--ink); font-weight: 500; }

/* ---------- Legal pages (Privacy / Terms) ---------- */
.legal { background: var(--white); }
.legal-content { max-width: 720px; }
.legal-content h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: var(--space-3) 0 var(--space-2);
  color: var(--ink);
}
.legal-content .updated {
  color: var(--text-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--space-7);
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: var(--space-6) 0 var(--space-3);
}
.legal-content p { color: var(--text-muted); }
.legal-content p a { color: var(--pulse); }
.legal-content ul {
  color: var(--text-muted);
  padding-left: var(--space-5);
  margin: 0 0 var(--space-4);
}
.legal-content li { margin-bottom: var(--space-2); line-height: var(--lh-body); }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--white);
  padding: var(--space-8) 0;
}
.cta-strip h2 { color: var(--white); margin-bottom: var(--space-3); }
.cta-strip p { color: rgba(255, 255, 255, 0.78); max-width: 50ch; margin-bottom: var(--space-6); }
.cta-strip .btn-primary {
  background: var(--white);
  color: var(--ink);
}
.cta-strip .btn-primary:hover { background: var(--cloud); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-7) 0 var(--space-6);
  font-size: var(--fs-small);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.site-footer .col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--turquoise);
  margin: 0 0 var(--space-3);
}
.site-footer .col p, .site-footer .col a {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 var(--space-2);
}
.site-footer .col a:hover { color: var(--white); }
.site-footer img.brand-mark { height: 22px; margin-bottom: var(--space-3); }
.site-footer .bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-4);
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .menu a:not(.btn) { display: none; }
  .site-footer .row { grid-template-columns: 1fr; }
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 2px;
  border-radius: 4px;
}
