/* =================================================================
   Between Prompts — design system.
   Editorial-technical: warm off-white text on near-black, electric
   chartreuse accent reserved for CTAs only, warm orange "signal" for
   the brackets motif and tier highlights. Square corners, hairline
   borders, no purple-to-blue gradients.
   ================================================================= */

/* ─── Tokens ──────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg-base:      #0B0B0C;
  --bg-elevated:  #141416;
  --bg-subtle:    #1C1C1F;
  --border:       #2A2A2E;

  /* Text */
  --text-primary:   #F4F1EA;
  --text-secondary: #A8A39A;
  --text-muted:     #6E6A63;

  /* Accents */
  --accent:     #E8FF4A;
  --accent-ink: #0B0B0C;
  --signal:     #FF5C2A;

  /* Type scale */
  --t-mono-xs: 11px;
  --t-mono-sm: 12px;
  --t-body-sm: 14px;
  --t-body:    17px;
  --t-body-lg: 19px;
  --t-h3:      22px;
  --t-h2:      30px;
  --t-h1:      44px;

  /* Families — Google Fonts loaded in <head>. */
  --font-sans:  "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono:  "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Layout */
  --max-w:        1200px;
  --max-w-narrow: 760px;
  --max-w-fluid:  1440px;
}

/* ─── Reset / base ────────────────────────────────────────── */

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  letter-spacing: -0.005em;
  /* Subtle film grain — kills the digital flatness of pure dark. */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.92 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

img, svg { display: block; max-width: 100%; }

p { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Display / editorial type ────────────────────────────── */

.display-xl,
.display-lg,
.display-md {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.display-xl { font-size: clamp(56px, 9vw, 112px); }
.display-lg { font-size: clamp(44px, 7vw, 80px); }
.display-md { font-size: clamp(34px, 5vw, 56px); }

.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); }

/* ─── Mono utility ────────────────────────────────────────── */

.mono { font-family: var(--font-mono); letter-spacing: 0; }

/* Brackets motif — recurring brand signature. */
.brackets::before { content: "[ "; color: var(--signal); }
.brackets::after  { content: " ]"; color: var(--signal); }

/* Magazine "01 / SERVICES" eyebrows. */
.eyebrow,
.section-marker {
  font-family: var(--font-mono);
  font-size: var(--t-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.section-marker { letter-spacing: 0.2em; }

/* ─── Layout primitives ───────────────────────────────────── */

.container         { max-width: var(--max-w);         margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--max-w-narrow);  margin: 0 auto; padding: 0 24px; }
.container--fluid  { max-width: var(--max-w-fluid);   margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) {
  .container, .container--narrow, .container--fluid { padding: 0 40px; }
}

.hairline {
  border: 1px solid var(--border);
}

.divider-top { border-top: 1px solid var(--border); }

.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-signal    { color: var(--signal); }
.text-primary   { color: var(--text-primary); }

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--text-primary); }
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.btn--secondary:hover { background: var(--bg-elevated); }
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  height: auto;
  padding: 0;
  border: 0;
}
.btn--ghost:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ─── Site header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-base) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) {
  .site-header__inner { padding: 0 40px; }
}
.site-nav {
  display: none;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) {
  .site-nav { display: flex; }
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: color 150ms;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--accent-ink);
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  transition: background-color 150ms;
}
.site-nav__cta:hover { background: var(--text-primary); }

/* ─── Wordmark ────────────────────────────────────────────── */

.wordmark {
  display: inline-block;
  background-color: var(--text-primary);
  -webkit-mask-image: url(/assets/img/logo.svg);
          mask-image: url(/assets/img/logo.svg);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
/* Aspect ratio of the source viewBox is ~2.49:1; sizes set height. */
.wordmark--sm { width: 35px;  height: 14px; }
.wordmark--md { width: 50px;  height: 20px; }
.wordmark--lg { width: 80px;  height: 32px; }

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
}
@media (min-width: 768px) {
  .hero { padding: 112px 0 128px; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.6;
  background:
    radial-gradient(60% 40% at 30% 20%, rgba(232,255,74,0.06), transparent 60%),
    radial-gradient(50% 35% at 80% 60%, rgba(255,92,42,0.05), transparent 60%);
}
.hero__eyebrow { margin-bottom: 40px; }
@media (min-width: 768px) { .hero__eyebrow { margin-bottom: 64px; } }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: end;
}
@media (min-width: 768px) {
  .hero__grid { grid-template-columns: repeat(12, 1fr); gap: 0 40px; }
}
.hero__title         { grid-column: 1 / -1; }
.hero__title em      { font-style: normal; color: var(--signal); }
.hero__title .muted  { color: var(--text-muted); }
.hero__aside         { grid-column: 1 / -1; padding-bottom: 16px; }
@media (min-width: 768px) {
  .hero__title { grid-column: 1 / span 8; }
  .hero__aside { grid-column: 9 / span 4; }
}
.hero__aside p {
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 32px;
  max-width: 420px;
}
.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 600px) {
  .hero__cta { flex-direction: row; }
}

