/* boxshop.io — umbrella page. Palette/typography come from tokens.css
 * (KL classic palette); this file is layout and components only, so the
 * Sub-project 3 token contract can restyle the site without touching it. */

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 62rem;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg-base);
  color: var(--color-text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

a { color: var(--color-brand-text); }
a:hover { color: var(--color-brand-hover); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--color-bg-base) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  text-decoration: none;
}
.wordmark:hover { color: var(--color-text-primary); }
.wordmark__glyph {
  /* Brand cube is 440:462, so size by height and let width follow. */
  width: auto;
  height: 19px;
  transition: transform 0.4s var(--ease);
}
/* The cube glyph is dark ink; invert it on the dark background (same trick
 * as the scheme-aware favicon.svg). */
.dark .wordmark__glyph { filter: invert(1) brightness(1.15); }
.wordmark:hover .wordmark__glyph { transform: rotate(-12deg) scale(1.08); }

.topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.lang-switcher {
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switcher a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
}
.lang-switcher a[aria-current="page"] { color: var(--color-brand-text); }
.lang-switcher a:hover { color: var(--color-brand-hover); }

.theme-toggle {
  width: 2rem;
  height: 2rem;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-raised);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}
.theme-toggle::before { content: "☾"; }
.dark .theme-toggle::before { content: "☀"; }
.theme-toggle:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.topbar__cta {
  display: inline-block;
  /* Rest on --color-brand-hover, not --color-brand: white-on-#B8860B is only
   * 3.26:1 in light mode. See the .dark restore below for the mode split. */
  background: var(--color-brand-hover);
  color: var(--color-text-on-brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-speed);
}
.topbar__cta:hover {
  background: var(--color-brand-text);
  color: var(--color-text-on-brand);
}

/* ---------- sections ---------- */
section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section__label {
  color: var(--color-brand-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section__subtitle {
  color: var(--color-text-secondary);
  max-width: 38rem;
  margin-bottom: 2rem;
}

/* ---------- hero ---------- */
.hero {
  padding-top: 6rem;
  padding-bottom: 5rem;
  text-align: center;
}
.hero__eyebrow {
  color: var(--color-brand-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0 auto 1.25rem;
}
.hero__lead {
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 auto 2.25rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  transition: background var(--transition-speed), transform 0.2s var(--ease);
}
.btn--primary {
  background: var(--color-brand-hover);
  color: var(--color-text-on-brand);
}
.btn--primary:hover {
  background: var(--color-brand-text);
  color: var(--color-text-on-brand);
  transform: translateY(-1px);
}

/* Light mode puts white text on gold; KL's --color-brand #B8860B is only
 * 3.26:1, so the buttons rest on --color-brand-hover (#996F09, 4.54:1) and
 * darken to --color-brand-text (#92680A) on hover — both clear WCAG AA. Dark
 * mode puts dark text on gold and already passes, so it keeps the brighter
 * --color-brand / --color-brand-hover pairing. */
.dark .topbar__cta,
.dark .btn--primary { background: var(--color-brand); }
.dark .topbar__cta:hover,
.dark .btn--primary:hover { background: var(--color-brand-hover); }

/* ---------- audience ---------- */
.audience__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
.audience-card {
  display: block;
  background: var(--color-bg-raised);
  border: var(--border-width) solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.45s var(--ease);
}
.audience-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.audience-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}
.audience-card p {
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}
.audience-card__cta {
  color: var(--color-brand-text);
  font-weight: 600;
}

/* ---------- founders ---------- */
.founders__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.founder-card {
  background: var(--color-bg-raised);
  border: var(--border-width) solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.founder-card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border-subtle);
  margin-bottom: 1rem;
}
.founder-card h3 { font-size: 1.25rem; }
.founder-card__role {
  color: var(--color-brand-text);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.founder-card__bio { color: var(--color-text-secondary); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact .section__subtitle {
  margin-left: auto;
  margin-right: auto;
}
.contact__note {
  color: var(--color-text-tertiary);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ---------- footer ---------- */
.sitefoot {
  border-top: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-bg-sunken);
}
.sitefoot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  gap: 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.sitefoot a {
  color: var(--color-brand-text);
  text-decoration: none;
}
.sitefoot a:hover { text-decoration: underline; }
.sitefoot small { color: var(--color-text-tertiary); }

/* ---------- responsive & motion ---------- */
@media (max-width: 44rem) {
  .audience__grid, .founders__grid { grid-template-columns: 1fr; }
  .topbar__nav { gap: 0.6rem; }
  .hero { padding-top: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
