/* tokens.css and fonts.css are linked from each page's <head> rather than
   imported here. @import is a serial waterfall: the browser cannot discover an
   imported sheet until this one has arrived and been parsed, so every page paid
   two extra round trips before it could render anything at all. Three <link>
   tags fetch in parallel. The board imports tokens.css and fonts.css itself,
   so nothing depends on the imports this file used to carry. */

/* The public site's stylesheet, and the only one /liikmetele uses. Every value
   here traces to design-spec.md: colours and radii come from tokens.css, the
   type scale is §2, the spacing steps are §3 (4·8·12·16·24·32·48·64·96 — there
   is nothing between them), and the deliberate departures are listed in
   CLAUDE.md §16. There are no shadows and no gradients anywhere on purpose.
   The board at /tahvel imports tokens.css only, not this file. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--lumi);
  color: var(--tekst);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 720px) {
  body {
    font-size: 17px;
  }
}

/* The type scale is design-spec §2, verbatim. Weights 300/400/500 only —
   there are no bold headings in this design. */

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

h1 {
  font-size: 36px;
  font-weight: 300;
  line-height: 1.08;
  margin: 0 0 24px;
}

h2 {
  font-size: 26px;
  font-weight: 400;
  margin: 48px 0 16px;
}

h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 12px;
}

@media (min-width: 720px) {
  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }
}

/* A heading that opens a section already has the section's padding above it. */
section > .container > h2:first-child,
section > .container > *:first-child > h2:first-child {
  margin-top: 0;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--sinine);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 160ms;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--taevas);
  color: var(--sinine);
}

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

/* Keyboard users land here first and can jump the six-item nav. */
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  background: var(--pind);
  border: 1px solid var(--sinine);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  font-family: var(--font-display);
  text-decoration: none;
}

.skip:focus {
  left: 20px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 720px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1120px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* Header */

.site-header {
  background: var(--pind);
  border-bottom: 1px solid var(--joon);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* design-spec §9: horizontal lockup, 36px height, in the header. */
.logo img {
  display: block;
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

/* The current page is marked with a hairline, not a colour — a second ink
   colour in the nav would spend coral on navigation (design-spec §0). */
.site-nav a[aria-current="page"] {
  box-shadow: 0 2px 0 var(--sinine);
}

.site-nav a:hover {
  box-shadow: 0 2px 0 var(--joon);
}

.site-nav a[aria-current="page"]:hover {
  box-shadow: 0 2px 0 var(--sinine);
}

/* Mobile menu: without JS the nav is simply visible; menu.js adds html.js
   and the collapse/expand behaviour on top. */

.menu-toggle {
  display: none;
  border: 1px solid var(--joon);
  background: var(--pind);
  color: var(--sinine);
  border-radius: var(--radius-control);
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms, border-color 160ms;
}

.menu-toggle:hover {
  background: var(--taevas);
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-burger {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.btn-icon {
  margin-right: 8px;
  flex-shrink: 0;
}

/* The nav carries five links plus the Liikmetele door, which stops fitting
   beside the lockup well before the 720px container breakpoint — hence 900. */
@media (max-width: 899px) {
  html.js .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  html.js .site-nav {
    display: none;
  }

  html.js .site-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    inset: 64px 0 0 0;
    z-index: 10;
    background: var(--pind);
    padding: 32px 20px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.btn {
  transition: background-color 160ms, color 160ms, border-color 160ms;
}

.btn-primary {
  background: var(--sinine);
  color: #ffffff;
}

/* The one moment coral is allowed to fill something. It is a hover on a
   48px control, so it is never on screen at rest — the "coral under a tenth
   of the screen" budget in design-spec §0 is untouched. */
.btn-primary:hover {
  background: var(--korall);
  color: var(--sinine);
}

.btn-secondary {
  background: transparent;
  color: var(--sinine);
  border-color: var(--sinine);
}

.btn-secondary:hover {
  background: var(--sinine);
  color: #ffffff;
}

/* Sections */

section {
  padding: 48px 0;
}

.hero {
  padding: 48px 0;
}

@media (min-width: 720px) {
  section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }
}

/* The page's single coral mark: a 32px bar above the heading. A bar, not
   text — coral fails AA as small type on white (design-spec §10). */
.hero-text::before,
.page-head .container::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--korall);
  margin-bottom: 24px;
}

.band-taevas {
  background: var(--taevas);
}

/* Bands butt against the pages above and below them, so they carry the
   section padding plus a step — this is what stops them reading as a stripe. */
@media (min-width: 720px) {
  .band-taevas {
    padding: 80px 0;
  }
}

.band-sinine {
  background: var(--sinine);
  color: #ffffff;
}

.band-sinine a {
  color: var(--korall);
}

/* The hero is the club illustration beside the text. It stacks on a phone,
   text first — the heading and the button must not be pushed below the fold
   by artwork. */

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
  }
}

.hero-lead {
  max-width: 46ch;
  font-size: 17px;
}

@media (min-width: 720px) {
  .hero-lead {
    font-size: 19px;
  }
}

/* The artwork's white background is knocked out to transparency by
   scripts/build-hero.mjs, so it sits on --lumi with no visible box. */
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  max-width: 560px;
  justify-self: center;
}

