/* ─── CC Fest · Shared styles ─────────────────────────────────────────
 * Covers: base reset, layout utilities, nav, footer,
 *         /register page sections, and homepage sections.
 *
 * File ownership
 *   Layout & content  →  Saber   (this file)
 *   Motion            →  Shristi (animations.css + animations.js)
 *   Visual design     →  Francesca (Figma: CC Fest — Redesign)
 * ─────────────────────────────────────────────────────────────────── */


/* ── Design tokens ─────────────────────────────────────────────────
 * All colours and layout values live here. Update a token and it
 * propagates everywhere — never use bare hex values in component rules.
 * ─────────────────────────────────────────────────────────────────── */

:root {
  /* Background hierarchy */
  --paper:   #f4f4f1;    /* page background — warm off-white */
  --surface: #fff;       /* card / element surface — pure white */
  --tint:    #ecece8;    /* tinted section background */

  /* Text */
  --ink:   #1d1d1d;      /* primary text and dark backgrounds */
  --muted: #666;         /* secondary text, labels, captions */

  /* Borders */
  --line:      #aaa;     /* primary border — major section dividers */
  --soft-line: #d4d4ce;  /* subtle border — internal dividers */

  /* Accent (used sparingly — currently just the animation placeholder label) */
  --accent: #2952e8;

  /* Layout */
  --page-width: 1120px;
  --page-pad: clamp(1rem, 4vw, 3rem); /* responsive horizontal padding */
}

/* ── Reset & base ────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

/* ── Accessibility utilities ─────────────────────────────────────── */

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ── Layout ──────────────────────────────────────────────────────── */

.page-width {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* ── Navigation ─────────────────────────────────────────────────── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
  padding: 0.75rem max(var(--page-pad), calc((100% - var(--page-width)) / 2 + var(--page-pad)));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.86rem;
}

/* ── Register page ───────────────────────────────────────────────── */

