@import url("/assets/actiontext-e646701d.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap");

/* ─────────────────────────────────────────────────────
   TOKENS — light (default)
───────────────────────────────────────────────────── */

:root,
[data-color-scheme="light"] {
  color-scheme: light;

  /* Surfaces */
  --bg:            #f8f7f5;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #f0eee9;
  --bg-overlay:    rgba(255, 255, 255, 0.88);

  /* Borders */
  --border:        #e4e1da;
  --border-strong: #cac7be;

  /* Text */
  --text:          #18150e;
  --text-muted:    #6b6860;
  --text-faint:    #a8a49b;

  /* Accent — VybeCod.ing ember */
  --accent:        #e8440a;
  --accent-hover:  #cf3d09;
  --accent-soft:   #f06030;
  --accent-bg:     #fff3ef;
  --accent-border: #f5c0aa;

  /* Semantic */
  --cyan:    oklch(52% 0.13 192);
  --success: oklch(52% 0.14 148);
  --danger:  #dc2626;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 10px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 36px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  --shadow-focus: 0 0 0 3px rgba(232,68,10,.18);
}

/* ─────────────────────────────────────────────────────
   TOKENS — dark (system preference)
───────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root:not([data-color-scheme="light"]) {
    color-scheme: dark;

    --bg:            #0f0e0d;
    --bg-elevated:   #1a1816;
    --bg-sunken:     #0b0a09;
    --bg-overlay:    rgba(15,14,13,.9);

    --border:        #2d2b27;
    --border-strong: #3f3c38;

    --text:          #f0ece4;
    --text-muted:    #8c8880;
    --text-faint:    #504d48;

    --accent:        #e8440a;
    --accent-hover:  #f05525;
    --accent-soft:   oklch(66% .16 38);
    --accent-bg:     #1d0d07;
    --accent-border: #5a1e0a;

    --cyan:    oklch(70% .13 190);
    --success: oklch(62% .14 148);
    --danger:  #f87171;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
    --shadow-md: 0 4px 10px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.25);
    --shadow-lg: 0 16px 36px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
    --shadow-focus: 0 0 0 3px rgba(232,68,10,.25);
  }
}

/* ─────────────────────────────────────────────────────
   TOKENS — dark (manual override)
───────────────────────────────────────────────────── */

[data-color-scheme="dark"] {
  color-scheme: dark;

  --bg:            #0f0e0d;
  --bg-elevated:   #1a1816;
  --bg-sunken:     #0b0a09;
  --bg-overlay:    rgba(15,14,13,.9);

  --border:        #2d2b27;
  --border-strong: #3f3c38;

  --text:          #f0ece4;
  --text-muted:    #8c8880;
  --text-faint:    #504d48;

  --accent:        #e8440a;
  --accent-hover:  #f05525;
  --accent-soft:   oklch(66% .16 38);
  --accent-bg:     #1d0d07;
  --accent-border: #5a1e0a;

  --cyan:    oklch(70% .13 190);
  --success: oklch(62% .14 148);
  --danger:  #f87171;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  --shadow-md: 0 4px 10px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.25);
  --shadow-lg: 0 16px 36px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
  --shadow-focus: 0 0 0 3px rgba(232,68,10,.25);
}

/* ─────────────────────────────────────────────────────
   RESET + BASE
───────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--bg);
  background-image: linear-gradient(180deg, color-mix(in oklch, var(--accent) 6%, transparent), transparent 360px);
  color: var(--text);
  font-family: "Inter", "system-ui", -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  transition: background-color .25s, color .25s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration-color: color-mix(in oklch, var(--accent) 55%, transparent);
  text-underline-offset: .2em;
  transition: color .15s;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
  color: var(--text);
}

h1 { font-size: clamp(2.6rem, 5vw + 1rem, 4.4rem); margin-bottom: .5em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.75rem);   margin-bottom: .4em; }
h3 { font-size: 1.2rem;  margin-bottom: .35em; }

p  { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: .6em;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lede {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

.byline {
  color: var(--text-faint);
  font-size: .82rem;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────────────── */

.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.reading-width { max-width: 720px; }

.page-shell { min-height: 72vh; }

/* ─────────────────────────────────────────────────────
   SITE HEADER
───────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background-color .25s, border-color .25s;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

/* ─────────────────────────────────────────────────────
   BRAND MARK
───────────────────────────────────────────────────── */

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--text);
}

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

.brand-mark__sigil {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-border);
  border-radius: 10px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}