.page-head {
  padding: 48px 0 16px;
}

@media (min-width: 720px) {
  .page-head {
    padding: 80px 0 24px;
  }
}

.lead {
  max-width: 60ch;
  margin: 0;
  color: var(--tekst-vaikne);
}

/* Key/value rows: hairlines only, no table borders (design-spec §6). */

.rows {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: 68ch;
}

.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--joon);
}

.row-key {
  font-family: var(--font-display);
  font-weight: 500;
}

.row-val {
  text-align: right;
}

/* The price is the thing being looked up, so it gets the display face and
   the light weight the scale reserves for numbers. */
.rows-price .row-val {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 24px;
  line-height: 1;
}

.row-desc {
  flex-basis: 100%;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tekst-vaikne);
}

/* Inside the --taevas band the hairline needs to be darker than --joon to
   stay visible; --taevas is lighter than the line colour. */
.band-taevas .rows li {
  border-bottom-color: rgba(18, 52, 78, 0.18);
}

.band-note {
  max-width: 68ch;
  font-size: 15px;
}

/* The footnote under the times list — the ticket note tied to the asterisk.
   It sits on --taevas, where --tekst-vaikne is not allowed (design-spec §10),
   so the text stays navy and only the size comes down. */
.footnote {
  max-width: 68ch;
  font-size: 14px;
  margin: 0 0 16px;
}

.timeline {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0;
  margin: 0 0 24px;
}

.timeline dt {
  font-family: var(--font-display);
  font-weight: 500;
  padding: 12px 24px 12px 0;
  border-top: 1px solid var(--joon);
  white-space: nowrap;
}

.timeline dd {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--joon);
}

@media (max-width: 519px) {
  /* At phone width the year column starves the sentence, so the pair stacks. */
  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline dt {
    padding-bottom: 0;
    border-top: 1px solid var(--joon);
  }

  .timeline dd {
    padding-top: 4px;
    border-top: 0;
  }
}

.source-note {
  font-size: 13px;
  color: var(--tekst-vaikne);
}

.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--pind);
  border: 1px solid var(--joon);
  border-radius: var(--radius-card);
  padding: 24px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  background: var(--taevas);
  color: var(--sinine);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* One pale wash per card, so the row of three is not a single flat colour.
   The board's tints in order; the glyph stays navy. A recorded deviation
   (CLAUDE.md §16) — the club asked for a little more colour on the page. */
.cards .card:nth-child(1) .card-icon { background: var(--tint-taevas); }
.cards .card:nth-child(2) .card-icon { background: var(--tint-korall); }
.cards .card:nth-child(3) .card-icon { background: var(--tint-mets); }

.card h2,
.card h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 12px;
}

/* Whatever the card ends with is its action, and the actions across a row
   should line up however long the copy above them runs. */
.card > :last-child {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 8px;
}

/* Reading column. `.container prose` is used as one element on the prose pages,
   so the narrower max-width must not inherit .container's auto side margins —
   otherwise the paragraphs centre themselves and stop lining up with the h1
   in the plain .container above them. */
.prose {
  max-width: 68ch;
}

.container.prose {
  margin-left: auto;
  margin-right: auto;
  max-width: calc(68ch + 40px);
}

@media (min-width: 720px) {
  .container.prose {
    max-width: calc(68ch + 64px);
  }
}

