/* Kodiak Foundry hub — design system (plain CSS, no JS, no @import) */

:root {
  --bg: #0C0E11;
  --surface: #151920;
  --surface-2: #1C222B;
  --line: #2A313C;
  --text: #E9E7E2;
  --muted: #9FA6B0;
  --ember: #EB6248;
  --ember-dim: #B84C38;
}

html {
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  font-size: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* Display face */
h1,
h2,
.brand,
.pillar h3,
.tool-card h3 {
  font-family: "Fraunces", Georgia, serif;
}

/* Type scale */
h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
}

small,
.meta-line,
.legal {
  font-size: 0.875rem;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

section.section {
  padding: 64px 0;
}

/* Hairline dividers between successive sections instead of heavy fills */
section.section + section.section,
section.section + .strip,
section.section + .contact-strip,
section.section + .about-cut {
  border-top: 1px solid var(--line);
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

/* Pure-CSS mobile nav (checkbox hack) */
.nav-toggle-input,
#nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-btn {
  margin-left: auto;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

#site-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

#nav-toggle:checked ~ #site-nav {
  display: flex;
}

#site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
}

#site-nav a:hover {
  color: var(--ember);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 50%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(12, 14, 17, 0.94), rgba(12, 14, 17, 0.62) 55%, rgba(12, 14, 17, 0.28));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 12vh 0 48px;
}

.hero-copy .subhead {
  color: var(--muted);
  font-size: 1.125rem;
}

/* Buttons */
.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary {
  background: var(--ember);
  color: #0C0E11;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ember-dim);
  color: var(--text);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--ember);
}

/* Cards and grids */
.pillars-section h2,
.tools-section h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  margin: 0 0 16px;
}

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pillar,
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.tool-card {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.pillar:hover,
.pillar:focus,
.tool-card:hover,
.tool-card:focus {
  border-color: var(--ember);
  box-shadow: inset 0 0 0 1px var(--ember);
}

.tool-card h3,
.pillar h3 {
  margin: 0 0 8px;
}

.pillar p,
.tool-card p {
  color: var(--muted);
  margin: 0;
}

.tool-card.future {
  opacity: 0.7;
}

.soon-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
}

/* Strip / about-cut / contact sections (left-aligned text) */
.strip,
.about-cut,
.contact-strip {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.strip p,
.about-cut p,
.contact-strip p {
  text-align: left;
}

/* Subpages */
.page-head {
  padding: 64px 0 0;
}

.page-head h1 {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  font-size: 1.125rem;
}

.page-banner {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.prose h2 {
  margin-top: 40px;
}

.prose p {
  max-width: 70ch;
}

ul.prose-list {
  max-width: 70ch;
  padding-left: 1.2em;
}

.meta-line {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Email/content links */
main a {
  color: var(--ember);
}

main a:hover {
  color: var(--ember-dim);
}

/* Ad slot */
.ad-section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.adsbygoogle,
ins.adsbygoogle {
  display: block;
  min-height: 90px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

.legal {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 16px 0 0;
}

/* Anchor targets under the sticky header */
#what-we-make,
#art,
#games,
#lab,
#tools,
#tool-grid {
  scroll-margin-top: 72px;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* Transitions only on hover/focus properties */
.btn,
.btn-primary,
.btn-secondary,
.pillar,
.tool-card,
#site-nav a,
.footer-links a {
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

/* Breakpoints */
@media (min-width: 640px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  body {
    font-size: 1.0625rem;
  }

  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  section.section {
    padding: 96px 0;
  }

  .pillars {
    grid-template-columns: repeat(4, 1fr);
  }

  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-toggle-btn {
    display: none;
  }

  #site-nav {
    display: flex !important;
    flex-direction: row;
    width: auto;
    gap: 24px;
  }

  .page-head {
    padding: 96px 0 0;
  }
}

@media (max-width: 479.98px) {
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none;
  }
}
