/* TemplaBee website — layout and page styles. Tokens come from tokens.css (Design System). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a:focus-visible, .btn-primary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-xl); }
.body { color: var(--color-body); }
.mute { color: var(--color-mute); }
.eyebrow {
  font: var(--type-code-weight) var(--type-code-size)/var(--type-code-line) var(--font-mono);
  color: var(--color-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}
.lede { color: var(--color-body); max-width: 56ch; margin-top: var(--space-xl); }

/* Buttons */
a.btn-primary, a.btn-secondary-ghost { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.btn-primary:hover { filter: brightness(1.08); }
.link-arrow::after { content: "→"; margin-left: var(--space-sm); transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-2xl); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-hairline);
}
.nav-bar { display: flex; align-items: center; gap: var(--space-xl); padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.brand img { width: 150px; }
.nav-links { display: flex; gap: var(--space-xs); margin-left: auto; }
.nav-link { text-decoration: none; color: var(--color-body-strong); }
.nav-link:hover { color: var(--color-ink); }

/* Hero */
.hero-band { padding-top: var(--space-5xl); padding-bottom: var(--space-5xl); }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-4xl); align-items: center; }
.hero-visual { position: relative; min-height: 480px; }

.mock-bar { display: flex; justify-content: space-between; color: var(--color-mute); margin-bottom: var(--space-sm); }
.dot-row { display: inline-flex; gap: 4px; align-items: center; }
.dot-row i { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--color-hairline); }
.prompt-card { position: absolute; top: 0; left: 0; width: 70%; z-index: 2; }
.prompt-card p + p { margin-top: var(--space-sm); }
.prompt-caret { color: var(--color-primary); }
.mock-mute { color: var(--color-mute); }

.check-card { position: absolute; right: 0; bottom: 0; width: 56%; z-index: 2; display: grid; gap: var(--space-xs); }
.ok { color: var(--color-accent-mint); margin-right: var(--space-xs); }

