/* ============================================================================
   Projects × Gwen — design system
   Palette, type and the chunky "hard shadow" card style are carried over from
   the original concept design so every new page matches the homepage.
   ========================================================================= */

/* ---- Fonts: self-hosted variable woff2, so no third-party requests ------ */
@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/fredoka-latin-ext.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --purple:       #6C4DF6;
  --purple-deep:  #4A2ED4;
  --purple-soft:  #8B72FF;
  --purple-pale:  #C9BCFF;
  --purple-mist:  #E7E0FF;

  --pink:         #FF5FA2;
  --pink-deep:    #FF3D8B;
  --pink-shadow:  #D42A6E;
  --pink-pale:    #FFC0DA;
  --pink-mist:    #FFE3F0;

  --yellow:       #FFC93C;
  --yellow-soft:  #FFD86B;
  --orange:       #FF9F1C;
  --orange-deep:  #FF6B35;

  --teal:         #3AD9B5;
  --teal-deep:    #17B8A0;
  --teal-pale:    #AEEFDF;
  --sky:          #4AC8F0;
  --violet:       #A24BF0;

  --ink:          #1B1240;
  --ink-soft:     #3B2F6B;
  --ink-muted:    #6B62A0;

  --cream:        #FAF9F5;
  --lavender-bg:  #F4F1FF;
  --white:        #FFFFFF;

  --font-display: 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-body:    'Nunito', system-ui, -apple-system, sans-serif;

  --radius-sm:  16px;
  --radius-md:  26px;
  --radius-lg:  40px;
  --radius-pill: 999px;

  /* The signature look: a flat colour "block" shadow plus a soft ambient one. */
  --shadow-card:  0 12px 0 var(--purple-mist), 0 26px 44px rgba(27, 18, 64, 0.14);
  --shadow-lift:  0 18px 0 var(--purple-pale), 0 34px 54px rgba(27, 18, 64, 0.20);
  --shadow-nav:   0 10px 0 rgba(108, 77, 246, 0.18), 0 22px 40px rgba(27, 18, 64, 0.14);

  --wrap: 1180px;
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--lavender-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Visible keyboard focus everywhere — the default outline is easy to lose
   against these backgrounds. */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--purple);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 800;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Layout ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; }

.section { padding: 46px 0; position: relative; z-index: 1; }
.section-tight { padding: 30px 0; }

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.99; }
h2 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 700; }
h3 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 19px; font-weight: 600; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }

/* Hand-drawn style underline used on section headings in the concept. */
.squiggle { position: relative; display: inline-block; }
.squiggle::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 8px;
  background: var(--yellow);
  border-radius: 999px;
  transform: rotate(-1deg);
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  /* Bottom offset shadow reads as thickness; pressing removes it. */
  box-shadow: 0 6px 0 var(--purple-deep);
  background: var(--purple);
  color: var(--white);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--purple-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--purple-deep); }

.btn-pink   { background: var(--pink);   box-shadow: 0 6px 0 var(--pink-shadow); }
.btn-pink:hover  { box-shadow: 0 8px 0 var(--pink-shadow); }
.btn-pink:active { box-shadow: 0 2px 0 var(--pink-shadow); }

.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 6px 0 var(--orange); }
.btn-yellow:hover  { box-shadow: 0 8px 0 var(--orange); }
.btn-yellow:active { box-shadow: 0 2px 0 var(--orange); }

.btn-teal   { background: var(--teal);   color: var(--ink); box-shadow: 0 6px 0 var(--teal-deep); }
.btn-teal:hover  { box-shadow: 0 8px 0 var(--teal-deep); }
.btn-teal:active { box-shadow: 0 2px 0 var(--teal-deep); }

.btn-ghost {
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 6px 0 var(--purple-mist);
}
.btn-ghost:hover  { box-shadow: 0 8px 0 var(--purple-mist); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--purple-mist); }

.btn-sm { padding: 9px 18px; font-size: 15px; box-shadow: 0 4px 0 var(--purple-deep); }
.btn-sm:hover  { box-shadow: 0 6px 0 var(--purple-deep); }
.btn-sm:active { box-shadow: 0 1px 0 var(--purple-deep); }
.btn-block { display: flex; width: 100%; }

