/* Layout — page sections, containers, grid */

/* ---- Home ---- */

.home-hero {
  min-height: 100vh;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, #26201A 0%, var(--charcoal) 70%);
}

.home-hero__inner {
  position: relative;
  padding: calc(var(--nav-height) + 80px) var(--gutter) 80px;
}

.home-hero__issue-num {
  font-family: var(--font-mono);
  font-size: clamp(96px, 20vw, 240px);
  font-weight: 600;
  color: var(--charcoal);
  line-height: 0.9;
  letter-spacing: -0.04em;
  opacity: 0.18;
  user-select: none;
}

.home-hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 900;
  color: var(--cream);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: -40px;
  position: relative;
}

/* ---- Home sections ---- */

.home-section__header {
  padding: var(--space-xl) var(--gutter) var(--space-m);
  border-bottom: 2px solid var(--border);
}

.home-section__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

.home-featured {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}

.featured-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.featured-item {
  background: var(--warm-white);
  transition: background var(--duration-base) var(--ease-out);
}

.featured-item:hover {
  background: var(--cream);
}

.featured-item__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-xl) var(--space-l);
  height: 100%;
}

.featured-item__category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

.featured-item__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.featured-item__excerpt {
  font-size: 16px;
  color: var(--steel);
  line-height: 1.6;
  flex: 1;
}

.featured-item__author {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--steel);
  letter-spacing: 0.08em;
  margin-top: auto;
}

/* Issues list */

.home-issues {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: var(--space-3xl);
}

.issues-list {
  border-bottom: 1px solid var(--border);
}

.issue-item {
  border-top: 1px solid var(--border);
  transition: background var(--duration-fast) var(--ease-out);
}

.issue-item:hover {
  background: var(--warm-white);
}

.issue-item__link {
  display: grid;
  grid-template-columns: 48px 1fr 1fr auto;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-l) var(--gutter);
}

.issue-item__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.issue-item__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.issue-item__theme {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--steel);
}

.issue-item__arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--amber);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.issue-item:hover .issue-item__arrow {
  opacity: 1;
}

/* ---- List page ---- */

.list-header {
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--gutter) var(--space-xl);
  border-bottom: 3px solid var(--charcoal);
  max-width: var(--max-width);
  margin: 0 auto;
}

.list-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}

.list-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.list-empty {
  padding: var(--space-xl) var(--gutter);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--steel);
  letter-spacing: 0.05em;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.card {
  background: var(--warm-white);
  transition: background var(--duration-base) var(--ease-out);
}

.card:hover {
  background: var(--cream);
}

.card--robot,
.card--author {
  background: #141210;
}

.card--robot:hover,
.card--author:hover {
  background: #1E1B16;
}

.card__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-xl) var(--space-l);
  height: 100%;
  min-height: 200px;
}

.card--robot .card__link,
.card--author .card__link {
  color: var(--cream);
}

.card__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: auto;
}

.card__subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--steel);
}

.card__arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--amber);
  opacity: 0;
  margin-top: auto;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.card:hover .card__arrow {
  opacity: 1;
}

.card__badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  display: inline-block;
  width: fit-content;
}

.card__badge--available   { background: rgba(110,231,168,0.15); color: #6EE7A8; }
.card__badge--waitlist    { background: rgba(201,125,10,0.20);  color: var(--amber); }
.card__badge--classified  { background: rgba(139,58,15,0.30);   color: #F0A080; }

.card__type-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  display: inline-block;
  width: fit-content;
  margin-bottom: var(--space-s);
}

.card__type-badge--robot  { background: rgba(201,125,10,0.15); color: var(--amber); }
.card__type-badge--human  { background: rgba(255,255,255,0.05); color: #555; }

/* ---- Entry page ---- */

.entry {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--gutter) var(--space-3xl);
}

.entry-header {
  margin-bottom: var(--space-xl);
}

.entry-header__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-bottom: var(--space-m);
}

.entry-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

.entry-status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 600;
}

.entry-status--published  { background: #1A3A28; color: #6EE7A8; }
.entry-status--draft      { background: #3A1A0F; color: #F0A080; }
.entry-status--in_review  { background: #1A2A3A; color: #80C0F0; }

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-m);
}

.entry-excerpt {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  color: var(--steel);
  line-height: 1.6;
}

/* Byline */

.entry-byline {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-m) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-2xl);
}

.entry-byline__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--charcoal);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.entry-byline__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-byline__placeholder {
  font-size: 22px;
}

.entry-byline__name {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}

.entry-byline__role {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--steel);
  text-transform: uppercase;
}

/* Entry body prose */

.entry-body {
  font-size: 21px;
  line-height: 1.85;
}

/* ---- 404 ---- */

.error-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) var(--gutter);
  background: var(--charcoal);
}

.error-page__inner {
  text-align: center;
  max-width: 600px;
}

.error-page__num {
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 600;
  color: var(--amber);
  opacity: 0.3;
  line-height: 1;
}

.error-page__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  color: var(--cream);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-l);
}

.error-page__title em {
  font-style: italic;
  color: var(--steel);
}

.error-page__body {
  font-size: 18px;
  color: var(--steel);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.error-page__body em {
  font-style: italic;
  color: #4A4844;
}

.error-page__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: var(--amber);
  color: var(--charcoal);
  display: inline-block;
  font-weight: 600;
  transition: opacity var(--duration-fast);
}

.error-page__cta:hover {
  opacity: 0.85;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .featured-list   { grid-template-columns: 1fr; }
  .card-list       { grid-template-columns: repeat(2, 1fr); }
  .issue-item__link { grid-template-columns: 40px 1fr auto; gap: var(--space-m); }
  .issue-item__theme { display: none; }
}

@media (max-width: 600px) {
  .card-list        { grid-template-columns: 1fr; }
  .issue-item__link { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .list-header      { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .entry            { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
}
