/* ==========================================================================
   SachAI — Design tokens
   Palette: "blueprint & brass" — deep instrument-navy paired with a warm
   brass accent, evoking engineering drawings and precision hardware
   rather than a generic SaaS gradient.
   ========================================================================== */
:root {
  --ink: #12141b;
  --ink-2: #1b1f2a;
  --paper: #ece7dc;
  --paper-dim: #ddd6c6;
  --slate: #4a5b78;
  --brass: #c6912b;
  --brass-light: #e4b85b;
  --line: rgba(236, 231, 220, 0.14);
  --line-strong: rgba(236, 231, 220, 0.28);

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max-w: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------------------------------------------------------------- */
/* Header + nav                                                            */
/* ---------------------------------------------------------------------- */

header.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 20, 27, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 0;
  gap: 24px;
  flex-wrap: wrap;
}

.logotype {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--paper);
}

.logotype .mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logotype .co {
  color: var(--brass-light);
}

.tagline-small {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--slate);
  font-size: 0.95rem;
  display: none;
}

@media (min-width: 720px) {
  .tagline-small { display: inline; }
}

nav.tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs button {
  font-family: var(--font-display);
  background: none;
  border: none;
  color: var(--slate);
  font-size: 0.95rem;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

nav.tabs button:hover {
  color: var(--paper);
}

nav.tabs button[aria-selected="true"] {
  color: var(--paper);
}

nav.tabs .indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--brass);
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: end;
}

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.4fr 1fr; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 15ch;
}

.hero p.lede {
  font-size: 1.1rem;
  max-width: 46ch;
  color: rgba(236, 231, 220, 0.82);
  margin: 0;
}

.hero-figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.hero-figures div {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-figures div:nth-child(2n) { border-right: none; }
.hero-figures div:nth-child(3), .hero-figures div:nth-child(4) { border-bottom: none; }

.hero-figures .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass-light);
}
.hero-figures .lbl {
  font-size: 0.85rem;
  color: var(--slate);
}

/* ---------------------------------------------------------------------- */
/* Content panel                                                            */
/* ---------------------------------------------------------------------- */

main {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
}

.panel {
  padding: 56px 0 80px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.9rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.panel-head .count {
  font-family: var(--font-display);
  color: var(--slate);
  font-size: 0.95rem;
}

.panel-sub {
  color: var(--slate);
  margin: 0 0 36px;
  max-width: 60ch;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--paper-dim);
  border: 1px solid var(--paper-dim);
}

@media (min-width: 720px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--paper);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.card .tag {
  color: var(--brass);
  font-style: italic;
  font-family: var(--font-body);
  font-size: 0.98rem;
  margin: 0;
}

.card p.desc {
  margin: 4px 0 6px;
  color: #2a2d33;
  font-size: 0.98rem;
}

.card a.card-link {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  align-self: start;
  padding-bottom: 1px;
}
.card a.card-link:hover {
  color: var(--brass);
}

.state-msg {
  padding: 40px 0;
  color: var(--slate);
  font-style: italic;
}

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

footer {
  background: var(--ink);
  padding: 32px 0;
  border-top: 1px solid var(--line-strong);
}

footer .foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  color: var(--slate);
  font-size: 0.9rem;
}

footer a { color: var(--slate); text-decoration: none; }
footer a:hover { color: var(--brass-light); }

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