/* Document page mockup (the brand's only decorative system) */
.doc-page {
  background: var(--color-ink);
  color: #1A1A1A;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-2xl);
  display: flex; flex-direction: column; gap: 7px;
}
.hero-visual .doc-page { margin: 92px 8% 0 18%; padding-bottom: var(--space-4xl); }
.doc-head { display: flex; align-items: center; gap: var(--space-sm); padding-bottom: var(--space-md); border-bottom: 2px solid #1A1A1A; margin-bottom: var(--space-sm); }
.doc-head img { width: 24px; height: 24px; background: #000; border-radius: var(--radius-full); padding: 2px; }
.doc-brand { font: 500 12px/16px var(--font-sans); }
.doc-tag { margin-left: auto; font: 400 10px/14px var(--font-mono); letter-spacing: .12em; color: #6B665E; }
.doc-title { font: 500 20px/26px var(--font-sans); letter-spacing: -0.4px; }
.doc-sub { font: 400 11px/14px var(--font-sans); color: #6B665E; margin-bottom: var(--space-xs); }
.doc-h2 { font: 500 12px/16px var(--font-sans); margin-top: var(--space-sm); }
.doc-foot { margin-top: auto; padding-top: var(--space-md); font: 400 10px/14px var(--font-mono); color: #6B665E; border-top: 1px solid #D9D4CA; }
.line { display: block; height: 6px; border-radius: var(--radius-xs); background: #D9D4CA; }
.w50 { width: 50%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w80 { width: 80%; }
.w85 { width: 85%; } .w88 { width: 88%; } .w90 { width: 90%; } .w92 { width: 92%; } .w95 { width: 95%; }
.doc-table { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3px; margin-top: var(--space-sm); }
.doc-table i { height: 12px; background: #E8E4DC; }
.doc-table i:nth-child(-n+3) { background: #1A1A1A; }

/* Legacy document (before) */
.doc-page.old { font-family: 'Times New Roman', Times, serif; }
.old-title { font: 700 17px/22px 'Times New Roman', Times, serif; text-decoration: underline; text-align: center; margin-bottom: var(--space-sm); }
.old-h { font: italic 700 13px/18px 'Comic Sans MS', 'Times New Roman', serif; margin-top: var(--space-sm); }
.doc-page.old .line { background: #CFCFCF; }
.doc-page.old .line:nth-of-type(2) { margin-left: 10%; }

/* Strip */
.strip { border-top: 1px solid var(--color-hairline); border-bottom: 1px solid var(--color-hairline); padding: var(--space-2xl) 0; }
.strip-label { color: var(--color-mute); margin-bottom: var(--space-lg); text-align: center; }
.app-tiles li { display: inline-flex; align-items: center; gap: var(--space-sm); }
.app-tiles img { flex: none; }
.app-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm) var(--space-3xl); color: var(--color-body-strong); font: var(--type-body-md-strong-weight) var(--type-body-md-strong-size)/var(--type-body-md-strong-line) var(--font-sans); }

/* Sections */
.content-band + .content-band { border-top: 1px solid var(--color-hairline); }
.content-band > .wrap { padding: 0 var(--space-xl); }
.section-head { margin-bottom: var(--space-3xl); max-width: 760px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.card-content h3 { margin-bottom: var(--space-sm); }
.card-num { color: var(--color-mute); margin-bottom: var(--space-2xl); }
.feature { display: flex; flex-direction: column; padding: var(--space-2xl); }
.tag-line { color: var(--color-mute); margin-top: auto; padding-top: var(--space-xl); }

/* Flow */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2xl); position: relative; }
.flow-step { font-family: var(--font-sans); padding: var(--space-xl); position: relative; }
.flow-step:not(:last-child)::after {
  content: "→"; position: absolute; right: calc(-1 * var(--space-2xl)); top: 50%;
  width: var(--space-2xl); text-align: center; transform: translateY(-50%); color: var(--color-mute);
}
.flow-label { font: var(--type-code-weight) var(--type-code-size)/var(--type-code-line) var(--font-mono); color: var(--color-mute); margin-bottom: var(--space-lg); }
.flow-step h3 { margin-bottom: var(--space-sm); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xl); }
.chips li {
  font: var(--type-caption-weight) var(--type-caption-size)/var(--type-caption-line) var(--font-mono);
  color: var(--color-body-strong); border: 1px solid var(--color-hairline); border-radius: var(--radius-sm);
  padding: var(--space-xxs) var(--space-sm);
}

/* Compare */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-2xl); align-items: center; }
.compare .doc-page { min-height: 340px; }
.compare-item figcaption { color: var(--color-body); margin-top: var(--space-lg); }
.compare-arrow { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); font-size: 28px; color: var(--color-ink); }
.compare-arrow .text-code { color: var(--color-mute); }

/* Services */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4xl); align-items: start; }
.split .section-head { margin-bottom: 0; }
.service-list .press-row { color: var(--color-body-strong); }
.service-list .press-row:first-child { border-top: 1px solid var(--color-hairline); color: var(--color-ink); }

/* Integrations */
.logo-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.logo-tiles li {
  background: var(--color-canvas-soft); border: 1px solid var(--color-hairline); border-radius: var(--radius-md);
  padding: var(--space-lg); text-align: center; color: var(--color-body-strong);
  font: var(--type-body-sm-strong-weight) var(--type-body-sm-strong-size)/var(--type-body-sm-strong-line) var(--font-sans);
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }
.stat { font: var(--type-display-lg-weight) var(--type-display-lg-size)/var(--type-display-lg-line) var(--font-sans); letter-spacing: var(--type-display-lg-tracking); }
.stats .text-body-sm { color: var(--color-body); margin-top: var(--space-xs); }

/* About */
.about-copy .body, .split .section-head .body { margin-top: var(--space-lg); max-width: 56ch; }
.directors { display: grid; gap: var(--space-lg); }
.person { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-xl); align-items: start; }
.person img { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-md); filter: grayscale(1); }
.person .text-body-sm { color: var(--color-body); margin-top: var(--space-sm); }
.person .links a { color: var(--color-ink); }

/* CTA */
.cta-box { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-box .cta-row { justify-content: center; }
.tagline { margin-top: var(--space-3xl); }

/* Footer */
.footer { border-top: 1px solid var(--color-hairline); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg) var(--space-2xl); }
.footer-inner img { width: 96px; margin-right: auto; }
.footer a { color: var(--color-body-strong); }


