/* ==========================================================================
   karlkyamko.com — shared layer, loaded on EVERY page after the page's own <style>.
   Put anything that must look the same everywhere here (fonts, colours, bands, nav,
   contact band, footer), not in a page. bin/sync_layout.py copies the nav, contact band
   and footer markup from index.html to every page.
   Fonts: Geist + Geist Mono (Karl, 2026-10-03, 'techy, GTM Engineer'); warm palette from leadgenaisystems.com; amber stays.
   ========================================================================== */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/geist-var.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/geist-mono-var.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-700.woff2') format('woff2'); }
@font-face { font-family: 'Geist Fallback'; src: local('Arial'); size-adjust: 104%; ascent-override: 92%; descent-override: 22%; line-gap-override: 0%; }

:root {
  --bg: #141210;          /* warm near-black page */
  --bg2: #221F1B;         /* cards and panels */
  --bg-band: #1D1A16;     /* alternate section band */
  --bg-deep: #0C0B09;     /* contact band + footer */
  --accent: #FFB700;
  --accent-dark: #E0A100;
  --on-accent: #141210;
  --white: #F4EFE7;
  --text-secondary: #CFC7BA;
  --muted: #A0978A;       /* 5.7:1 on cards, 6.5:1 on the page */
  --border: #322D27;
  --font-display: 'Geist', 'Geist Fallback', Arial, sans-serif;
  --font-body: 'Geist', 'Geist Fallback', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

html { overflow-x: clip; }
body { background: var(--bg); color: var(--white); font-family: var(--font-body); }

/* ---- Type: Geist 700 headings, tight tracking (replaces Bebas Neue) ---- */
h1, h2, h3, .nav-logo, .hero h1, .case-hero h1, .page h1, .work-card h3, .related-case-title,
.cs-section-title, .section-title, h3.budget-title, .contact-cta h2, .faq-section h2,
.stat-cell .num, .result-value, .summary-value, .budget-amount, .orbit-badge {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
}
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.04em; text-wrap: balance; }
.hero h1, .page h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.05em; }
.case-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -0.04em; }
.work-card h3 { font-size: 1.3rem; line-height: 1.22; letter-spacing: -0.03em; }
.related-case-title { font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.03em; }
.cs-section-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.stat-cell .num { font-size: clamp(1.4rem, 2.4vw, 1.9rem); white-space: nowrap; }
.nav-logo { font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.faq-item summary::after { font-family: var(--font-mono); font-weight: 500; }
.faq-item p, .contact-section p, .testimonial-quote p { color: var(--text-secondary); }

/* ---- Section bands: edge to edge, content stays in its box ---- */
#system, #testimonials {
  background: var(--bg-band);
  box-shadow: 0 0 0 100vmax var(--bg-band);
  clip-path: inset(0 -100vmax);
  border-top: none;
}
#results, #faq { border-top: none; }

/* ---- FAQ list centred under its heading ---- */
.faq-list { margin-left: auto; margin-right: auto; }

/* ---- Fake browser bars: blank on campaign screenshots (no third-party domains in page text) ---- */
.proof-url:empty, .browser-url:empty { min-height: 1.6rem; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; padding: 0.8rem 1.75rem; background: var(--accent); color: var(--on-accent);
  text-decoration: none; font-weight: 600; font-size: 0.88rem; border-radius: var(--radius-sm, 4px); transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm, 4px); color: var(--white);
  text-decoration: none; font-size: 0.88rem; transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-primary, .btn-secondary { min-height: 44px; }

/* ---- Contact band (same markup on every page, synced from index.html) ---- */
section.contact-section {
  max-width: 1000px; margin: 0 auto; padding: 4.5rem 2rem; border-top: none;
  background: var(--bg-deep); box-shadow: 0 0 0 100vmax var(--bg-deep); clip-path: inset(0 -100vmax);
}
.contact-section .section-head { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; text-align: left; margin-bottom: 1.75rem; }
.contact-section .section-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--accent); }
.contact-section h2 { margin-bottom: 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 340px; gap: 4rem; align-items: center; }
.contact-copy { min-width: 0; }
.contact-photo { position: relative; height: 370px; }
.contact-photo img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: auto; display: block; filter: grayscale(15%); }
.contact-section p { max-width: 480px; margin-bottom: 1.75rem; font-size: 0.95rem; line-height: 1.7; }
.contact-links { display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 768px) {
  .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
  .contact-photo { width: 220px; height: 240px; margin: 0 auto; order: -1; }
}

