/*
  Chookington Apps styles. Mobile first: phone layout is the default,
  wider screens are added with min-width media queries.

  Look: royal blue + Montserrat (the Team HQ look, approved by Keem).
  Montserrat is used only if it is installed on the visitor's device: no web
  fonts are downloaded, so nothing is loaded from another website. Every
  text/background pair is at least 4.5:1 contrast (WCAG AA).
*/
:root {
  --bg: #f5f7fc;
  --surface: #ffffff;
  --text: #0b1533;
  --muted: #4a5578;
  --accent: #1a3ea8;
  --on-accent: #ffffff;
  --border: #d6ddef;
  --soon-bg: #e6ecfb;
  --soon-text: #1a3ea8;
  --live-bg: #1e6b34;
  --live-text: #ffffff;
  --focus: #c2410c;

  --radius: 12px;
  --font: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* main and #apps get focus from the skip link and "See the apps" button.
   Show a thin, quiet outline there instead of the full focus ring. */
main:focus,
section:focus {
  outline: 2px dashed var(--focus);
  outline-offset: -2px;
}

/* Skip link: off screen until it gets keyboard focus */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.brand {
  margin: 0;
  padding: 0.75rem 0;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-mark {
  margin-right: 0.25rem;
}

/* Hero: a bold royal blue band with white text */
.hero {
  padding: 3rem 0 2.5rem;
  background: var(--accent);
  color: var(--on-accent);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
  color: #dbe4ff;
}

.hero .button {
  background: var(--on-accent);
  color: var(--accent);
}

.hero :focus-visible {
  outline-color: var(--on-accent);
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.button:hover {
  text-decoration: underline;
}

/* Apps grid: 1 column on phones, 2 on tablets, 3 on desktops */
.apps,
.workshop,
.about,
.prose {
  padding: 2rem 0;
}

.apps h2,
.workshop h2,
.about h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

/* Stretched link: makes the whole live card clickable */
.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card-title a:focus-visible {
  outline: none;
}

.card--live:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.card--live:hover {
  border-color: var(--accent);
}

.card--live:hover .card-title a {
  text-decoration: underline;
}

.card-blurb {
  margin: 0;
  color: var(--muted);
}

.badge {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 0.125rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 999px;
}

.badge--soon {
  background: var(--soon-bg);
  color: var(--soon-text);
}

.badge--live {
  background: var(--live-bg);
  color: var(--live-text);
}

/* "In the workshop": lighter, smaller cards */
.section-intro {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
}

.app-grid--compact {
  gap: 0.75rem;
}

@media (min-width: 64em) {
  .app-grid--compact {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card--workshop {
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  background: transparent;
  border-style: dashed;
}

.card--workshop .card-icon {
  font-size: 1.5rem;
}

.card--workshop .card-title {
  font-size: 1.0625rem;
}

.card--workshop .card-blurb {
  font-size: 0.9375rem;
}

.notice {
  padding: 1rem;
  background: var(--soon-bg);
  color: var(--soon-text);
  border-radius: var(--radius);
}

.about p,
.prose .wrap > * {
  max-width: 40rem;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  background: var(--text);
  color: var(--bg);
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--bg);
}

/* 404 page */
.not-found {
  padding: 4rem 0;
}

.not-found h1 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: clamp(2rem, 8vw, 3rem);
}

/* Respect people who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
