/* Cotidal marketing site — built on the Cotidal Design System tokens */
@import url('./tokens/fonts.css');
@import url('./tokens/colors.css');
@import url('./tokens/typography.css');
@import url('./tokens/spacing.css');
@import url('./tokens/base.css');

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: var(--color-bg); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--container-lg); margin: 0 auto; padding: 0 32px; }
.wrap-md { max-width: var(--container-md); margin: 0 auto; padding: 0 32px; }

section { padding: 96px 0; }
section.tight { padding: 72px 0; }
.bg-subtle { background: var(--color-bg-subtle); }
.bg-muted { background: var(--surface-muted); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 18px;
}
.eyebrow.on-navy { color: var(--green-400); }
h1 { font-size: clamp(38px, 5.2vw, 62px); letter-spacing: var(--tracking-tighter); line-height: 1.06; }
h2 { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: var(--tracking-tighter); }
h3 { font-size: var(--text-xl); }
.lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-body); }
.muted { color: var(--text-muted); }
.on-navy { color: var(--text-inverse); }
.on-navy h1, .on-navy h2, .on-navy h3 { color: var(--text-inverse); }
.on-navy p { color: rgba(255,255,255,0.78); }
.section-head { max-width: 720px; margin-bottom: 56px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 700;
  padding: 14px 26px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--primary-press); transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--primary-soft); border-color: var(--border-brand); }
.btn-ghost-inverse { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-ghost-inverse:hover { background: rgba(255,255,255,0.16); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.textlink { color: var(--primary); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.textlink svg { transition: transform var(--dur-base) var(--ease-out); }
.textlink:hover { text-decoration: none; }
.textlink:hover svg { transform: translateX(3px); }

/* ---------- Navy surfaces ---------- */
.tide {
  position: relative; overflow: hidden;
  background: var(--gradient-tide); color: var(--text-inverse);
}
.tide::before {
  content: ""; position: absolute; inset: -40% -10% auto -30%; height: 160%;
  background:
    radial-gradient(60% 70% at 30% 20%, rgba(45,123,240,0.30), transparent 70%),
    radial-gradient(50% 60% at 85% 80%, rgba(23,232,105,0.10), transparent 70%);
  pointer-events: none;
}
.tide > * { position: relative; z-index: 1; }
.dots-layer {
  position: absolute; inset: 0; color: #fff; pointer-events: none;
  background-image: radial-gradient(currentColor 1.5px, transparent 1.6px);
  background-size: 22px 22px; opacity: 0.10;
}
.orbit-mark {
  position: absolute; pointer-events: none; opacity: 0.10;
  right: -110px; bottom: -140px; width: 460px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container-lg); margin: 0 auto; padding: 0 32px;
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--text-body); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--primary); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px; cursor: pointer; color: var(--text-strong);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; font-size: var(--text-lg); }
.card p { color: var(--text-body); font-size: 15.5px; line-height: var(--leading-relaxed); }
.card p:last-child { margin-bottom: 0; }
.card-navy {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-inverse);
  box-shadow: none; color: var(--text-inverse);
}

.icon-badge {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Service detail blocks ---------- */
.svc {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 64px; align-items: center; padding: 72px 0;
  border-top: 1px solid var(--border);
}
.svc:first-of-type { border-top: 0; padding-top: 0; }
.svc.flip .svc-text { order: 2; }
.svc-detail { margin-top: 28px; }
.svc-detail dt {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.svc-detail dd { margin: 0 0 22px; color: var(--text-body); line-height: var(--leading-relaxed); }
.svc-detail dd:last-child { margin-bottom: 0; }

.svc-art {
  position: relative; border-radius: var(--radius-2xl); overflow: hidden;
  min-height: 380px; background: var(--gradient-tide);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Steps ---------- */
.step-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: var(--tracking-eyebrow); color: var(--primary);
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.step-num::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Quote ---------- */
.quote {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 3vw, 34px); line-height: 1.32;
  letter-spacing: var(--tracking-tight); color: var(--text-inverse);
  margin: 0 0 28px; text-wrap: pretty;
}
.logo-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.logo-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius-md);
  padding: 14px 22px; background: rgba(255,255,255,0.04);
}

/* ---------- Case studies ---------- */
.case dt {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.case dd { margin: 0 0 18px; font-size: 15.5px; line-height: var(--leading-relaxed); }
.case dd:last-child { margin-bottom: 0; }
.case .outcome { color: var(--text-strong); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.field input, .field textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--text-strong);
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 13px 15px; width: 100%;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus);
}
.field textarea { resize: vertical; min-height: 150px; }

.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-list .label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.contact-list a, .contact-list span.val { font-size: 16px; font-weight: 600; color: var(--text-strong); }
.contact-list a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--text-inverse); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.3fr; gap: 56px; }
.footer img.logo { height: 26px; width: auto; }
.footer p { color: rgba(255,255,255,0.66); font-size: 15px; line-height: var(--leading-relaxed); max-width: 340px; }
.footer h4 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--blue-300); margin: 0 0 18px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: rgba(255,255,255,0.82); font-size: 15px; font-weight: 500; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer-base {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: rgba(255,255,255,0.5); font-size: 13px;
}
.footer-base .mono { font-family: var(--font-mono); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  section { padding: 72px 0; }
  .wrap, .wrap-md, .nav-inner { padding: 0 22px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .svc { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .svc.flip .svc-text { order: 0; }
  .svc-art { min-height: 240px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 700px) {
  section { padding: 60px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 22px 18px; box-shadow: var(--shadow-md);
  }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links[data-open="false"] { display: none; }
  .nav-toggle { display: flex; }
  .nav .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .orbit-mark { width: 300px; right: -80px; bottom: -100px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
