/* wg21.org landing page.
   The masthead is a shared component: brand/banner tokens, the .banner* block,
   and ALL of its responsive behaviour live in banner.css (pulled in via
   masthead.css below) and are shared verbatim with About / Mailings / threads.
   This file holds only landing-specific tokens + layout — it must not re-declare
   banner rules. */
@import "masthead.css";
@import "_standards_track.css";
@import "slim-banner.css";  /* slim header for the tablet/half-page swap */

:root {
  /* Landing-specific tokens (shared brand/banner tokens are in masthead.css). */
  --bg:          #f6f8fa;
  --bg-stripe:  #f6f7f9;
  --ink-faint:   rgba(87,96,106,.5);
  --accent-iso:  #123a5c;

  /* Success */
  --ok-text:     #009966;
  --ok-bg:       #ecfdf5;
  --ok-dot:      #00bc7d;
  --ok-line:     #b9f8cf;

  /* Spacing scale */
  --gutter:      48px;
  --radius:      8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body.landing-v2 {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Keyboard focus ring (applies to every interactive element on the page) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Prevent iOS Safari from auto-zooming on focus (triggered when font-size < 16px) */
@media (max-width: 720px) {
  input, textarea, select { font-size: 16px; }
}

/* ──────── Banner ──────── */
/* The masthead (.banner*, all breakpoints) is the shared component in banner.css.
   Full hero on desktop; swap to the slim banner at tablet/half-page (≤1100) so the
   full masthead doesn't reflow awkwardly. */
.landing-slim { display: none; }
@media (max-width: 1100px) {
  .banner-masthead { display: none; }
  .landing-slim { display: block; }
}

.search {
  /* Hidden until search UX is designed; styles kept for the future. */
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 38px;
  width: 320px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}
.search svg { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0; }
.search input {
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  flex: 1; min-width: 0;
  height: 100%;
}
.search input::placeholder { color: rgba(28,33,40,.5); }

.iso-link {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-iso);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.iso-link svg { width: 12px; height: 12px; }
.iso-link:hover { color: var(--accent-blue); }

.iso-bar {
  background: var(--bg);
}
.iso-bar-inner {
  max-width: 1760px;
  margin: 0 auto;
  padding: 11px var(--pad-x);
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  border-top: 1px solid #E1E4EA;
  border-bottom: 1px solid #E1E4EA;
}

/* ──────── Body layout ──────── */
.body {
  max-width: 1760px;
  margin: 0 auto;
  padding: 50px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

/* Card primitive */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Section label "// foo ─────" */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.section-label.small { font-size: 14px; margin: 24px 0 14px; }
.section-label .slash { color: var(--accent-blue); font-weight: 400; }
.section-label .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ──────── Row 1: About + Meetings ──────── */
.row-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.about {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 595px;
}
.about-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%),
    url('../img/about-hero.jpg') lightgray -448.82px -0.363px / 291.172% 114.695% no-repeat;
}
.about-hero-caption {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 306px;
  margin: 0;
  color: #fff;
  font-family: "IBM Plex Mono", var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 20.618px;
  text-wrap: pretty;
}
.about-hero-credit {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
  transition: opacity 0.15s ease;
}
.about-hero-credit:hover {
  opacity: 0.7;
}
.about-content {
  padding: 36px 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid var(--line);
}
.about-content .section-label { margin-bottom: 0; }
.about-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
}
.about-footnote {
  color: var(--accent-blue);
  margin-left: 2px;
  text-decoration: underline;
}
.about-footnote sup { font-size: 11px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 18px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}
.about-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 18px;
  color: var(--accent-blue);
  border-bottom: 1px solid var(--line-soft);
  transition: color .15s;
}
.about-link:last-child { border-bottom: 0; }
.about-link svg.ext { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.about-link > svg { width: 18px; height: 18px; flex: none; }
.about-link > span { display: inline-flex; align-items: center; }
.about-link-muted { color: var(--ink-soft); }
.about-link-muted:hover { color: var(--ink); }

/* Meetings sidebar */
.meetings {
  display: flex;
  flex-direction: column;
}
.meeting {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 165px 1fr;
  margin-bottom: 20px;
}
.meeting-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
}
.meeting-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
}
.meeting-badge-blue { background: var(--accent-blue); color: #fff; }
.meeting-badge-dark { background: rgba(0,0,0,.55); color: rgba(255,255,255,.75); }
.meeting-photo-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
}
.meeting-body {
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.meeting-meta {
  margin: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  row-gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
}
.meeting-meta > div { display: contents; }
.meeting-meta dt {
  color: var(--ink-soft);
  letter-spacing: .04em;
  text-transform: lowercase;
  padding-right: 12px;
}
.meeting-meta dd { margin: 0; color: var(--ink); text-align: right; }
.meeting-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok-dot);
  display: inline-block;
}
.status-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent-iso);
}
.status-link svg { width: 12px; height: 12px; }
.status-link:hover { color: var(--accent-blue); }