/* Insights list */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.post-card { display: flex; flex-direction: column; gap: var(--space-sm); height: 100%; text-decoration: none; padding: var(--space-2xl); }
.post-card:hover { border-color: var(--color-mute); }
.post-date { color: var(--color-mute); margin-bottom: var(--space-sm); }

/* Article */
.article { max-width: 760px; }
.article .eyebrow a { text-decoration: none; }
.article-meta { color: var(--color-mute); margin-top: var(--space-lg); }
.article-hero { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--color-hairline); margin-top: var(--space-2xl); }
.prose { overflow-wrap: anywhere; margin-top: var(--space-3xl); color: var(--color-body-strong); font: var(--type-body-lg-weight) var(--type-body-lg-size)/var(--type-body-lg-line) var(--font-sans); }
.prose > * + *, .prose p + p { margin-top: var(--space-lg); }
.prose h2, .prose h3, .prose h4 { color: var(--color-ink); margin-top: var(--space-3xl); font: var(--type-display-sm-weight) var(--type-display-sm-size)/var(--type-display-sm-line) var(--font-sans); letter-spacing: var(--type-display-sm-tracking); }
.prose h3, .prose h4 { font-size: 20px; line-height: 28px; }
.prose strong { color: var(--color-ink); font-weight: 500; }
.prose a { color: var(--color-ink); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: var(--space-xl); }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--space-xs); }
.prose figure { margin: var(--space-2xl) 0; }
.prose figure img { border-radius: var(--radius-md); border: 1px solid var(--color-hairline); background: #fff; }
.prose figcaption { color: var(--color-mute); margin-top: var(--space-sm); font: var(--type-body-sm-weight) var(--type-body-sm-size)/var(--type-body-sm-line) var(--font-sans); }
.prose code { font: var(--type-code-md-weight) var(--type-code-md-size)/var(--type-code-md-line) var(--font-mono); background: var(--color-canvas-soft); padding: 1px var(--space-xs); border-radius: var(--radius-xs); }
.article-tags { margin-top: var(--space-3xl); }
.article-back { margin-top: var(--space-2xl); }
.article-back a { padding-left: 0; }

/* Forms */
.form { display: grid; gap: var(--space-lg); }
.field { display: grid; gap: var(--space-xs); color: var(--color-body-strong); }
.field .text-input { width: 100%; font-size: 16px; }
.field .text-input:focus { outline: 1px solid var(--color-body); border-color: var(--color-body); }
.form .btn-primary { justify-self: start; min-height: 44px; padding-left: var(--space-2xl); padding-right: var(--space-2xl); }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note:empty { display: none; }
.form-aside { margin-top: var(--space-xl); }
.form-aside a { color: var(--color-ink); }

/* Tablet */
@media (max-width: 1023px) {
  .text-display-xl { font-size: 48px; line-height: 54px; letter-spacing: -1.2px; }
  .hero, .split { grid-template-columns: 1fr; gap: var(--space-3xl); }
  .grid-3, .flow { grid-template-columns: 1fr; }
  .flow-step:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: calc(-1 * var(--space-2xl)); transform: translateX(-50%); height: var(--space-2xl); line-height: var(--space-2xl); }
  .logo-tiles { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 767px) {
  .wrap, .content-band > .wrap { padding: 0 var(--space-lg); }
  .hero-band, .content-band { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); padding-left: 0; padding-right: 0; }
  .nav-links { display: none; }
  .nav-bar .btn-primary { margin-left: auto; }
  .brand img { width: 120px; }
  a.btn-primary, a.btn-secondary-ghost { min-height: 44px; }
  .text-display-xl { font-size: 38px; line-height: 44px; letter-spacing: -1px; }
  .text-display-lg { font-size: 32px; line-height: 38px; letter-spacing: -0.8px; }
  .text-display-md { font-size: 26px; line-height: 32px; }
  .hero-visual { min-height: 0; }
  .prompt-card, .check-card { position: static; width: 100%; }
  .hero-visual .doc-page { margin: var(--space-lg) 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { flex-direction: row; transform: rotate(0); }
  .compare-arrow { font-size: 0; } .compare-arrow::after { content: "↓"; font-size: 28px; }
  .logo-tiles { grid-template-columns: repeat(2, 1fr); }
  .person { grid-template-columns: 88px 1fr; gap: var(--space-lg); }
  .person img { width: 88px; }
  .footer-inner img { margin-right: 0; }
}