@media (min-width: 1120px) {
  /* Past this width .container is pinned at 1120 and centred, so the prose
     column has to align to that box's left edge, not to the viewport. */
  .container.prose {
    max-width: 1120px;
  }

  .container.prose > * {
    max-width: 68ch;
  }
}

/* Members entry (/liikmetele) — server-rendered; structural only, the
   visual finish waits for the artboard pass. */

.members-page {
  background: var(--taevas);
  min-height: 100vh;
}

.login-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* design-spec §8: vertical lockup at 88px above the login panel. */
.login-logo {
  display: block;
  text-decoration: none;
}

.login-logo img {
  display: block;
  height: 88px;
  width: auto;
}

.login-panel {
  width: 100%;
  background: var(--pind);
  border: 1px solid var(--joon);
  border-radius: var(--radius-card);
  padding: 24px 20px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--tekst-vaikne);
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  background: var(--pind);
  border: 1px solid var(--joon);
  border-radius: var(--radius-control);
  font-family: var(--font-body);
  font-size: 16px; /* 16px minimum prevents iOS zoom on focus */
  color: var(--tekst);
}

.field-help {
  display: block;
  font-size: 13px;
  color: var(--tekst-vaikne);
  margin-top: 4px;
}

/* No .admin-reveal here: moderation is a list of names (ADMIN_NAMES) and the
   login form asks only for the name and the club code. See CLAUDE.md §6. */

.login-submit {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* Error text is never coral body text — coral fails AA below 16px. */
.form-error {
  font-size: 14px;
  color: var(--sinine);
  border-left: 3px solid var(--korall);
  padding-left: 8px;
  margin: 0 0 16px;
}

/* The logged-in page has no site header — this is the one mark on it, so the
   member can get back to the public site. */
.members-logo {
  display: block;
  width: max-content;
  margin: 32px auto 0;
}

.members-logo img {
  display: block;
  height: 36px;
  width: auto;
}

.members-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
  background: var(--pind);
  border: 1px solid var(--joon);
  border-radius: var(--radius-card);
  margin-top: 24px;
}

/* The one thing on the logged-in page: a yellow sticky note that is the link
   to the idea board. The club asked for a Post-it, so this block is where the
   design-spec's bans on a third colour (§1), on shadows (§3) and on rotation
   (§11) are broken on purpose — once, here, recorded in CLAUDE.md §16. Every
   link row in sisu.md becomes one note; today there is one. */
.member-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin: 32px 0 0;
  padding: 0;
}

/* The row item is 360px wide and shrinks on a narrow screen; the note fills
   it. Sizing the note itself instead lets the item stretch across the row
   and the note sit at its left edge. */
.member-links li {
  flex: 0 1 360px;
  max-width: 100%;
}

.note {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  /* A square by preference; the content-based minimum still applies, so a
     longer text makes the note taller instead of clipping. */
  aspect-ratio: 1;
  padding: 48px 28px 32px;
  background: var(--kleeps);
  color: var(--tekst);
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 0 8px 20px rgba(18, 52, 78, 0.16);
  transform: rotate(-1.5deg);
  transition: transform 160ms ease;
}

/* The glue strip along the top edge. */
.note::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 28px;
  background: var(--kleeps-liim);
}

/* The lifted bottom-right corner: two borders, no gradient, no image. The
   page-coloured triangle cuts the corner, the darker one is the underside. */
.note::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-style: solid;
  border-width: 0 0 32px 32px;
  border-color: transparent transparent var(--pind) var(--kleeps-liim);
}

/* Picking the note up: it straightens and lifts. The global reduced-motion
   rule drops the transition, so it simply snaps. */
a.note:hover,
a.note:focus-visible {
  transform: rotate(0deg) translateY(-2px);
}

/* Section-heading scale (§2) for the title. The text is 20px, one step above
   body: like the vote count, the note is meant to be read at arm's length. */
.note-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
}

@media (min-width: 720px) {
  .note-title {
    font-size: 32px;
  }
}

.note-text {
  font-size: 20px;
  line-height: 1.5;
}

/* The note is a link but does not look like one. This pill is the mark that
   says so — placed at the bottom of the square, like a "press here" sticker;
   the whole note stays the tap target. */