/* Footer link from the Overview meetings aside to the full Events page (#43). */
.meetings-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
}
.meetings-all-link svg { width: 13px; height: 13px; }

.tentative {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tentative-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 14px;
}
.tentative-row:last-child { border-bottom: 0; }
.tentative-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(87,96,106,.25);
}
.tentative-place { color: var(--ink); font-weight: 500; }
.tentative-country { color: var(--ink-soft); }
.tentative-when { color: var(--ink-soft); font-size: 13px; }
.tentative-note {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ──────── Row 2: Highlights ──────── */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.highlight {
  padding: 34px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 420px;
}
.highlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.highlight-title {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.005em;
  color: var(--ink);
}
.highlight-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}

.highlight-center {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.alliance-link {
  color: var(--accent-blue);
  text-decoration: underline;
}
.alliance-link:hover { text-decoration-thickness: 2px; }
.alliance-tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-soft);
}
.alliance-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 36ch;
}
.alliance-tagline {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}
.alliance-tagline strong { font-weight: 700; }

.highlight-extra {
  margin: -4px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 12px 14px;
  background: var(--bg-stripe);
  border-left: 2px solid var(--accent-blue);
  border-radius: 0 4px 4px 0;
}
.highlight-extra a { color: var(--accent-blue); }
.highlight-extra a:hover { text-decoration: underline; }

.pragma-mark {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.pragma-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid var(--accent-gold);
  color: #fff;
  background: var(--accent-gold);
  transition: background .15s, color .15s;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--accent-gold); }

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  align-self: flex-start;
}
.pill-success {
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1px solid var(--ok-line);
  text-transform: uppercase;
}
.about-link .pill-success {
  border-radius: 5px;
  padding: 3px 10px 5px;
}
.pill-success .pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok-dot);
}
.pill-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
  letter-spacing: .08em;
}

/* ──────── Row 3: Papers table ──────── */
.papers {
  padding: 0;
}
.papers-row {
  display: grid;
  grid-template-columns: 120px 1.8fr 160px 130px;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 15px;
}
.papers-row:last-child { border-bottom: 0; }
.papers-head {
  background: rgba(234,238,242,.4);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .12em;
}
.paper-id { color: var(--accent-blue); font-weight: 600; text-transform: uppercase; }
.paper-id:hover { text-decoration: underline; }
.paper-title { color: var(--ink); font-family: var(--font-sans); font-size: 17px; }
.paper-audience { display: flex; gap: 6px; flex-wrap: wrap; }
.aud {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid var(--line);
  background: #fafbfc;
  color: var(--ink-soft);
}
.aud-ewg  { color: #0950a1; border-color: #b9d4f0; background: #eaf2fb; }
.aud-cwg  { color: #0950a1; border-color: #b9d4f0; background: #eaf2fb; }
.aud-lewg { color: #6a4a00; border-color: #ebd8a1; background: #fbf5e3; }
.aud-lwg  { color: #6a4a00; border-color: #ebd8a1; background: #fbf5e3; }
.paper-date { color: var(--ink-soft); }

.more-link {
  display: flex;
  width: fit-content;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
}
.more-link:hover { color: var(--ink); }
.more-link svg { width: 16px; height: 16px; }

/* ──────── Row 4: Repos ──────── */
.repos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.repo {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}
.repo-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.repo-icon { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; }
.repo-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-blue);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repo-name:hover { text-decoration: underline; }
.repo-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  flex: 1;
  text-wrap: pretty;
}
.repo-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-soft);
}
.repo-stat { display: inline-flex; align-items: center; gap: 6px; }
.repo-stat svg { width: 14px; height: 14px; color: var(--ink-soft); }