.hero {
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.eyebrow,
.placeholder-label,
.event-facts span,
.section-heading > p,
.session-time,
.tag-row span {
  margin: 0;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 950px;
  margin: 1.25rem 0 1.75rem;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.blank {
  display: inline-block;
  min-width: 4.5ch;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.75em;
  letter-spacing: -0.15em;
}

.hero-summary {
  max-width: 620px;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  justify-content: center;
  min-width: 9rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  text-decoration: none;
}

.button-solid {
  color: var(--surface);
  background: var(--ink);
}

.event-facts {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.facts-grid > div {
  display: grid;
  gap: 0.35rem;
  min-height: 7rem;
  padding: 1.35rem;
  align-content: center;
  border-right: 1px solid var(--soft-line);
}

.facts-grid > div:first-child {
  border-left: 1px solid var(--soft-line);
}

.facts-grid strong {
  font-size: 1.05rem;
  font-weight: 500;
}

.section {
  padding-top: clamp(4.5rem, 8vw, 7rem);
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.section-tinted {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-heading div > p {
  max-width: 640px;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.keynote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.keynote-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.profile-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px)),
    var(--tint);
  border: 1px solid var(--line);
  font-family: monospace;
  font-size: 0.7rem;
  text-align: center;
  text-transform: uppercase;
}

.profile-placeholder span {
  padding: 0.25rem 0.4rem;
  background: var(--tint);
}

.profile-large {
  aspect-ratio: 4 / 5;
}

.profile-small {
  width: 5.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

.keynote-copy h3,
.session-card h3 {
  margin: 0.4rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.keynote-copy > p:not(.placeholder-label),
.session-presenter > p:not(.placeholder-label),
.session-details > p {
  color: var(--muted);
}

.placeholder-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.session-list {
  border-top: 1px solid var(--line);
}

.session-card {
  display: grid;
  grid-template-columns: 7rem 5.5rem minmax(170px, 0.6fr) minmax(280px, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.session-presenter p,
.session-details p {
  margin: 0;
}

.session-details h3 {
  font-size: 1.55rem;
}

.tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-row span {
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--line);
}

.embed-placeholder {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 2rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  text-align: center;
}

.embed-placeholder span {
  color: var(--muted);
  font-family: monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.embed-placeholder strong {
  align-self: end;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
}

.embed-placeholder p {
  align-self: start;
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.history-note {
  padding-block: 2rem;
  background: var(--ink);
  color: var(--surface);
}

.history-note-inner {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.history-note-inner p {
  margin: 0;
  color: #c8c8c2;
}

.history-note-inner strong {
  font-size: 1.2rem;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* ── Register page: responsive ───────────────────────────────────── */

@media (max-width: 850px) {
  .keynote-grid {
    grid-template-columns: 1fr;
  }

  .session-card {
    grid-template-columns: 5.5rem minmax(160px, 0.6fr) 1fr;
  }

  .session-time {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .wireframe-label span:last-child {
    display: none;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding-block: 1rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .facts-grid > div {
    min-height: 6rem;
    border-bottom: 1px solid var(--soft-line);
  }

  .keynote-card {
    grid-template-columns: 1fr;
  }

  .profile-large {
    width: min(100%, 300px);
  }

  .session-card {
    grid-template-columns: 5.5rem 1fr;
  }

  .session-presenter {
    grid-column: 2;
  }

  .session-details {
    grid-column: 1 / -1;
    padding-top: 1rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ── Accessibility: reduced motion ───────────────────────────────── */
/* animations.css has its own reduced-motion block for .anim-* rules. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ── Animation placeholder (Shristi) ── */


/* .anim-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--soft-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--soft-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
} */


.anim-stage-label {
  color: var(--accent, #2952e8);
}

.anim-stage-hint {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.anim-stage-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.anim-stage-note code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  padding: 0.1em 0.35em;
  background: var(--tint, var(--soft-line));
  border-radius: 2px;
}

/* ── Homepage ── */

.home-hero {
  text-align: center;
  padding-top: clamp(4rem, 10vw, 8rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.home-hero-title {
  margin: 0 0 1.5rem;
  font-size: clamp(5rem, 18vw, 16rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-rule {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 0 0 2rem;
}

.home-hero-sub {
  margin: 0 auto;
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
}

/* Upcoming event band */

.upcoming-band {
  background: var(--ink);
  color: var(--surface);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.upcoming-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.upcoming-eyebrow {
  color: #aaa;
}

.upcoming-copy h2 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.upcoming-copy > p {
  max-width: 500px;
  margin: 0 0 2rem;
  color: #b8b8b2;
}

.button-light {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--surface);
}

.upcoming-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #444;
  border: 1px solid #444;
  align-self: start;
  min-width: 260px;
}

.upcoming-facts > div {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  background: var(--ink);
  align-content: center;
}

.upcoming-facts span {
  color: #888;
  font-family: monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.upcoming-facts strong {
  font-size: 1rem;
  font-weight: 500;
}

/* About section */

.home-about {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about-lead h2 {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.about-body > p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.welcome-block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--soft-line);
}

.welcome-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

.welcome-list li + li {
  margin-top: 0.5rem;
}

/* Past events */

.past-events-body {
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.past-events-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.past-events-body a {
  color: var(--ink);
}

.location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.location-chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 7rem;
}

.location-chip strong {
  font-size: 1rem;
  font-weight: 500;
}

.location-chip span {
  color: var(--muted);
  font-family: monospace;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Mailing list */

.mailing-body {
  max-width: 540px;
  color: var(--muted);
}

.mailing-body a {
  color: var(--ink);
}

/* Code of conduct */

.coc-body {
  max-width: 680px;
}

.coc-body p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.coc-body a {
  color: var(--ink);
}

/* ── Homepage responsive ── */

@media (max-width: 900px) {
  .upcoming-inner {
    grid-template-columns: 1fr;
  }

  .upcoming-facts {
    min-width: 0;
    width: 100%;
    max-width: 400px;
  }

  .home-about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