.note-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 18px;
  background: var(--sinine);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.note-cta-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

a.note:hover .note-cta-arrow,
a.note:focus-visible .note-cta-arrow {
  transform: translateX(3px);
}

.members-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

.members-footer .btn {
  cursor: pointer;
}

/* Footer */

/* The footer is the contact block on every page, and the page's single moment
   of full colour (design-spec §6). It is also the one place the mark is used
   as decoration: the silhouette, in a lighter tone of the same navy, bleeding
   off the right edge. One watermark on the page, no second one — the hero is
   deliberately empty and stays that way. */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--sinine);
  color: #ffffff;
  padding: 48px 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: 300px;
  height: 298px; /* the mark's own 1000:992 ratio */
  /* A lighter tone of the band itself, not a new colour and not an image. */
  background-color: rgba(255, 255, 255, 0.07);
  -webkit-mask: url("/logo/logo-mark-mono.svg") center / contain no-repeat;
  mask: url("/logo/logo-mark-mono.svg") center / contain no-repeat;
  pointer-events: none;
}

/* On a phone a 300px mark covers most of a 375px band, which stops reading as
   a watermark and starts reading as a background image. */
@media (max-width: 719px) {
  .site-footer::before {
    right: -40px;
    width: 180px;
    height: 179px;
  }
}

.site-footer .container {
  position: relative;
}

.site-footer a {
  color: #ffffff;
  font-family: var(--font-display);
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 900px;
  }
}

/* design-spec §6: the one line on the home page where coral is a link colour. */
.social-line {
  margin: 0 0 48px;
}

.social-line a {
  color: var(--korall);
}

/* Brand marks: outline only, currentColor, never the official coloured badges.
   Drawn as CSS masks so the glyph takes the colour of the text beside it. */
.ico {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: -4px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.ico-fb {
  -webkit-mask-image: url("/img/icon-facebook.svg");
  mask-image: url("/img/icon-facebook.svg");
}

.ico-ig {
  -webkit-mask-image: url("/img/icon-instagram.svg");
  mask-image: url("/img/icon-instagram.svg");
}

.social {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

/* The Instagram slot before there is an account to link to. Quieter than the
   live link, and unmistakably not clickable. */
.social-soon {
  color: rgba(255, 255, 255, 0.65);
}

.footer-heading {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.footer-grid p {
  margin: 0 0 4px;
}

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* --- Ajutine teatebänner avalehel ------------------------------------------
   A dated announcement between the hero and the week. §6 puts nothing between
   them, so this is a recorded deviation (CLAUDE.md §16) — the club asked for
   something that visibly says "this is current". A panel, not a band, so it
   reads as a temporary insert. It is narrower than the content column and
   left-aligned with it, and it carries no border — the wash and the radius
   alone, tried that way at the club's request. No gradient, no shadow, no
   rotation. Removing the block from index.html removes it. */
.notice {
  padding: 0 0 48px;
}

.notice-panel {
  max-width: 880px;
  background: var(--tint-korall);
  border-radius: var(--radius-card);
  padding: 24px 24px 28px;
}

/* The notice's action is the board's coral, so the hero keeps the page's one
   navy primary. */
.notice .btn-primary {
  background: var(--korall);
  color: var(--sinine);
}

.notice .btn-primary:hover {
  background: var(--sinine);
  color: #ffffff;
}

/* The banner's date: just the year, one step above the eyebrow scale so it
   reads as the stamp on the notice. */
.notice-date {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.notice-title {
  margin: 0 0 12px;
}

.notice-text {
  max-width: 68ch;
  margin: 0 0 24px;
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin: 0;
}

.notice-mail {
  font-size: 15px;
}

@media (min-width: 720px) {
  .notice {
    padding: 0 0 64px;
  }

  .notice-panel {
    padding: 32px 32px 36px;
  }
}

/* --- The calendar's "Tulekul" block -----------------------------------------
   A recorded deviation (CLAUDE.md §16): an upcoming event on a page that is
   otherwise timeless, so it sits above the week. The only mark is its heading,
   set in coral — an h2 is 32/26px, well above the 16px floor coral needs on a
   light background (design-spec §10). Nothing else changes. No block uses it
   while nothing is upcoming; the rule stays for the next event. */
.tulekul h2 {
  color: var(--korall);
}
