/* ==========================================================================
   Ednan.fyi — category (pillar) hub
   Extracted from the Phase 2 prototype, Travel Updates hub.
   Tokens follow Phase 1 Direction: no shadows, 2px radii, 1px hairlines,
   Deep Leaf as a surface, one Coffee Cherry thing per screen.
   ========================================================================== */

.ed-cat {
  --ed-leaf-deep: #173D22;
  --ed-brown:     #4A2B1E;
  --ed-cherry:    #A91F32;
  --ed-green:     #2E6B35;
  --ed-cream:     #F6F0DF;
  --ed-olive:     #87985A;

  --ed-hairline:  rgba(74, 43, 30, 0.14);
  --ed-rule:      rgba(74, 43, 30, 0.20);
  --ed-rule-soft: rgba(74, 43, 30, 0.28);
  --ed-on-leaf:   rgba(246, 240, 223, 0.85);
  --ed-on-leaf-q: rgba(246, 240, 223, 0.60);

  --ed-wrap: 1240px;
  --ed-gut: clamp(18px, 4vw, 48px);
  --ed-radius: 2px;

  /* per-pillar accent, overridden inline by the template */
  --ed-accent: var(--ed-cherry);

  background: var(--ed-cream);
  color: var(--ed-brown);
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

.ed-cat a { color: var(--ed-cherry); text-decoration: none; }
.ed-cat a:hover { color: var(--ed-leaf-deep); }
.ed-cat *:focus-visible { outline: 3px solid var(--ed-cherry); outline-offset: 3px; }
.ed-cat ::selection { background: var(--ed-cherry); color: var(--ed-cream); }

.ed-wrap {
  max-width: var(--ed-wrap);
  margin: 0 auto;
  padding-left: var(--ed-gut);
  padding-right: var(--ed-gut);
}

.ed-sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%);
}

/* --- Hero band ----------------------------------------------------------- */

.ed-hero {
  background: var(--ed-leaf-deep);
  color: var(--ed-cream);
}
.ed-hero .ed-wrap {
  padding-top: clamp(34px, 5vw, 72px);
  padding-bottom: clamp(30px, 4vw, 56px);
}
.ed-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.ed-cat .ed-crumbs a { color: var(--ed-cream); opacity: 0.7; }
.ed-cat .ed-crumbs a:hover { opacity: 1; color: var(--ed-olive); }
.ed-crumbs .ed-sep { color: var(--ed-olive); }
.ed-crumbs .ed-here { opacity: 0.6; }

.ed-hero-grid {
  display: flex; flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  align-items: flex-end;
}
.ed-hero-copy { flex: 1 1 420px; min-width: 0; }
.ed-hero h1 {
  margin: 0; max-width: 22ch;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
}
.ed-hero-standfirst {
  margin: clamp(16px, 2vw, 22px) 0 0; max-width: 56ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55; color: var(--ed-on-leaf);
}
.ed-stats {
  flex: 0 1 auto; display: flex; flex-wrap: wrap;
  gap: 10px 28px; padding-bottom: 6px;
}
.ed-stat-n {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
}
.ed-stat-l {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ed-on-leaf-q);
}

/* --- Filter bar ---------------------------------------------------------- */

.ed-filters {
  border-bottom: 1px solid var(--ed-hairline);
  background: rgba(135, 152, 90, 0.06);
}
.ed-filters .ed-wrap {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center;
}
.ed-filters-label {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.5; margin-right: 6px;
}
.ed-cat .ed-chip {
  font-size: 0.8125rem; font-weight: 700; color: var(--ed-brown);
  border: 1px solid var(--ed-rule-soft);
  padding: 7px 13px; border-radius: 999px;
  transition: border-color 180ms cubic-bezier(0.2, 0.7, 0.25, 1),
              color 180ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
.ed-cat .ed-chip:hover { border-color: var(--ed-cherry); color: var(--ed-cherry); }
.ed-cat .ed-chip.is-active {
  color: var(--ed-cream); background: var(--ed-leaf-deep);
  border-color: var(--ed-leaf-deep); padding: 8px 13px;
}
.ed-cat .ed-chip.is-active:hover { color: var(--ed-cream); }
.ed-sort { margin-left: auto; font-size: 0.8125rem; opacity: 0.6; }

/* --- The list ------------------------------------------------------------ */

.ed-list-wrap .ed-wrap {
  padding-top: clamp(28px, 4vw, 52px);
}
.ed-list {
  display: flex; flex-direction: column; gap: clamp(14px, 2vw, 20px);
}

.ed-cat .ed-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--ed-rule);
  border-left: 4px solid var(--ed-card-accent, var(--ed-accent));
  border-radius: var(--ed-radius);
  color: var(--ed-brown);
  transition: border-color 180ms cubic-bezier(0.2, 0.7, 0.25, 1),
              background 180ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
.ed-cat .ed-card:hover {
  color: var(--ed-brown);
  border-color: var(--ed-card-accent, var(--ed-accent));
  background: var(--ed-card-tint, rgba(169, 31, 50, 0.04));
}
.ed-card-top {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
}
.ed-badge {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--ed-cherry); background: rgba(169, 31, 50, 0.10);
  padding: 5px 8px; border-radius: var(--ed-radius);
}
.ed-eyebrow {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ed-green);
}
.ed-checked {
  margin-left: auto; font-size: 0.8125rem; font-weight: 700; opacity: 0.7;
}
.ed-card-title {
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 700; line-height: 1.22; letter-spacing: -0.02em;
  max-width: 42ch;
}
.ed-card-excerpt {
  font-size: 1rem; line-height: 1.6; opacity: 0.8; max-width: 68ch;
}
.ed-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-tag {
  font-size: 0.75rem; font-weight: 700; color: var(--ed-brown);
  border: 1px solid rgba(74, 43, 30, 0.22);
  padding: 5px 9px; border-radius: var(--ed-radius);
}

