/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import "actiontext.css";

:root {
  --page-bg: #f4efe6;
  --surface: #fffaf2;
  --surface-strong: #fffdf8;
  --ink: #1b1711;
  --muted: #675a4c;
  --accent: #bf4f2f;
  --accent-deep: #8f3318;
  --line: rgba(27, 23, 17, 0.12);
  --shadow: 0 20px 45px rgba(31, 24, 18, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(191, 79, 47, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, var(--page-bg) 100%);
  font-family: Georgia, "Times New Roman", serif;
}

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

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.site-brand a {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.site-nav__link,
.site-nav__button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--surface-strong);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}

.site-nav__link--strong,
.site-nav__button {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.site-nav__button {
  cursor: pointer;
}

.site-nav__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.flash-stack {
  margin: 18px 0;
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.flash--alert {
  border-color: rgba(191, 79, 47, 0.24);
}

.page-content {
  margin-top: 28px;
}

.hero,
.story,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
  margin-bottom: 28px;
}

.hero h1,
.story__title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.hero__summary,
.story__summary {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.post-card,
.empty-state,
.story {
  padding: 24px;
}

.post-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.post-card__meta,
.story__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card__title {
  display: inline-block;
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1.1;
  text-decoration: none;
}

.post-card__summary,
.post-card__video,
.story__body {
  line-height: 1.7;
}

.video-thumb {
  margin: -24px -24px 18px;
}

.video-thumb__link {
  display: block;
  text-decoration: none;
}

.video-thumb__image,
.video-thumb--placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px 24px 0 0;
}

.video-thumb__image {
  object-fit: cover;
  background: #e8e0d3;
}

.video-thumb--placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(191, 79, 47, 0.94), rgba(35, 31, 26, 0.98)),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  color: white;
}

.video-thumb__badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-thumb__title {
  font-size: 1.2rem;
  line-height: 1.1;
}

.video-thumb__meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
}

.story__video {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: rgba(191, 79, 47, 0.08);
}

.story__player {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.admin-hero,
.admin-card,
.admin-listing-header,
.admin-filter-bar,
.editor-shell,
.admin-form-errors {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-hero,
.admin-listing-header,
.admin-filter-bar,
.admin-form-errors {
  padding: 24px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.admin-card {
  padding: 22px;
}

.admin-card--article {
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.95), rgba(255, 255, 255, 0.9));
}

.admin-card--video {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.admin-card--ops {
  background: linear-gradient(180deg, rgba(243, 241, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.admin-card--taxonomy {
  background: linear-gradient(180deg, rgba(238, 250, 241, 0.95), rgba(255, 255, 255, 0.9));
}

.admin-card__link,
.admin-primary-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.admin-meta {
  color: var(--muted);
}

.admin-listing-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.admin-listing-header--article {
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.9), rgba(255, 255, 255, 0.92));
}

.admin-listing-header--video {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.92));
}

.admin-listing-header--taxonomy {
  background: linear-gradient(180deg, rgba(238, 250, 241, 0.9), rgba(255, 255, 255, 0.92));
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-filter-bar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.editor-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.editor-shell--article {
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.9), rgba(255, 255, 255, 0.95));
}

.editor-shell--video {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.95));
}

.editor-shell--taxonomy {
  background: linear-gradient(180deg, rgba(238, 250, 241, 0.9), rgba(255, 255, 255, 0.95));
}

.editor-sidebar {
  padding-right: 8px;
}

.editor-sidebar__field,
.editor-main__field {
  margin-bottom: 16px;
}

.editor-main__actions {
  margin-top: 18px;
}

.editor-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

input,
textarea,
select {
  width: 100%;
  max-width: 640px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

trix-editor {
  min-height: 260px;
  max-width: 760px;
  background: white;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px;
  }

  .site-header {
    padding: 20px;
  }

  .site-header,
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-listing-header,
  .editor-shell {
    grid-template-columns: 1fr;
    display: grid;
  }
}
