/* ==========================================================
   NASTI 1 — landing page
   Theme: #674ea7 (purple) + #0b5394 (blue), solid colors only.
   ========================================================== */

:root {
  --purple: #674ea7;
  --blue: #0b5394;
  --ink: #1b1530;
  --ink-soft: #4d4664;
  --paper: #f7f3ea;
  --purple-tint: #e7e0f4;
  --blue-tint: #d8e6f2;
  --white: #ffffff;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --line: 2px solid var(--ink);
  --radius: 18px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-x: clip;
}

main { padding-bottom: clamp(32px, 6vw, 72px); }

img { display: block; max-width: 100%; height: auto; }

p, h1, h2, ol, ul, figure { margin: 0; }

a { color: inherit; }

b { font-weight: 750; }

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

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(24px, 4vw, 40px);
}

.hero-title {
  grid-column: 1 / 9;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(5.5rem, 19vw, 15rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.06em;
  margin-top: 0.04em;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 0.62em;
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(10deg);
}

.hero-expansion {
  grid-column: 1 / 9;
  grid-row: 2;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.acro {
  padding: 2px 12px;
  border: var(--line);
  border-radius: 999px;
  background: var(--white);
}

.acro b {
  color: var(--purple);
  font-weight: 800;
}

.acro-blue b { color: var(--blue); }

/* Tear-off calendar date */
.hero-date {
  grid-column: 10 / 13;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  width: min(100%, 230px);
  position: relative;
  padding: 34px 18px 18px;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  text-align: center;
  transform: rotate(4deg);
}

.cal-rings {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--purple);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.cal-rings i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
}

.cal-dow {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.cal-month {
  font-weight: 800;
  font-stretch: 80%;
  font-size: 2.2rem;
  line-height: 1;
  text-transform: uppercase;
  margin-top: 6px;
}

.cal-day {
  font-weight: 800;
  font-stretch: 75%;
  font-size: 7rem;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.cal-year {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Photo */
.hero-photo {
  grid-column: 5 / 13;
  grid-row: 3;
  align-self: start;
  position: relative;
  margin-top: 56px;
  transform: rotate(-1.5deg);
}

.hero-photo img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
}

.hero-photo figcaption {
  position: absolute;
  left: 24px;
  bottom: -14px;
  max-width: calc(100% - 48px);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.35;
}

.sticker-free {
  position: absolute;
  top: -40px;
  right: -14px;
  width: 108px;
  height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--paper);
  background: var(--purple);
  color: var(--white);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
  transform: rotate(14deg);
}

.sticker-free b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 2.4rem;
  line-height: 0.8;
  text-transform: uppercase;
}

/* Facts column */
.hero-facts {
  grid-column: 1 / 5;
  grid-row: 3;
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.fact {
  position: relative;
  padding: 24px 20px 18px;
  border: var(--line);
  border-radius: var(--radius);
}

.fact-where { background: var(--purple-tint); }
.fact-when { background: var(--blue-tint); }

.fact-label {
  position: absolute;
  top: -13px;
  left: 16px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact-where .fact-label { transform: rotate(-4deg); }
.fact-when .fact-label { transform: rotate(3deg); }

.fact-big {
  font-weight: 800;
  font-stretch: 85%;
  font-size: 1.6rem;
  line-height: 1.05;
}

.fact-small {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--blue);
}

.fact-when .fact-small { color: var(--purple); }

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2px;
}

.timeline li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.05rem;
}

.timeline b {
  min-width: 4.4em;
  font-weight: 800;
  font-stretch: 85%;
  font-size: 1.5rem;
  color: var(--blue);
}

/* ---------- Rounds (Science Bowl–style sections) ---------- */

.round {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 4.5vw, 52px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 22px;
}

.round > * { grid-column: 1 / -1; }

.round-tag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.round-tag .tag-type {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
}

.round-tag .tag-bonus { background: var(--purple); }

.round-tag::after {
  content: "";
  flex: 1 1 40px;
  height: 2px;
  background: currentColor;
}