.btn-danger { background: var(--pink-deep); box-shadow: 0 6px 0 var(--pink-shadow); }
.btn-danger:hover  { box-shadow: 0 8px 0 var(--pink-shadow); }
.btn-danger:active { box-shadow: 0 2px 0 var(--pink-shadow); }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

.link-plain { color: var(--purple); font-weight: 800; text-underline-offset: 3px; }

/* ---- Cards ------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.card-lift { box-shadow: var(--shadow-lift); }
.card-pink   { box-shadow: 0 12px 0 var(--pink-pale),   0 26px 44px rgba(27, 18, 64, 0.14); }
.card-teal   { box-shadow: 0 12px 0 var(--teal-pale),   0 26px 44px rgba(27, 18, 64, 0.14); }
.card-purple { box-shadow: 0 12px 0 var(--purple-pale), 0 26px 44px rgba(27, 18, 64, 0.14); }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--purple-mist);
  color: var(--purple);
}
.badge-pink   { background: var(--pink-mist);  color: var(--pink-deep); }
.badge-teal   { background: var(--teal-pale);  color: var(--teal-deep); }
.badge-yellow { background: #FFF3CF;           color: #9A6800; }

/* ---- Navigation -------------------------------------------------------- */
.site-header { padding: 20px 0; position: relative; z-index: 20; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 12px 14px 12px 24px;
  box-shadow: var(--shadow-nav);
}
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;          /* no stray descender space under the image */
}
.nav-brand img {
  /* SVG, so this is a display size rather than a resolution — it stays sharp
     on any screen. 190px is the smallest the wordmark reads cleanly at. */
  width: 190px;
  height: auto;
}
@media (max-width: 860px) { .nav-brand img { width: 168px; } }
@media (max-width: 400px) { .nav-brand img { width: 148px; } }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  display: block;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--purple-mist); color: var(--purple); }
.nav-links a[aria-current="page"] { background: var(--purple-mist); color: var(--purple); }

