/* ============================================================
   ai.grds.io — GRDS // AI pitch site
   Utilitarian / industrial design language
   Berkeley Mono typeface · Monochrome · Hairline rules
   ============================================================ */

/* --- @font-face -------------------------------------------- */

@font-face {
  font-family: 'Berkeley Mono';
  src: url('fonts/BerkeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('fonts/BerkeleyMono-Oblique.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('fonts/BerkeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('fonts/BerkeleyMono-Bold-Oblique.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --- Design tokens ----------------------------------------- */

:root {
  --font-mono: 'Berkeley Mono', 'Cascadia Code', 'IBM Plex Mono', 'Fira Code', monospace;
  --fs-base:   17px;
  --lh-base:   1.55;
  --fs-sm:     14px;
  --fs-xs:     12px;
  --fs-lg:     20px;
  --fs-xl:     28px;
  --fs-2xl:    40px;
  --fs-3xl:    56px;
  --max-w:     960px;
  --pad-x:     24px;
  --pad-y:     80px;
  --rule:      1px solid var(--border);

  /* light defaults (overridden for dark via prefers-color-scheme / data-theme) */
  --bg:         #f4f6fb;
  --fg:         #0d1226;
  --border:     #cdd4e4;
  --muted:      #5a627a;
  --surface:    #e9edf6;
  --accent:     #d6206e;
  --accent-2:   #7c3aed;
  --accent-3:   #dc2626;
  --accent-blue:#2954d4;
}

/* --- Light (explicit) -------------------------------------- */
[data-theme="light"] {
  --bg:         #f4f6fb;
  --fg:         #0d1226;
  --border:     #cdd4e4;
  --muted:      #5a627a;
  --surface:    #e9edf6;
  --accent:     #d6206e;
  --accent-2:   #7c3aed;
  --accent-3:   #dc2626;
  --accent-blue:#2954d4;
}

/* --- Dark (explicit & system) ------------------------------ */
[data-theme="dark"] {
  --bg:         #0a0e1a;
  --fg:         #e6e9f2;
  --border:     #26304a;
  --muted:      #8b93ad;
  --surface:    #121829;
  --accent:     #ff4d8d;
  --accent-2:   #a855f7;
  --accent-3:   #ff5252;
  --accent-blue:#4d7cff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #0a0e1a;
    --fg:         #e6e9f2;
    --border:     #26304a;
    --muted:      #8b93ad;
    --surface:    #121829;
    --accent:     #ff4d8d;
    --accent-2:   #a855f7;
    --accent-3:   #ff5252;
    --accent-blue:#4d7cff;
  }
}

/* --- Reset ------------------------------------------------- */

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

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

body {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- Utility ----------------------------------------------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  border: 0;
}

/* --- Top bar (sticky) -------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--rule);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}

.topbar-wordmark {
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar-wordmark .wm-sep,
.hero-headline .wm-sep {
  color: var(--accent);
}

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

.topbar-nav a {
  font-size: var(--fs-sm);
  color: var(--muted);
  transition: color 0.15s;
  white-space: nowrap;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
  color: var(--accent-blue);
}

.topbar-cta {
  font-size: var(--fs-sm);
  font-weight: 700;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 14px;
  transition: background 0.15s, color 0.15s;
}

.topbar-cta:hover,
.topbar-cta:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.theme-toggle {
  background: none;
  border: var(--rule);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: 4px 10px;
  transition: background 0.15s, color 0.15s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

/* hide desktop nav on small screens */
@media (max-width: 700px) {
  .topbar-nav .nav-anchor { display: none; }
}

/* --- Section layout ---------------------------------------- */

.section {
  padding: var(--pad-y) 0;
}

.section + .section {
  border-top: var(--rule);
}

/* --- Section header ---------------------------------------- */

.sec-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent-2);
}

.sec-label .sec-num {
  color: var(--accent-2);
}

.sec-headline {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
}

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

.hero {
  padding: calc(var(--pad-y) * 1.2) 0 var(--pad-y);
}

.hero-kicker {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 12px;
  display: inline-block;
  border: 1px solid var(--accent);
}