.q-text {
  font-weight: 800;
  font-stretch: 80%;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.q-stem {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.answer-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.q-answer {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  justify-self: start;
  padding: 12px 22px;
  border-radius: 22px;
  background: var(--purple);
  color: var(--white);
}

.q-answer b {
  font-weight: 800;
  font-stretch: 75%;
  font-size: 2rem;
  line-height: 1;
}

.answer-accept {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* About */
.round-about .q-text { grid-column: 1 / 7; align-self: center; }

.about-answer {
  grid-column: 7 / 13;
  align-self: center;
}

.about-lead {
  grid-column: 1 / 11;
  margin-top: 12px;
  font-weight: 650;
  font-stretch: 85%;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.about-lead b { color: var(--purple); font-weight: 800; }

.about-body {
  grid-column: 6 / 13;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  padding-left: 20px;
  border-left: 6px solid var(--blue);
}

.about-body b { color: var(--blue); }

/* Amalgam */
.round-amalgam .q-stem { grid-column: 1 / 8; }

.amalgam-answer {
  grid-column: 1 / 8;
  margin-top: 4px;
}

.amalgam-answer b { font-size: clamp(2rem, 4.4vw, 3rem); }

.choices {
  grid-column: 1 / 8;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.choices li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border: var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 1.1rem;
}

.choices li:nth-child(3) { background: var(--purple-tint); }

.choice-letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
}

.choices li:nth-child(3) .choice-letter { background: var(--purple); }

/* the mixing diagram */
.mixer {
  grid-column: 8 / 13;
  grid-row: 2 / 5;
  align-self: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 24px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  transform: rotate(2deg);
}

.mixer-col { display: grid; gap: 10px; justify-items: center; }

.mixer-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.pod {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: var(--paper);
}

.pod i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.pod .p { background: var(--purple); }
.pod .b { background: var(--blue); }
.pod .o { background: var(--paper); border: 3px solid var(--ink); }

.mixer-arrow {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.mixer-arrow::after {
  content: "→";
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
}

.mixer-arrow span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--purple);
}

/* Register */
.round-register {
  width: min(calc(100% - var(--gutter)), calc(var(--max) - var(--gutter)));
  margin: clamp(12px, 2vw, 24px) auto;
  padding: clamp(28px, 4vw, 48px) max(16px, calc(var(--gutter) / 2));
  border-radius: 28px;
  background: var(--blue);
  color: var(--white);
}

.round-register .round-tag .tag-type { background: var(--white); color: var(--blue); }

.register-h {
  grid-column: 1 / 10;
  font-weight: 700;
  font-stretch: 85%;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.08;
}

.register-h b {
  display: inline-block;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--purple);
}

.contacts {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.contact .choice-letter { background: var(--blue); }

.contact-name {
  font-weight: 800;
  font-stretch: 85%;
  font-size: 1.6rem;
  line-height: 1.05;
}

.contact-school {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--purple);
}

.handle {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1.05rem;
  user-select: all;
  cursor: text;
}

.handle::before {
  content: "@ ";
  color: #b9a8e3;
}

/* Organizers */
.logo-choices {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.logo-choice {
  position: relative;
  display: grid;
  place-items: center;
  height: 132px;
  padding: 22px 20px;
  border-radius: var(--radius);
}

.logo-choice .choice-letter {
  position: absolute;
  top: -12px;
  left: -10px;
}

.logo-dark { background: var(--ink); }
.logo-dark .choice-letter { background: var(--purple); color: var(--white); }

.logo-light { background: var(--white); border: var(--line); }

.logo-choice img {
  width: 100%;
  max-height: 64px;
  object-fit: contain;
}

.logo-choice .logo-square {
  width: auto;
  height: 92px;
  max-height: none;
}

.org-answer {
  grid-column: 1 / 5;
  align-self: start;
}

.org-text {
  grid-column: 5 / 13;
  align-self: center;
  font-size: 1.05rem;
}

.org-text a {
  color: var(--purple);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.org-text a:hover { color: var(--blue); }

.org-text a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

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

@media (max-width: 900px) {
  /* hero: big title and a compact calendar side by side */
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 14px;
  }

  .hero-title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: clamp(3.5rem, 27vw, 10rem);
  }

  .hero-date {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    padding: 26px 12px 12px;
    transform: rotate(5deg);
  }

  .cal-rings { height: 16px; }
  .cal-rings i { width: 8px; height: 8px; }
  .cal-dow { font-size: 0.6rem; letter-spacing: 0.1em; }
  .cal-month { font-size: 1.3rem; margin-top: 4px; }
  .cal-day { font-size: 3.8rem; }
  .cal-year { font-size: 0.7rem; padding: 1px 8px; margin-top: 6px; }

  .hero-expansion,
  .hero-photo,
  .hero-facts {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-photo { margin: 48px 4px 0; }

  .hero-facts { margin-top: 44px; }

  /* rounds collapse to one column */
  .round { grid-template-columns: minmax(0, 1fr); }
  .round > * { grid-column: 1 / -1 !important; grid-row: auto !important; }

  .about-body { margin-left: 6%; }

  .mixer { display: none; }

  .contacts { grid-template-columns: minmax(0, 1fr); }

  .logo-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .acro { padding: 1px 9px; }
  .choices li { border-radius: 22px; font-size: 1rem; }

  .hero-photo figcaption {
    left: 12px;
    bottom: -12px;
    max-width: calc(100% - 24px);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.62rem;
  }

  .sticker-free { width: 84px; height: 84px; top: -36px; right: -6px; font-size: 0.75rem; }
  .sticker-free b { font-size: 1.8rem; }

  .logo-choice { height: 108px; padding: 18px 14px; }
  .logo-choice .logo-square { height: 72px; }
  .logo-choice img { max-height: 44px; }
}