.nav-toggle {
  display: none;
  background: var(--purple-mist);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav { padding: 12px 14px 12px 20px; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    padding-top: 12px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-cta { width: 100%; }
  .nav-cta .btn { width: 100%; }
}

/* ---- Flash messages ---------------------------------------------------- */
.flashes { display: grid; gap: 10px; margin: 20px 0 0; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  background: var(--purple-mist);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(27, 18, 64, 0.06);
}
.flash-success { background: var(--teal-pale); color: #0E6B5C; }
.flash-error   { background: var(--pink-mist); color: #A81B54; }
.flash-info    { background: #FFF3CF;          color: #8A5A00; }

/* ---- Forms ------------------------------------------------------------- */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.field .hint { font-size: 14px; color: var(--ink-muted); font-weight: 600; }

.input, .textarea, .select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--purple-mist);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: #A79FD0; font-weight: 600; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(108, 77, 246, 0.15);
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.input-error { border-color: var(--pink-deep); }
.error-text { color: #A81B54; font-size: 14px; font-weight: 800; }

.checkbox {
  display: flex; align-items: flex-start; gap: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer;
}
.checkbox input {
  width: 22px; height: 22px; margin-top: 2px;
  accent-color: var(--purple); flex-shrink: 0; cursor: pointer;
}

/* Off-screen rather than display:none — a bot that reads CSS still fills it. */
.honeypot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.form-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

/* ---- Auth pages -------------------------------------------------------- */
.auth-shell { max-width: 520px; margin: 0 auto; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 38px 34px; box-shadow: var(--shadow-lift); }
@media (max-width: 560px) { .auth-card { padding: 28px 22px; border-radius: var(--radius-md); } }

/* Guardian-only blocks are visually distinct so a child does not mistake them
   for something they are meant to fill in. */
.guardian-panel {
  background: #FFF9E8;
  border: 2px dashed var(--yellow);
  border-radius: var(--radius-sm);
  padding: 20px;
}

/* ---- Post cards -------------------------------------------------------- */
.post-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.post-card-media { aspect-ratio: 16 / 9; background: var(--purple-mist); position: relative; overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); line-height: 1.2; }
.post-card-meta { margin-top: auto; font-size: 14px; color: var(--ink-muted); font-weight: 700; }

/* Play badge over a video thumbnail. */
.play-badge {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(27, 18, 64, 0.25);
}
.play-badge::after {
  content: '';
  width: 0; height: 0;
  border-left: 22px solid var(--white);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* ---- Article body ------------------------------------------------------ */
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 1.8em; }
.prose h3 { font-size: clamp(20px, 2.4vw, 26px); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose a { font-weight: 800; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); box-shadow: var(--shadow-card); margin: 1.6em 0; }
.prose blockquote {
  border-left: 6px solid var(--yellow);
  padding: 4px 0 4px 22px;
  color: var(--ink);
  font-style: italic;
}
.prose hr { border: 0; height: 4px; background: var(--purple-mist); border-radius: 999px; margin: 2.4em 0; }
.prose code {
  background: var(--purple-mist);
  padding: 2px 7px;
  border-radius: 7px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  font-weight: 700;
}
.md-code {
  background: var(--ink);
  color: #E7E0FF;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 15px;
  line-height: 1.6;
}
.md-code code { background: none; padding: 0; color: inherit; font-weight: 500; }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--ink);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Comments ---------------------------------------------------------- */
.comment { display: flex; gap: 14px; padding: 18px 0; border-top: 2px solid var(--purple-mist); }
.comment:first-child { border-top: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-body p { overflow-wrap: anywhere; }
.comment-author { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.comment-pending { opacity: 0.7; }

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 18px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }

/* ---- Tables (admin) ---------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 15px; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 2px solid var(--lavender-bg); }
.table th {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  background: var(--purple-mist); white-space: nowrap;
}
.table tr:last-child td { border-bottom: 0; }
.table td.actions { white-space: nowrap; }

/* ---- Admin shell ------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-nav { background: var(--white); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.admin-nav ul { list-style: none; display: grid; gap: 4px; }
.admin-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 15px; border-radius: var(--radius-sm);
  font-weight: 800; font-size: 15px; color: var(--ink-soft); text-decoration: none;
}
.admin-nav a:hover { background: var(--lavender-bg); }
.admin-nav a[aria-current="page"] { background: var(--purple); color: var(--white); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 20px; box-shadow: 0 6px 0 var(--purple-mist);
}
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--purple); line-height: 1; }
.stat-label { font-size: 14px; color: var(--ink-muted); font-weight: 700; margin-top: 6px; }

.pill-count {
  background: var(--pink); color: var(--white);
  border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 800;
}

/* ---- Pagination -------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; list-style: none; }
.pagination a, .pagination span {
  display: grid; place-items: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--white);
  font-weight: 800; text-decoration: none; color: var(--ink-soft);
  box-shadow: 0 4px 0 var(--purple-mist);
}
.pagination a:hover { color: var(--purple); }
.pagination [aria-current="page"] { background: var(--purple); color: var(--white); box-shadow: 0 4px 0 var(--purple-deep); }
.pagination .gap { background: none; box-shadow: none; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #C9BCFF; padding: 54px 0 34px; margin-top: 60px; }
.site-footer h4 { color: var(--white); margin-bottom: 14px; font-size: 17px; }
.site-footer a { color: #C9BCFF; text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 34px; }
.footer-links { list-style: none; display: grid; gap: 9px; font-size: 15px; }
.footer-bottom {
  margin-top: 38px; padding-top: 22px;
  border-top: 1px solid rgba(201, 188, 255, 0.2);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 14px;
}

/* ---- Utilities --------------------------------------------------------- */
.stack   { display: grid; gap: 18px; }
.stack-sm{ display: grid; gap: 10px; }
.stack-lg{ display: grid; gap: 30px; }
.row     { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.center  { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 32px; }
.text-pink { color: var(--pink-deep); } .text-purple { color: var(--purple); } .text-teal { color: var(--teal-deep); }

/* ============================================================================
   Page-specific blocks
   ========================================================================= */

/* ---- Hero -------------------------------------------------------------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 44px;
  align-items: center;
  position: relative;   /* anchors .claude-buddy */
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 0 var(--purple-pale), 0 34px 54px rgba(27, 18, 64, 0.20);
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  object-fit: cover;
}
/* Soft colour wash behind the hero image. */
.hero-blob {
  position: absolute;
  inset: -8% -6% -12% -6%;
  background: linear-gradient(130deg, #6C4DF6 0%, #A24BF0 45%, #FF5FA2 100%);
  border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%;
  filter: blur(2px);
  opacity: 0.35;
  z-index: 0;
}

/* ---- Hero headline -----------------------------------------------------
   The two-tone gradient lettering from the original concept: teal into purple
   on the first line, purple through pink into orange on the second. */
.hero-title {
  /* The original specified up to 82px, but "Watch it get built." only fits the
     567px hero column up to about 75px — above that it breaks after "get".
     72px keeps the original's proportions with a little room to spare. */
  font-size: clamp(38px, 5.6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-title-a,
.hero-title-b {
  /* Painting the gradient through the glyphs needs the text itself to be
     transparent, so this only runs where background-clip is supported —
     otherwise the headline would vanish instead of falling back to ink. */
  color: var(--ink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title-a,
  .hero-title-b {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Keeps descenders from being clipped by the tight line-height. */
    padding-bottom: 0.06em;
  }
  .hero-title-a { background-image: linear-gradient(100deg, #17B8A0 0%, #3AD9B5 35%, #6C4DF6 100%); }
  .hero-title-b { background-image: linear-gradient(100deg, #6C4DF6 10%, #FF5FA2 60%, #FF9F1C 100%); }
}

/* Windows High Contrast mode strips backgrounds; keep the text readable. */
@media (forced-colors: active) {
  .hero-title-a,
  .hero-title-b { color: CanvasText; background-image: none; }
}

/* ---- Feature tiles ----------------------------------------------------- */
.tile-icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 20px;
  font-size: 30px;
  box-shadow: 0 8px 18px rgba(27, 18, 64, 0.18);
}

.step-number {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  box-shadow: 0 6px 0 rgba(27, 18, 64, 0.12);
}

/* ---- Coconut section --------------------------------------------------- */
.coconut-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.05fr);
  gap: 46px;
  align-items: center;
}
@media (max-width: 900px) { .coconut-grid { grid-template-columns: 1fr; gap: 30px; } }

.coconut-art {
  background: linear-gradient(165deg, #FF9F6B 0%, #FF6B35 60%, #E8551F 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 0 #FFE0B8, 0 30px 56px rgba(27, 18, 64, 0.16);
}
.coconut-art img { max-width: 320px; filter: drop-shadow(0 12px 20px rgba(43, 21, 8, 0.35)); }

/* ---- Big call-to-action band ------------------------------------------- */
.cta-band {
  background: linear-gradient(100deg, #6C4DF6 10%, #FF5FA2 60%, #FF9F1C 100%);
  border-radius: var(--radius-lg);
  padding: 56px 34px;
  text-align: center;
  box-shadow: 0 20px 44px rgba(27, 18, 64, 0.24);
}
.cta-band h2 {
  color: var(--white);
  font-size: clamp(30px, 5vw, 60px);
  line-height: 1.04;
  max-width: 16ch;
  margin: 0 auto;
  letter-spacing: -0.03em;
}
@media (max-width: 560px) { .cta-band { padding: 38px 22px; } }

/* ---- Newsletter form --------------------------------------------------- */
.newsletter-form .input { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.92); }

/* ---- Blog listing header ----------------------------------------------- */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-chip {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--purple-mist);
}
.filter-chip[aria-current="true"] { background: var(--purple); color: var(--white); box-shadow: 0 4px 0 var(--purple-deep); }

/* ---- Article header ---------------------------------------------------- */
.article-header { max-width: 760px; margin: 0 auto; text-align: center; }
.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  margin: 32px auto 0;
  max-width: 900px;
}
.article-cover img { width: 100%; }

.empty-state {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 48px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

/* Placeholder art for a post with no cover image. */
.post-card-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 54px;
  opacity: 0.9;
  filter: drop-shadow(0 6px 12px rgba(27, 18, 64, 0.3));
}

/* ============================================================================
   Moving star field — carried over from the original concept design.
   Two shapes (a 4-point sparkle and a 5-point star), twelve brand colours.
   The elements are generated by site.js; this file only describes them.
   ========================================================================= */

/*
 * The field is absolutely positioned over the whole document rather than fixed
 * to the viewport, so the stars travel with the text as you scroll — the way
 * the original concept did it, where each star lived inside a section.
 *
 * Sized by pinning all four edges to <body>, never by a pixel height from
 * JavaScript. Because <body> is the containing block and its height is its
 * content, the layer is always exactly as tall as the page — and it re-resolves
 * for free whenever the page reflows: window resize, phone rotation, a late web
 * font, a slow image. An earlier version measured the height in JS and set it
 * in pixels, which could only ever grow (the layer counts toward the document's
 * own scrollHeight, so it ended up measuring itself) and left dead scrollable
 * space under the footer once the page got shorter.
 */
.pxg-stars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;      /* never intercepts a click */
  overflow: hidden;          /* a star near the edge cannot cause scrollbars */
  contain: layout paint;     /* repaints stay inside the layer */
}

/* Gives .pxg-stars a containing block that spans the document, not the viewport. */
body { position: relative; }

/* Slow, huge colour washes drifting behind everything — also from the original. */
.pxg-blob {
  position: absolute;
  border-radius: 50%;
  animation-name: pxgDrift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes pxgDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(60px, -40px, 0) scale(1.08); }
  66%      { transform: translate3d(-40px, 30px, 0) scale(0.95); }
}

/* Content sits above the star field. Declaring this explicitly means the
   stacking order does not depend on which elements happen to be positioned. */
body > .site-header,
body > main,
body > .site-footer { position: relative; z-index: 1; }

.pxg-star {
  position: absolute;
}

.pxg-star-sparkle {
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
  animation-name: pxgTwinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.pxg-star-point {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.75;
  animation-name: pxgStar;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes pxgTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(var(--r, 0deg)); }
  50%      { opacity: 1;    transform: scale(1.3) rotate(calc(var(--r, 0deg) + 12deg)); }
}

@keyframes pxgStar {
  0%, 100% { opacity: 0.55; transform: translateY(0) rotate(var(--r, 0deg)) scale(1); }
  50%      { opacity: 1;    transform: translateY(-26px) rotate(calc(var(--r, 0deg) + 22deg)) scale(1.18); }
}

/*
 * The global reduced-motion rule freezes every animation at its final frame,
 * which would leave the sparkles at 15% opacity and effectively invisible.
 * Stars stay, they just stop moving.
 */
@media (prefers-reduced-motion: reduce) {
  .pxg-star,
  .pxg-blob        { animation: none !important; }
  .pxg-star-sparkle{ opacity: 0.55; transform: rotate(var(--r, 0deg)); }
  .pxg-star-point  { opacity: 0.6;  transform: rotate(var(--r, 0deg)); }
}

/* ============================================================================
   The Claude character — rebuilt from the original concept design.
   ========================================================================= */

.claude-buddy {
  position: absolute;
  bottom: -38px;
  left: 44%;
  width: 150px;
  z-index: 4;
  pointer-events: none;
  animation: pxgBob 4.2s ease-in-out infinite;
}

.claude-body { position: relative; width: 128px; height: 128px; margin: 0 auto; }

.claude-antenna-stalk {
  position: absolute; left: 50%; top: -26px;
  width: 4px; height: 22px;
  background: var(--purple-pale);
  transform: translateX(-50%);
}

.claude-antenna-tip {
  position: absolute; left: 50%; top: -40px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 201, 60, 0.9);
  transform: translateX(-50%);
  animation: pxgAntenna 2.4s ease-in-out infinite;
}

.claude-face {
  position: absolute; inset: 0;
  border-radius: 38px;
  background: linear-gradient(165deg, #FF9F6B 0%, #FF6B35 60%, #E8551F 100%);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.14), 0 20px 34px rgba(232, 85, 31, 0.35);
}

.claude-arm {
  position: absolute;
  width: 30px; height: 16px;
  border-radius: 10px;
  background: #FF8A5B;
}
.claude-arm-left {
  left: -22px; top: 42px;
  transform-origin: right center;   /* pivots at the shoulder, not the hand */
  animation: pxgWave 1.6s ease-in-out infinite;
}
.claude-arm-right { right: -22px; top: 52px; }

.claude-eye {
  position: absolute; top: 44px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #2B1508;
  animation: pxgBlink 4.6s ease-in-out infinite;
}
.claude-eye-left  { left: 26px; }
.claude-eye-right { right: 26px; }

.claude-smile {
  position: absolute; left: 50%; top: 78px;
  width: 34px; height: 17px;
  border-radius: 0 0 34px 34px;
  background: #2B1508;
  transform: translateX(-50%);
}

.claude-label {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--ink);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 0 rgba(27, 18, 64, 0.25);
  white-space: nowrap;
}

@keyframes pxgBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}
@keyframes pxgBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.1); }
}
@keyframes pxgWave {
  0%, 100% { transform: rotate(8deg); }
  50%      { transform: rotate(-32deg); }
}
@keyframes pxgAntenna {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50%      { transform: translateX(-50%) translateY(-5px) scale(1.15); }
}