.hero-headline {
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-subhead {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 580px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .hero-headline { font-size: var(--fs-2xl); }
  .hero-subhead   { font-size: var(--fs-base); }
}

/* --- Spec grid (label–value rows) -------------------------- */

.spec-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  border: var(--rule);
}

.spec-grid .spec-label,
.spec-grid .spec-value {
  padding: 12px 16px;
  font-size: var(--fs-sm);
  border-bottom: var(--rule);
}

.spec-grid .spec-label {
  font-weight: 700;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface);
  border-right: var(--rule);
}

.spec-grid .spec-value {
  word-break: break-word;
}

.spec-grid > :last-child,
.spec-grid > :nth-last-child(2) {
  border-bottom: none;
}

@media (max-width: 500px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .spec-grid .spec-label {
    border-right: none;
    border-bottom: none;
    padding-bottom: 4px;
  }
  .spec-grid .spec-value {
    padding-top: 0;
  }
}

/* --- Numbered list (Approach) ------------------------------ */

.num-list {
  list-style: none;
  counter-reset: step;
}

.num-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: var(--rule);
}

.num-list li:last-child {
  border-bottom: none;
}

.num-list .num {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1;
  padding-top: 2px;
}

.num-list .num::before {
  content: counter(step, decimal-leading-zero);
}

.num-list .num-body h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.num-list .num-body p {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

@media (max-width: 500px) {
  .num-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* --- 3-up grid (Differentiators) --------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--rule);
}

.grid-3 .card {
  padding: 32px 24px;
  border-right: var(--rule);
  border-top: 3px solid transparent;
}

.grid-3 .card:nth-child(1) { border-top-color: var(--accent); }
.grid-3 .card:nth-child(2) { border-top-color: var(--accent-2); }
.grid-3 .card:nth-child(3) { border-top-color: var(--accent-blue); }

.grid-3 .card:last-child {
  border-right: none;
}

.grid-3 .card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.grid-3 .card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-3 .card {
    border-right: none;
    border-bottom: var(--rule);
  }
  .grid-3 .card:last-child {
    border-bottom: none;
  }
}

/* --- Services list ----------------------------------------- */

.svc-list {
  list-style: none;
}

.svc-list li {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: var(--rule);
}

.svc-list li:last-child {
  border-bottom: none;
}

.svc-list .svc-name {
  font-weight: 700;
  font-size: var(--fs-base);
}

.svc-list .svc-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 500px) {
  .svc-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* --- Engagement model (table style) ------------------------ */

.engage-table {
  width: 100%;
  border-collapse: collapse;
}

.engage-table th,
.engage-table td {
  padding: 12px 16px;
  font-size: var(--fs-sm);
  text-align: left;
  border-bottom: var(--rule);
}

.engage-table th {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--surface);
  border-top: var(--rule);
  border-left: 3px solid var(--accent-3);
}

.engage-table td {
  line-height: 1.6;
}

.engage-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 600px) {
  .engage-table, .engage-table tbody, .engage-table tr, .engage-table th, .engage-table td {
    display: block;
  }
  .engage-table th {
    display: none;
  }
  .engage-table td {
    padding: 10px 12px;
  }
  .engage-table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .engage-table tr {
    border-bottom: var(--rule);
    padding: 8px 0;
  }
}

/* --- FAQ --------------------------------------------------- */

.faq-list {
  list-style: none;
}

.faq-list li {
  padding: 24px 0;
  border-bottom: var(--rule);
}

.faq-list li:last-child {
  border-bottom: none;
}

.faq-list .faq-q {
  font-weight: 700;
  font-size: var(--fs-base);
  margin-bottom: 8px;
  line-height: 1.4;
}

.faq-list .faq-a {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}

/* --- Contact CTA ------------------------------------------- */

.contact-cta {
  display: inline-block;
  font-size: var(--fs-lg);
  font-weight: 700;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 16px 36px;
  margin-top: 20px;
  transition: background 0.15s, color 0.15s;
}

.contact-cta:hover,
.contact-cta:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

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

.footer {
  padding: 32px 0;
  border-top: var(--rule);
  font-size: var(--fs-xs);
  color: var(--muted);
}
