/* ============================================================
   THE TECH DIPLOMAT — Homepage modules
   Focus strip, Selected Writing, About, Recent Notes,
   Subscribe band and Speaking. Load after editorial.css + cards.css.
   ============================================================ */

/* ---------- Shared section frame ---------- */
.home-block { padding: var(--space-section) 0; }

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.home-head h2 { font-size: var(--step-1); margin: 0.5rem 0 0; }
.home-head .rule { width: 56px; height: 2px; background: var(--seal); margin-top: 0.9rem; }
.home-head .kicker { margin: 0; }

/* ---------- Focus areas ---------- */
.home-focus {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}
.home-focus .container {
  display: flex;
  align-items: center;
  gap: 0.9rem 1.5rem;
  flex-wrap: wrap;
}
.home-focus h2.kicker { margin: 0; font-size: var(--step--1); line-height: 1.4; }
.home-focus ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-focus li {
  font-size: 0.92rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Selected writing: lead op-ed ---------- */
.home-lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s var(--ease-out);
}
.home-lead:hover,
.home-lead:focus-visible { border-color: var(--ink); }
.home-lead-text {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3.5vw, 3rem);
  border-left: 3px solid var(--seal);
}
.home-pub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-2);
  margin: 0 0 1rem;
}
.home-pub b { font-style: normal; font-weight: 500; color: var(--ink); }
.home-pub .sep { color: var(--seal); padding: 0 0.25em; }
.home-lead h3 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
  margin: 0 0 1rem;
}
.home-lead-text > p:not(.home-pub) { color: var(--ink-2); margin: 0 0 1.5rem; max-width: 46ch; }
.home-lead .ed-card-cta { color: var(--seal); }
.home-lead .tick { display: inline-block; transition: transform 0.3s var(--ease-out); }
.home-lead:hover .tick { transform: translate(3px, -3px); }

.home-lead-panel {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(1.75rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}
.home-lead-panel .kicker { color: var(--teal-soft); margin: 0; font-size: 0.72rem; }
.home-lead-statement {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.65rem);
  line-height: 1.35;
  margin: 0;
  color: var(--paper);
}

.home-essays { margin-top: 1.5rem; gap: 1.5rem; }

/* ---------- About ---------- */
.home-about {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-section) 0;
}
.home-about .container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.home-portrait {
  background: transparent;
  border: 0;
  border-radius: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.home-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.home-about-text h2 { font-size: var(--step-1); margin: 0.5rem 0 1rem; max-width: 22ch; }
.home-about-text .kicker { margin: 0; }
.home-about-text > p:not(.kicker):not(.home-disclaimer) { color: var(--ink-2); max-width: 58ch; margin: 0 0 1.75rem; }
.home-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0 0 1.75rem;
  border-top: 1px solid var(--line);
}
.home-facts > div { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.home-facts dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.home-facts dd { margin: 0.15rem 0 0; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.home-disclaimer { font-size: 0.85rem; font-style: italic; color: var(--ink-2); margin: 1.25rem 0 0; }

/* ---------- Recent notes: three curated, no carousel ---------- */
.home-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.home-notes article { display: flex; flex-direction: column; padding: 1.6rem 1.6rem 1.8rem 0; }
.home-notes article + article { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.home-notes h3 { font-size: 1.35rem; line-height: 1.28; margin: 0 0 0.75rem; }
.home-notes p:not(.ed-card-meta) { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 1.2rem; }
.home-notes .link-ed { margin-top: auto; align-self: flex-start; font-size: 0.92rem; }

/* ---------- Subscribe band (ink) ---------- */
.home-subscribe { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.home-subscribe .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.home-subscribe h2 { font-size: var(--step-1); margin: 0.5rem 0 1rem; }
.home-subscribe .kicker { margin: 0; }
.home-subscribe .container > div > p:not(.kicker) { margin: 0; max-width: 44ch; }
.home-subscribe .subscribe-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 0.6rem;
  align-items: start;
  margin: 0;
}
.home-subscribe .form-field label { color: rgba(245, 241, 232, 0.75); }
.home-subscribe .subscribe-form input {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(245, 241, 232, 0.55);   /* 3:1+ boundary on ink */
}
.home-subscribe .subscribe-form input:focus-visible { border-color: var(--paper); outline-color: var(--teal-soft); }
.home-subscribe .subscribe-form button.btn-ink {
  margin-top: 1.45rem;           /* line up with inputs under their labels */
  align-self: start;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.home-subscribe .subscribe-form button.btn-ink:hover,
.home-subscribe .subscribe-form button.btn-ink:focus-visible {
  background: transparent;
  color: var(--paper);
}
.home-subscribe :focus-visible { outline-color: var(--teal-soft); }
.home-subscribe .form-error { color: #f4b7a8; }
.home-subscribe-more { font-size: 0.9rem; margin: 1rem 0 0; }
.home-subscribe .link-ed { color: var(--teal-soft); }

/* ---------- Speaking ---------- */
.home-speaking .container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.home-speaking h2 { font-size: var(--step-1); margin: 0.5rem 0 1rem; }
.home-speaking .kicker { margin: 0; }
.home-speaking .container > div:first-child > p:not(.kicker):not(.home-speaking-email) { color: var(--ink-2); margin: 0 0 1.5rem; max-width: 40ch; }
.home-speaking-email { margin: 1rem 0 0; font-size: 0.92rem; color: var(--ink-2); }
.home-speaking h3.kicker { font-family: var(--font-mono); font-weight: 500; font-size: var(--step--1); margin: 0 0 0.9rem; }
.home-rooms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.home-rooms li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.home-rooms-yr { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--seal); padding-top: 0.2rem; }
.home-rooms strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; color: var(--ink); }
.home-rooms li span:not(.home-rooms-yr) { color: var(--ink-2); font-size: 0.92rem; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 960px) {
  .home-notes { grid-template-columns: 1fr; }
  .home-notes article,
  .home-notes article + article { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .home-subscribe .container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .home-lead,
  .home-about .container,
  .home-speaking .container,
  .home-facts { grid-template-columns: 1fr; }
  .home-lead-text { border-left: 0; border-top: 3px solid var(--seal); }
  .home-portrait { max-width: 220px; }
  .home-subscribe .subscribe-form { grid-template-columns: 1fr; }
  .home-subscribe .subscribe-form button.btn-ink { margin-top: 0.25rem; width: 100%; text-align: center; }
  .home-rooms li { grid-template-columns: 3.5rem 1fr; }
}