/* ---- Footer: brand column (logo + Instantly badge) on the left ---- */
footer {
  max-width: 1000px; margin: 0 auto; padding: 3rem 2rem 2rem; border-top: 1px solid var(--border);
  background: var(--bg-deep); box-shadow: 0 0 0 100vmax var(--bg-deep); clip-path: inset(0 -100vmax);
}
footer p { font-size: 0.8rem; color: var(--muted); margin-top: 2.5rem; text-align: center; }
.footer-cols { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col h4 { font-size: 0.85rem; color: var(--white); margin-bottom: 0.3rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.footer-col a { font-size: 0.85rem; color: var(--muted); text-decoration: none; padding: 0.15rem 0; }
.footer-col a:hover { color: var(--accent); }
.footer-brand { gap: 1rem; }
.footer-brand .nav-logo { display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start; color: var(--white); font-size: 1.05rem; text-decoration: none; padding: 0.55rem 0; }
.footer-brand .nav-logo span { color: var(--accent); }
.footer-brand .nav-logo-icon { width: 22px; height: 22px; }
.footer-badge { width: 64px; height: auto; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 0.2rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); padding: 0; transition: border-color 0.2s, color 0.2s; }
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 1023px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---- Card tag: sits above the fake browser (Karl, 2026-10-03) ---- */
.work-tag {
  display: inline-block; align-self: flex-start; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; color: var(--accent);
  border: none; background: none; border-radius: 0; padding: 0; margin: 0 0 0.75rem;
}
.cs-grid .related-case-card { padding-top: 1rem; }
.cs-grid .related-case-card > .work-tag { margin: 0 1rem 0.9rem; }

/* ---- Nav base (moved from the pages so tool pages share it) ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(12,12,16,0.92);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.nav-logo {
  grid-column: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  justify-self: start;
}
.nav-logo-icon { width: 22px; height: 22px; flex-shrink: 0; }
.nav-logo span { color: var(--accent); }
.nav-anchors {
  grid-column: 2;
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-self: center;
}
.nav-anchors a {
  font-size: 0.85rem;
  text-decoration: none;
  color: #a1a1aa;
  transition: color 0.2s;
}
.nav-anchors a:hover { color: var(--white); }
.nav-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.contact-link {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.contact-link:hover { background: var(--accent-dark); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
}
.nav-toggle svg { width: 18px; height: 18px; }


/* ---- Nav: one bar on every page. Under 1024px: logo + menu button only; "Let's Talk" lives inside the menu ---- */
nav.scrolled { background: rgba(20, 18, 16, 0.94); }
.nav-anchors a { color: var(--text-secondary); }
.nav-anchors a:hover { color: var(--white); }
.nav-menu-cta { display: none; }
.nav-toggle { width: 44px; height: 44px; }
@media (max-width: 1023px) {
  .nav-anchors { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-right .contact-link { display: none; }
  nav.menu-open { background: var(--bg); border-color: var(--border); }
  nav.menu-open .nav-anchors {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; grid-column: 1 / -1; justify-self: stretch;
    top: 100%; left: 0; right: 0; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1.25rem; gap: 0;
  }
  nav.menu-open .nav-anchors a { display: block; width: 100%; text-align: left; padding: 0.9rem 0.25rem; min-height: 48px; border-bottom: 1px solid var(--border); font-size: 1rem; }
  nav.menu-open .nav-anchors .nav-menu-cta { display: flex; justify-content: center; margin-top: 1rem; border-bottom: none; color: var(--on-accent); }
  html:has(nav.menu-open) { overflow: hidden; }
}
@media (max-width: 560px) {
  nav { padding: 0.75rem 1.25rem; }
  .nav-logo { font-size: 1.05rem; }
  .nav-toggle { width: 44px; height: 44px; }
}

/* ---- Readability: no text under 12px ---- */
.win-tag, .label, .stat-cell .label, .proof-url, .browser-url, .category-tag, .results-teaser-label, .tool-marquee-label { font-size: 0.75rem; }

/* ---- Grids may shrink below their content (cards ran off phones) ---- */
.work-card, .related-case-card { min-width: 0; }
.win-tag { white-space: normal; }
@media (max-width: 768px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cell { min-width: 0; padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ---- Phones and tablets: 44px tap areas ---- */
@media (max-width: 1023px) {
  .nav-logo { padding: 0.55rem 0; }
  .footer-col a:not(.nav-logo) { min-height: 44px; display: flex; align-items: center; padding: 0; }
  .footer-social a, .hero-social a { width: 44px; height: 44px; }
  .breadcrumb a, .back-link { display: inline-flex; align-items: center; min-height: 44px; }
  .hero-meta-line a, a.hero-meta-line, .hero-meta-link { display: inline-flex; align-items: center; min-height: 44px; }
  .related-carousel-dot { box-sizing: content-box; width: 8px; height: 8px; border: 18px solid transparent; background-clip: content-box; }
}

/* ---- Techy layer: Geist Mono for labels, numbers, tags and fake-browser chrome ---- */
.section-label, .hero-eyebrow, .stat-cell .num, .stat-cell .label, .work-tag, .win-tag, .category-tag, .results-teaser-label,
.case-date-line, .breadcrumb, .proof-url, .browser-url, .footer-col h4, .disclaimer, .tool-marquee-label, .related-case-cta, .work-cta {
  font-family: var(--font-mono);
}
.section-label, .hero-eyebrow, .results-teaser-label, .footer-col h4 { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; font-size: 0.75rem; }
.hero-eyebrow { color: var(--accent); }
.section-label::before, .hero-eyebrow::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 0.55rem; vertical-align: middle; box-shadow: 0 0 8px rgba(255, 183, 0, 0.6); }
.stat-cell .num { font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-cell .label { text-transform: uppercase; letter-spacing: 0.06em; }
.work-tag { font-weight: 500; }
.win-tag { font-weight: 500; letter-spacing: -0.01em; }

/* ---- Screen sizes: phone <=640, tablet 641-1023, laptop 1024-1599, big >=1600 (same set as leadgenaisystems.com).
   Big screens widen the content and grow the root size; everything in rem grows with it. ---- */
@media (min-width: 641px) and (max-width: 1023px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
  :root { font-size: 17px; }
  section, .hero, .nav-inner, footer, section.contact-section, .skills-marquee-mask, .tool-marquee { max-width: 1280px; }
  .case-hero, .case-body, .case-section { max-width: 800px; }
  .case-hero.cs-wrap, .cs-wrap { max-width: 1280px; }
}
@media (min-width: 2200px) {
  :root { font-size: 18px; }
  section, .hero, .nav-inner, footer, section.contact-section, .skills-marquee-mask, .tool-marquee { max-width: 1440px; }
  .case-hero, .case-body, .case-section { max-width: 860px; }
  .case-hero.cs-wrap, .cs-wrap { max-width: 1440px; }
}

/* ---- Menu button turns into an X while the menu is open ---- */
.nav-toggle line { transition: transform 0.2s, opacity 0.2s; transform-box: view-box; transform-origin: center; }
nav.menu-open .nav-toggle line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
nav.menu-open .nav-toggle line:nth-child(2) { opacity: 0; }
nav.menu-open .nav-toggle line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Results cards: compact, 3 across like leadgenaisystems.com (Karl, 2026-10-03: "too big") ---- */
.work-card { padding: 1.1rem; }
.work-card .browser-frame { margin-bottom: 0.85rem; }
.work-card-image { aspect-ratio: 16 / 10; }
.work-card h3 { font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.02em; margin: 0.1rem 0 0.4rem; }
.work-card p { font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary); margin-bottom: 0.9rem; }
.work-card .work-cta { margin-top: auto; align-self: flex-start; }
@media (min-width: 1024px) {
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
/* Tablets: one wide card per row, screenshot left, text right (no lone card in a half-empty row) */
@media (min-width: 641px) and (max-width: 1023px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.25rem; align-content: start; }
  .work-card > * { grid-column: 2; }
  .work-card > .browser-frame { grid-column: 1; grid-row: 1 / span 6; margin-bottom: 0; align-self: start; }
}
.win-tag { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.005em; }
@media (min-width: 1024px) and (max-width: 1599px) {
  section, .hero, .nav-inner, footer, section.contact-section, .skills-marquee-mask, .tool-marquee { max-width: 1100px; }
}

[hidden] { display: none !important; }

/* ---- Case Studies filter: the category tag is the filter (Karl, 2026-10-03) ---- */
.cs-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.75rem; }
.cs-filter {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500;
  color: var(--text-secondary); background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.3rem 0.75rem; min-height: 32px; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cs-filter:hover { border-color: var(--accent); color: var(--white); }
.cs-filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 1023px) { .cs-filter { min-height: 44px; } }
@media (max-width: 640px) {
  .cs-filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -1rem; margin-right: -1rem; padding: 0 1rem 0.25rem; scrollbar-width: none; }
  .cs-filters::-webkit-scrollbar { display: none; }
  .cs-filter { flex: 0 0 auto; }
}

/* ---- Thumbnails: one window size for every card (Karl: same window, zoomed in is fine) ---- */
.cs-grid .related-case-thumb { height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center; background: #fff; }

.cs-grid .related-case-card .work-tag { margin: 0 1.1rem 0.75rem; }

/* ---- Logo wordmark: Unbounded 700 next to the bolt (Karl, 2026-10-03) ---- */
nav .nav-logo, .footer-brand .nav-logo {
  font-family: 'Unbounded', 'Geist', Arial, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0; font-size: 1.1rem;
}
@media (max-width: 640px) { nav .nav-logo { font-size: 0.95rem; } }
/* the logo strip is width-capped like the sections, so it must be centred like them */
.tool-marquee, .skills-marquee-mask { margin-left: auto; margin-right: auto; }

/* "More Case Studies" carousel thumbnails: one window size for every card (Karl, 2026-10-03) */
.related-case-thumb { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: top center; background: #fff; display: block; }
/* case-study pages keep a readable 760px text column on laptops (the 1100px section width is for the homepage) */
@media (min-width: 1024px) and (max-width: 1599px) {
  .case-body, .case-section, .case-hero:not(.cs-wrap), section.cta-section { max-width: 760px; }
}
/* carousel slides: one wide, short window for every screenshot */
.related-carousel .related-case-thumb { aspect-ratio: 2.4 / 1; }

/* /case-studies/ grid: 3 per row on laptops and up, 2 on tablets, 1 on phones (like leadgenaisystems.com) */
.cs-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 641px) { .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