/* Stacked layout: Claude sits under the photo instead of between the columns. */
@media (max-width: 900px) {
  .claude-buddy {
    position: static;
    margin: 26px auto 0;
    left: auto;
    bottom: auto;
  }
}

/* ============================================================================
   Floating music toggle
   ========================================================================= */

.music-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;              /* above the page, below any future modal */
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px 12px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--purple);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--purple-mist), 0 14px 26px rgba(27, 18, 64, 0.18);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.music-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 0 var(--purple-mist), 0 18px 30px rgba(27, 18, 64, 0.22); }
.music-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--purple-mist); }

/* Playing: the button fills in so the state is obvious at a glance, not just
   from the icon. */
.music-toggle.is-playing .music-btn {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 6px 0 var(--purple-deep), 0 14px 26px rgba(108, 77, 246, 0.35);
}
.music-toggle.is-playing .music-btn:hover  { box-shadow: 0 8px 0 var(--purple-deep), 0 18px 30px rgba(108, 77, 246, 0.4); }
.music-toggle.is-playing .music-btn:active { box-shadow: 0 2px 0 var(--purple-deep); }

.music-icon { display: inline-flex; line-height: 0; }

/* The notes bob gently while the track plays. */
.music-toggle.is-playing .music-note { animation: musicBob 1.1s ease-in-out infinite; }
.music-toggle.is-playing .music-note:nth-of-type(2) { animation-delay: 0.15s; }
.music-toggle.is-playing .music-note:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes musicBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* A slash through the note while muted, so the off state reads without colour. */
.music-btn::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-1px, 0) rotate(-45deg);
  margin-left: 1px;
  opacity: 1;
  transition: opacity 0.14s ease;
  pointer-events: none;
}
.music-btn { position: relative; }
.music-toggle.is-playing .music-btn::after { opacity: 0; }