.brand-mark:hover .brand-mark__sigil {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.brand-mark__name {
  font-size: .95rem;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────
   NAV
───────────────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.site-nav a:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

/* ─────────────────────────────────────────────────────
   THEME TOGGLE
───────────────────────────────────────────────────── */

.theme-toggle {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-sunken);
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }

[data-color-scheme="dark"]  .theme-toggle .icon-sun  { display: none; }
[data-color-scheme="dark"]  .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-color-scheme="light"]) .theme-toggle .icon-sun  { display: none; }
  :root:not([data-color-scheme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ─────────────────────────────────────────────────────
   FLASH MESSAGES
───────────────────────────────────────────────────── */

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
}

.flash--notice {
  background: color-mix(in oklch, var(--success) 10%, var(--bg-elevated));
  border: 1px solid color-mix(in oklch, var(--success) 30%, transparent);
  color: var(--success);
}

.flash--alert {
  background: color-mix(in oklch, var(--danger) 10%, var(--bg-elevated));
  border: 1px solid color-mix(in oklch, var(--danger) 30%, transparent);
  color: var(--danger);
}

/* ─────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────── */

.content-hero,
.list-heading {
  border-bottom: 1px solid var(--border);
}

.content-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  gap: 56px;
  align-items: center;
  padding: 80px 0 60px;
}

.content-hero__copy { min-width: 0; }

.list-heading .shell {
  padding: 60px 0 36px;
}

/* ─────────────────────────────────────────────────────
   CONTENT BAND
───────────────────────────────────────────────────── */

.content-band {
  padding: 52px 0 72px;
}

/* ─────────────────────────────────────────────────────
   FEATURE MEDIA
───────────────────────────────────────────────────── */

.feature-media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-sunken);
  box-shadow: var(--shadow-md);
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─────────────────────────────────────────────────────
   POST GRID + CARDS
───────────────────────────────────────────────────── */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.post-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.03);
}

.post-card__body {
  min-width: 0;
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card h2 {
  font-size: 1.1rem;
  letter-spacing: -.015em;
  margin-bottom: 0;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.55;
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────────────
   TOPIC LIST + CHIPS
───────────────────────────────────────────────────── */

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}

.topic-chip:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ─────────────────────────────────────────────────────
   STATUS PILL
───────────────────────────────────────────────────── */

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────
   SITE FOOTER
───────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  transition: border-color .25s;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-size: .84rem;
}

.site-footer a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color .15s;
}

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

/* ─────────────────────────────────────────────────────
   TRIX / RICH TEXT OUTPUT
───────────────────────────────────────────────────── */

.trix-content {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  letter-spacing: -.005em;
}

.trix-content > * + * { margin-top: 1.2em; }

.trix-content h1,
.trix-content h2,
.trix-content h3 {
  color: var(--text);
  margin-top: 2em;
  margin-bottom: .4em;
}

.trix-content h1 { font-size: 1.8rem; }
.trix-content h2 { font-size: 1.4rem; }
.trix-content h3 { font-size: 1.15rem; }

.trix-content a {
  color: var(--accent-soft);
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
}

.trix-content a:hover { color: var(--accent); }

.trix-content strong { color: var(--text); font-weight: 600; }

.trix-content blockquote {
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 10px 10px 0;
  color: var(--text);
  font-style: italic;
}

.trix-content code {
  padding: 2px 6px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .88em;
  color: var(--accent-soft);
}

.trix-content pre {
  padding: 18px 20px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}

.trix-content pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: .9rem;
}

.trix-content ul,
.trix-content ol {
  padding-left: 1.5em;
}

.trix-content img {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* ─────────────────────────────────────────────────────
   FORM ELEMENTS (global — auth + any inline forms)
───────────────────────────────────────────────────── */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────── */

.btn,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}

.btn:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(232,68,10,.3);
  transform: translateY(-1px);
  color: #fff;
}

.btn:active,
input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn--secondary {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--bg-sunken);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--bg-sunken);
  color: var(--text);
  box-shadow: none;
}

.btn--full { width: 100%; }

/* ─────────────────────────────────────────────────────
   AUTH LAYOUT
───────────────────────────────────────────────────── */

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
  background-image: linear-gradient(180deg, color-mix(in oklch, var(--accent) 6%, transparent), transparent 400px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}

.auth-brand .brand-mark__sigil {
  width: 40px;
  height: 40px;
  font-size: .85rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 36px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.auth-card__header {
  margin-bottom: 28px;
}

.auth-card__header h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  letter-spacing: -.025em;
}

.auth-card__header p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .btn { margin-top: 6px; }

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: .84rem;
  color: var(--text-faint);
}

.auth-footer a {
  color: var(--text-muted);
  font-weight: 500;
}

.auth-footer a:hover { color: var(--accent); }

/* ─────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────── */

@media (max-width: 800px) {
  .site-header__inner {
    padding: 12px 0;
  }

  .brand-mark__name { display: none; }

  .content-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 52px 0 44px;
  }

  .content-hero__grid .feature-media {
    order: -1;
  }

  h1 { letter-spacing: -.03em; }

  .content-band { padding: 36px 0 56px; }

  .list-heading .shell { padding: 44px 0 28px; }

  .post-grid { grid-template-columns: 1fr; }

  .auth-card { padding: 28px 24px 32px; }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 32px); }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0;
  }
}
