/* hack55 site, minimal. Type sets the hierarchy; full-bleed bands separate the sections.
   Palette and faces come from the brand guide (project/tokens.json). */

:root {
  --bg: #FDF7EE;
  --paper: #FFFFFF;
  --tint: #F3E6D2;
  --ink: #141D26;
  --ink-2: #222E3B;
  --muted: #3B4652;
  --accent: #E62B37;
  --on-accent: #FDF7EE;

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-text: Inter, system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --column: 1040px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, dl, dd, dt, p { margin: 0; }

a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Every section is a full-width band; its content sits on one shared column. */
main > section,
.foot {
  padding-inline: max(var(--gutter), calc((100% - var(--column)) / 2));
}

/* Lenis smooth scroll (open source) needs native scrolling reset to auto. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Floating dock: the only navigation, fixed to the top. */

.dock {
  position: fixed;
  top: max(18px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  max-width: calc(100vw - 2 * var(--gutter));
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(20, 29, 38, 0.28); /* taste-skill-ignore: the dock floats over the page as an overlay */
  transition: transform 260ms ease, opacity 260ms ease;
}
.dock.is-hidden { transform: translate(-50%, calc(-100% - 40px)); opacity: 0; pointer-events: none; }
.dock-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 14px 10px 16px;
  margin-right: 6px;
}
.dock-link {
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.dock-link:hover { background: var(--ink-2); color: var(--bg); }
.dock-link[aria-current="true"] { background: var(--ink-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.dock-cta {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  margin-left: 6px;
  white-space: nowrap;
}
.dock-cta:hover { background: var(--accent); color: var(--on-accent); }
.dock a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero: the banner leads, and its base fades into the band below. */

.hero {
  padding-top: 112px;
  padding-bottom: 96px;
  background: linear-gradient(to bottom, var(--bg) 62%, var(--tint) 100%); /* taste-skill-ignore: the fade into the intro was requested */
}
.hero-art { margin: 0 0 56px; }
.hero-art img { width: 100%; height: auto; }

.lede {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.2;
  max-width: 34ch;
}
.meta { margin-top: 20px; color: var(--muted); font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 40px; }

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  padding: 16px 24px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-quiet { background: transparent; color: var(--ink); padding-inline: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.btn-quiet:hover { background: transparent; color: var(--accent); }

/* Intro: the statement, then a quieter note. Fades in from the hero. */

.intro {
  padding-block: 80px 112px;
  background: linear-gradient(to bottom, var(--tint) 0%, var(--bg) 70%); /* taste-skill-ignore: the fade into the intro was requested */
}
.intro-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.15;
  max-width: 22ch;
  color: var(--ink);
}
.intro-note { margin-top: 24px; color: var(--muted); max-width: 60ch; }

/* Section bands: each one a different ground, so the page reads in chapters. */

.band-paper { background: var(--paper); }
.band-cream { background: var(--bg); }

.block { padding-block: 112px; }
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 40px;
}

.rows > div {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  padding-block: 20px;
}
.rows dt { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--ink); }
.rows dd { color: var(--muted); align-self: center; }

.faq > div { padding-block: 26px; }
.faq dt { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; color: var(--ink); margin-bottom: 8px; }
.faq dd { color: var(--muted); max-width: 60ch; }
.faq dd a { color: var(--ink); }

.small { margin-top: 36px; color: var(--muted); font-size: 16px; }
.small a { color: var(--ink); }

/* Schedule: grouped by day. */

.days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
.day-name { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.1; margin-bottom: 14px; }
.day-items { list-style: none; padding: 0; margin: 0; }
.day-items li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding-block: 12px; border-top: 0; }
.time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.what { color: var(--muted); }

/* Prizes: two tiers. */

.lead { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; margin: -16px 0 48px; }
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.tier-name { font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.award-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.award-list li { display: grid; gap: 6px; }
.award-list strong { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.1; color: var(--ink); }
.award-list span { color: var(--muted); }

/* Ink chapter: schedule, prizes, questions, on one dark ground. */

.band-ink { background: var(--ink); color: var(--bg); padding-block: 120px; }
.band-ink h2 { color: var(--bg); margin-bottom: 48px; }
.band-ink .note-ink { color: #B9B0A3; font-size: 16px; margin-top: 28px; }
.band-ink a { color: var(--bg); }
.band-ink a:hover { color: var(--accent); }

/* Schedule: a hairline table. Real tables may carry lines. */

table.sched { width: 100%; border-collapse: collapse; font-size: 18px; }
table.sched th { text-align: left; font-weight: 400; font-size: 15px; color: #B9B0A3; padding: 0 0 14px; }
table.sched td { padding: 22px 16px 22px 0; border-top: 1px solid #3A4550; vertical-align: top; } /* taste-skill-ignore: a real table */
table.sched td:first-child { font-weight: 700; white-space: nowrap; width: 300px; }
table.sched td:nth-child(2) { width: 300px; }
table.sched td:nth-child(3) { color: #B9B0A3; }
table.sched tbody tr:last-child td { border-bottom: 1px solid #3A4550; } /* taste-skill-ignore: a real table */

/* Prizes: centred, two tiers, hairline tops. */

.centre { text-align: center; }
.centre h2 { margin-inline: auto; }
.sub { font-size: 18px; color: #B9B0A3; max-width: 52ch; margin: -24px auto 56px; }
.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; max-width: 900px; margin-inline: auto; text-align: left; }
.tier { border-top: 1px solid #3A4550; padding-top: 18px; margin-bottom: 40px; } /* taste-skill-ignore: the reference layout uses hairline tops on each tier */
.tier-label { font-size: 15px; color: #B9B0A3; margin-bottom: 18px; }
.tier-item { margin-bottom: 20px; color: var(--bg); font-size: 18px; }
.tier-item strong { display: block; font-weight: 600; font-size: 22px; line-height: 1.2; margin-bottom: 4px; }
.categories { margin-top: 24px; color: #B9B0A3; font-size: 16px; }

/* Questions: heading on the left, accordion on the right. */

.split-q { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start; }
.split-q h2 { margin-bottom: 12px; }
.acc details { border-top: 1px solid #3A4550; } /* taste-skill-ignore: the reference accordion uses hairline rows */
.acc details:last-child { border-bottom: 1px solid #3A4550; } /* taste-skill-ignore: the reference accordion uses hairline rows */
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-size: 19px; color: var(--bg); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 26px; line-height: 1; color: #B9B0A3; transition: transform 200ms ease; }
.acc details[open] summary::after { content: "–"; }
.acc details p { padding: 0 0 24px; color: #B9B0A3; max-width: 60ch; }
.acc details a { color: var(--bg); }
.rules-note { max-width: 1040px; margin: 40px auto 0; }

/* Questions: animated accordion. Height animates with grid rows, so no fixed heights. */

.qa-item { border-top: 1px solid #3A4550; } /* taste-skill-ignore: the reference accordion uses hairline rows */
.qa-item:last-child { border-bottom: 1px solid #3A4550; } /* taste-skill-ignore: the reference accordion uses hairline rows */
.qa-q { margin: 0; font-size: inherit; font-weight: 400; }
.qa-btn {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--font-text);
  font-size: 19px;
  color: var(--bg);
}
.qa-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.qa-plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.qa-plus::before, .qa-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: #B9B0A3; transition: transform 320ms ease; }
.qa-plus::after { transform: rotate(90deg); }
.qa-item.is-open .qa-plus::after { transform: rotate(0deg); }
.qa-item.is-open .qa-plus::before { transform: rotate(180deg); }
.qa-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 380ms cubic-bezier(.2,.7,.2,1), opacity 380ms ease; opacity: 0; }
.qa-a > div { overflow: hidden; min-height: 0; }
.qa-item.is-open .qa-a { grid-template-rows: 1fr; opacity: 1; }
.qa-a p { padding: 0 0 24px; color: #B9B0A3; max-width: 60ch; }
.no-js .qa-a { grid-template-rows: 1fr; opacity: 1; }

/* Reveal: blocks rise into place as they enter the screen. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 760ms cubic-bezier(.2,.7,.2,1), transform 760ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Close: the red field. */

.close { background: var(--accent); color: var(--on-accent); }
.close h2 { color: var(--on-accent); }
.close .btn { background: var(--ink); color: var(--bg); }
.close .btn:hover { background: var(--bg); color: var(--ink); }
.close .btn-quiet { background: transparent; color: var(--on-accent); }
.close .btn-quiet:hover { color: var(--bg); background: transparent; }

/* Close: the full-width ink band. */

.close { padding-block: 128px 136px; }
.close h2 { font-size: clamp(40px, 8vw, 120px); line-height: 0.92; letter-spacing: -0.03em; margin-bottom: 0; }
.close .actions { margin-top: 48px; }

/* Footer */

.foot { padding-block: 48px 56px; }
.foot p { color: var(--muted); font-size: 15px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  main > section, .foot { padding-inline: var(--gutter); }
  .hero { padding-top: 96px; }
  .dock { gap: 0; padding: 6px; }
  .dock-mark { display: none; }
  .dock-link { font-size: 14px; padding: 9px 10px; }
  .dock-cta { font-size: 14px; padding: 9px 14px; margin-left: 4px; }
  .rows > div { grid-template-columns: 1fr; gap: 4px; }
  .tier-grid, .split-q { grid-template-columns: 1fr; gap: 40px; }
  table.sched td:first-child, table.sched td:nth-child(2) { width: auto; }
  table.sched td:nth-child(3) { display: none; }
  .band-ink { padding-block: 88px; }
  .day-items li { grid-template-columns: 120px minmax(0, 1fr); }
  .block { padding-block: 84px; }
  .close { padding-block: 96px 104px; }
  h2 { font-size: 40px; margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