@media (max-width: 620px) {
  .music-toggle { right: 14px; bottom: 14px; }
  .music-btn { padding: 11px 14px; }
  .music-label { display: none; }        /* icon only, to stay out of the way */
  .music-btn::after { transform: translate(-11px, 0) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing .music-note { animation: none; }
}

/* ============================================================================
   Narrow-screen corrections
   ========================================================================= */

/*
 * The soft wash behind the hero photo bleeds outside its box by design. On a
 * phone in landscape the column is nearly the full width, so that bleed pushed
 * past the viewport edge. body{overflow-x:hidden} was clipping it, but relying
 * on clipping is fragile — iOS Safari does not always agree — so the bleed is
 * simply removed once the layout goes single-column.
 */
@media (max-width: 900px) {
  .hero-blob { inset: -6% 0 -8% 0; }
}

/*
 * Very small phones (SE-sized, 320-400px). The logo and the Menu button were
 * fighting for the same row and overlapping. Tightening the gutters buys back
 * enough width for both to sit comfortably without shrinking the wordmark to
 * the point where it stops being readable.
 */
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .nav { padding: 10px 10px 10px 14px; gap: 10px; }
  .nav-brand img { width: 140px; }
  .nav-toggle { padding: 9px 12px; font-size: 14px; }
}