/* ─── Section header (number / marker / title / lede) ─────── */

.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
@media (min-width: 768px) { .section { padding: 112px 0; } }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (min-width: 768px) {
  .section-head { grid-template-columns: repeat(12, 1fr); gap: 40px; margin-bottom: 64px; }
  .section-head__marker { grid-column: 1 / span 3; }
  .section-head__body   { grid-column: 4 / span 9; }
}
.section-head__title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 16px;
}
.section-head__lede {
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.4;
  max-width: 640px;
}

/* ─── Tier card ───────────────────────────────────────────── */

.tier-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .tier-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .tier-grid { grid-template-columns: repeat(4, 1fr); } }

.tier {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 32px;
  min-height: 480px;
  transition: background-color 200ms;
}
.tier:hover { background: var(--bg-subtle); }
.tier__marker { margin-bottom: 32px; }
.tier__locked {
  margin-left: 12px;
  color: var(--signal);
}
.tier__name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.tier__price {
  font-family: var(--font-mono);
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.tier__price span {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 8px;
}
.tier__body {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  flex: 1;
}
.tier__cta {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  transition: color 150ms;
}
.tier__cta:hover { color: var(--accent); }

/* ─── Course card ─────────────────────────────────────────── */

.course-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .course-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .course-grid { grid-template-columns: repeat(4, 1fr); } }

.course {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  padding: 28px;
  transition: background-color 150ms;
}
.course:hover                       { background: var(--bg-elevated); }
.course--coming-soon                { opacity: 0.7; }
.course--coming-soon:hover          { background: transparent; }

.course__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.course__topic {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
}
.course__title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.course__summary {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}
.course__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.course__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.course__price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}
.course__price--free { color: var(--accent); }

/* ─── Email capture ───────────────────────────────────────── */

.email-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 600px) { .email-form { flex-direction: row; } }
.email-form--footer { max-width: 460px; }

.email-form__input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: border-color 150ms;
}
.email-form__input::placeholder { color: var(--text-muted); }
.email-form__input:focus { border-color: var(--accent); outline: none; }
.email-form__input:disabled { opacity: 0.6; }

.email-form__submit {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: var(--accent-ink);
  height: 48px;
  padding: 0 24px;
  border: 0;
  cursor: pointer;
  transition: background-color 150ms;
}
.email-form__submit:hover           { background: var(--text-primary); }
.email-form__submit:disabled        { opacity: 0.6; cursor: not-allowed; }
.email-form[data-state="ok"] .email-form__submit { background: var(--text-primary); }

/* ─── Pull-quote ──────────────────────────────────────────── */

.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.pull-quote .muted { color: var(--text-muted); }

/* ─── Community block ─────────────────────────────────────── */

.community {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .community { grid-template-columns: repeat(12, 1fr); }
  .community__marker { grid-column: 1 / span 3; }
  .community__body   { grid-column: 4 / span 9; }
}
.community__title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 20px;
}
.community__body p {
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.45;
  margin-bottom: 24px;
  max-width: 640px;
}

/* ─── Footer ──────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 128px;
}
.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
}
@media (min-width: 768px) { .site-footer__inner { padding: 64px 40px; } }

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 64px;
}
@media (min-width: 768px) {
  .footer-top { grid-template-columns: repeat(12, 1fr); }
  .footer-top__about    { grid-column: 1 / span 7; }
  .footer-top__capture  { grid-column: 8 / span 5; }
}
.footer-top__about p {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 460px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-bottom: 64px;
}
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-secondary);
  transition: color 150ms;
}
.footer-col a:hover { color: var(--text-primary); }

.colophon {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
@media (min-width: 768px) {
  .colophon { grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .colophon__note    { grid-column: 1 / span 7; }
  .colophon__legal   { grid-column: 8 / span 5; text-align: right; }
}

/* ─── Styleguide-only helpers ─────────────────────────────── */

.sg-block {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.sg-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 600px) { .sg-color-grid { grid-template-columns: repeat(4, 1fr); } }
.sg-swatch { border: 1px solid var(--border); padding: 16px; }
.sg-swatch__chip { height: 64px; margin-bottom: 12px; }
.sg-swatch__name,
.sg-swatch__hex {
  font-family: var(--font-mono);
  font-size: 11px;
}
.sg-swatch__hex { color: var(--text-muted); }
.sg-sample-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .sg-sample-row { grid-template-columns: 160px 1fr; gap: 24px; }
}
.sg-sample-row__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ─── Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