/* Entrance stagger — transform/opacity only, matches the motion budget.
   Scoped to .is-revealing, which the module adds, so a JS failure or a
   no-JS visitor never loses content. */
.ed-cat.is-revealing [data-reveal] { opacity: 0; transform: translateY(20px); }
.ed-cat.is-revealing [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 320ms cubic-bezier(0.2, 0.7, 0.25, 1),
              transform 320ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
@media (prefers-reduced-motion: reduce) {
  .ed-cat.is-revealing [data-reveal] { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 767px) {
  .ed-cat.is-revealing [data-reveal] { opacity: 1; transform: none; }
}

/* --- Empty state --------------------------------------------------------- */

.ed-empty {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--ed-rule);
  border-left: 4px solid var(--ed-olive);
  border-radius: var(--ed-radius);
  max-width: 68ch;
}
.ed-empty h2 {
  margin: 0 0 10px; font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 700; letter-spacing: -0.02em;
}
.ed-empty p { margin: 0; font-size: 1rem; line-height: 1.6; opacity: 0.8; }

/* --- The "how this works" note ------------------------------------------- */

.ed-note {
  margin-top: clamp(24px, 3vw, 34px);
  padding: 16px 18px;
  border: 1px solid rgba(74, 43, 30, 0.16);
  border-left: 3px solid var(--ed-olive);
  border-radius: var(--ed-radius);
  font-size: 0.9375rem; line-height: 1.6; max-width: 78ch;
}

/* --- Pagination ---------------------------------------------------------- */

.ed-pagination {
  margin-top: clamp(26px, 3.5vw, 40px);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.ed-cat .ed-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  font-size: 0.875rem; font-weight: 700; color: var(--ed-brown);
  border: 1px solid var(--ed-rule); border-radius: var(--ed-radius);
}
.ed-cat .ed-pagination .page-numbers:hover {
  border-color: var(--ed-cherry); color: var(--ed-cherry);
}
.ed-cat .ed-pagination .page-numbers.current {
  background: var(--ed-leaf-deep); border-color: var(--ed-leaf-deep);
  color: var(--ed-cream);
}
.ed-cat .ed-pagination .page-numbers.dots { border-color: transparent; }

/* --- Subscribe band ------------------------------------------------------ */

.ed-subscribe {
  margin-top: clamp(40px, 5vw, 72px);
  background: var(--ed-cherry); color: var(--ed-cream);
}
.ed-subscribe .ed-wrap {
  padding-top: clamp(32px, 4.5vw, 60px);
  padding-bottom: clamp(32px, 4.5vw, 60px);
  display: flex; flex-wrap: wrap;
  gap: clamp(20px, 3vw, 48px); align-items: center;
}
.ed-subscribe-copy { flex: 1 1 340px; min-width: 0; }
.ed-subscribe h2 {
  margin: 0 0 10px; font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.025em;
}
.ed-subscribe p {
  margin: 0; font-size: 1.0625rem; line-height: 1.6;
  max-width: 48ch; color: rgba(246, 240, 223, 0.88);
}
.ed-subscribe form {
  flex: 1 1 300px; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px;
}
.ed-subscribe input[type="email"] {
  flex: 1 1 190px; min-width: 0; padding: 15px 14px;
  font: inherit; font-size: 1rem; border: none;
  border-radius: var(--ed-radius);
  background: var(--ed-cream); color: var(--ed-brown);
}
.ed-subscribe button {
  flex: 0 0 auto; padding: 15px 22px;
  font: inherit; font-size: 0.875rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ed-cream); background: var(--ed-leaf-deep);
  border: none; border-radius: var(--ed-radius); cursor: pointer;
  transition: background 180ms cubic-bezier(0.2, 0.7, 0.25, 1),
              color 180ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
.ed-subscribe button:hover { background: var(--ed-cream); color: var(--ed-cherry); }

/* --- Sibling pillars (the route continues) ------------------------------- */

.ed-siblings .ed-wrap {
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.ed-siblings-head {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.5; margin-bottom: 18px;
}
.ed-siblings-grid {
  display: grid; gap: clamp(14px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.ed-cat .ed-sibling {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 150px; padding: 22px 22px 20px;
  background: rgba(246, 240, 223, 0.6);
  border: 1px solid var(--ed-rule);
  border-top: 3px solid var(--ed-sibling-accent, var(--ed-green));
  border-radius: var(--ed-radius); color: var(--ed-brown);
  transition: border-color 180ms cubic-bezier(0.2, 0.7, 0.25, 1),
              background 180ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
.ed-cat .ed-sibling:hover {
  color: var(--ed-brown);
  border-color: var(--ed-sibling-accent, var(--ed-green));
  background: rgba(46, 107, 53, 0.04);
}
.ed-sibling-eyebrow {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.5;
}
.ed-sibling-title {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2;
}
.ed-sibling-desc { font-size: 0.9375rem; line-height: 1.55; opacity: 0.78; }
.ed-sibling-count {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ed-cherry);
}

/* Links inside the empty state keep the cherry treatment. */
.ed-cat .ed-empty a { color: var(--ed-cherry); border-bottom: 1px solid rgba(169, 31, 50, 0.4); }
.ed-cat .ed-empty a:hover { color: var(--ed-leaf-deep); border-bottom-color: var(--ed-leaf-deep); }