/* ──────── Row 5: Standards track ──────── */
/* Track chips + caption now live in the shared _standards_track.css partial
   (imported at the top of this file) so the About page matches this exactly. */

/* ──────── Density modifier ──────── */
body.density-compact {
  --gutter: 32px;
  --pad-x: 80px;
}
body.density-compact .banner-inner { padding-top: 42px; padding-bottom: 36px; }
body.density-compact .highlight    { min-height: 360px; padding: 26px 24px 22px; }
body.density-compact .repo         { padding: 18px 20px 16px; }
body.density-compact .body         { padding-top: 36px; gap: var(--gutter); }

/* ──────── Accent recolor ──────── */
body.accent-blue { --accent-gold: var(--accent-blue); }
body.accent-iso  { --accent-gold: var(--accent-iso); }

/* ──────── Responsive cleanup ──────── */
@media (max-width: 1400px) {
  :root { --pad-x: 64px; }
}
@media (max-width: 1100px) {
  :root { --pad-x: 32px; }   /* banner density at this width lives in banner.css */
  .row-top      { grid-template-columns: 1fr; }
  .about        { grid-template-columns: 1fr 2fr; min-height: 0; }
  .highlights   { grid-template-columns: repeat(2, 1fr); }
  .repos        { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .highlights   { grid-template-columns: 1fr; }
  .repos        { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --pad-x: 20px; }   /* banner layout at this width lives in banner.css */
  .about        { grid-template-columns: 1fr; }
  .about-hero   {
    min-height: 180px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%),
      url('../img/about-hero.jpg') center / cover no-repeat;
  }
  .papers-row   { grid-template-columns: 1fr; gap: 6px; padding: 14px 18px; }
  .papers-head  { display: none; }
  /* Stack meeting cards: full-width photo on top, meta underneath */
  .meeting       { grid-template-columns: 1fr; }
  .meeting-photo { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  /* Banner ≤480 sizing lives in banner.css (shared); --pad-x stays at the standard
     20px (shell.css) so the home banner matches About / Mailings exactly. */
  .highlight    { padding: 24px 20px 20px; min-height: 0; }
  .highlight-title { font-size: 18px; }
  .repo         { padding: 18px 18px 16px; }
}

/* ── Corporate participation widget ── */

.cp-widget-wrap {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 2rem;
}

.cp-widget {
  display: block;
  padding: 1rem 1.25rem;
  background: rgba(26, 32, 53, 0.5);
  border: 1px solid rgba(51, 70, 250, 0.1);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  animation: landing-fade-slide 0.4s ease both;
}

.cp-widget:hover {
  border-color: rgba(51, 70, 250, 0.3);
  background: rgba(26, 32, 53, 0.8);
}

.cp-widget-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.cp-widget-rows {
  margin: 0 0 0.6rem;
  padding: 0;
}

.cp-widget-row {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.25rem 0;
}

.cp-widget-row + .cp-widget-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cp-widget-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.cp-widget-org {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-widget-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--landing-copper);
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.cp-widget-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--landing-maroon-light);
  transition: color 0.2s, transform 0.2s;
}

.cp-widget:hover .cp-widget-cta {
  color: var(--landing-maroon-glow);
  transform: translateX(3px);
}

@media (max-width: 600px) {
  .cp-widget-wrap {
    padding: 0 1.5rem;
  }

  .cp-widget-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label   value"
      "org     org";
    gap: 0.25rem 0.75rem;
  }

  .cp-widget-label {
    grid-area: label;
  }

  .cp-widget-value {
    grid-area: value;
  }

  .cp-widget-org {
    grid-area: org;
    white-space: normal;
  }
}
