/* Caib — first draft (TASL Ltd) */
:root {
  --bg: #070b12;
  --bg-elevated: #0f1629;
  --surface: #141d33;
  --text: #e8edf5;
  --muted: #8b9cb3;
  --accent: #5eead4;
  --accent-dim: #2dd4bf33;
  --border: #1e293b;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Wordmark: C ai b with italic ai */
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

/* “ai” = always visibly italic: <em class="brand-ai">ai</em> + Georgia (system) so it never disappears */
.brand em.brand-ai {
  font-style: italic !important;
  font-weight: 700 !important;
  font-family: Georgia, "Times New Roman", ui-serif, serif !important;
  color: var(--accent) !important;
  font-synthesis: none;
}

/* “Caib” in body copy — do not set font-style on wrapper (breaks nested italic in some browsers) */
.caib {
  font-weight: inherit;
  white-space: nowrap;
}

.caib em.brand-ai {
  font-style: italic !important;
  font-weight: inherit !important;
  font-family: Georgia, "Times New Roman", ui-serif, serif !important;
  color: inherit !important;
  font-synthesis: none;
}

/* Footer wordmark */
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-wordmark em.brand-ai {
  font-style: italic !important;
  font-weight: 700 !important;
  font-family: Georgia, "Times New Roman", ui-serif, serif !important;
  color: var(--accent) !important;
  font-synthesis: none;
}

/* Layout */
.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-main a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-main a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none !important;
}

.nav-cta:hover {
  filter: brightness(1.08);
  text-decoration: none !important;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
}

.nav-login:hover {
  border-color: var(--muted);
  text-decoration: none !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-main {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    gap: 0;
    display: none;
  }

  .nav-main.is-open {
    display: flex;
  }

  .nav-main a,
  .nav-main .nav-cta,
  .nav-main .nav-login {
    padding: 0.75rem 0;
    text-align: center;
  }

  .nav-main .nav-cta {
    margin-top: 0.5rem;
  }
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 20% auto -20%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

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

.hero-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 48ch;
}

/* Sections */
section {
  padding: 3.5rem 0;
}

section.alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}

/* Cards grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Problem cards: one column on mobile, three from tablet/desktop up */
.grid-problems {
  grid-template-columns: 1fr;
}

@media (min-width: 769px) {
  .grid-problems {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.65rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Steps */
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  border-radius: 10px;
  font-size: 1rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Trust strip */
.trust-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elevated) 100%);
}

.trust-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.page-hero .lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
  font-size: 1.1rem;
}

.prose {
  max-width: 65ch;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.prose ul {
  color: var(--muted);
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Legal long-form */
.legal-prose {
  max-width: 52rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 2.25rem 0 0.75rem;
  color: var(--text);
}

.legal-prose h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.legal-prose p,
.legal-prose li {
  color: var(--muted);
}

.legal-prose ul {
  padding-left: 1.35rem;
}

.legal-prose .updated {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Form */
.form-card {
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.form-card-lede {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.form-card .form-error {
  font-size: 0.9rem;
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
}

.form-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-card textarea {
  min-height: 100px;
  resize: vertical;
}

.form-card button[type="submit"] {
  width: 100%;
  margin-top: 0.25rem;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.form-hint code {
  font-size: 0.88em;
  background: var(--bg);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
}

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

/* Thank you */
.thank-you {
  text-align: center;
  padding: 4rem 0;
}

.thank-you h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
}
