/* The Club's terms and privacy policy.
   A Night header carries the logo, the title, what the page is and its date. Below it each
   section is a row: its heading on the left, held in view while its text is read, and the text on the right.
   No script runs on these pages (the CSP forbids it), so every move here is CSS and the text never waits on one. */
:root {
  color-scheme: light;
  --night: #062F45;
  --aurora: #2BE0CC;
  --aurora-tint: #D5F8F3;
  --cloud: #F4FAFB;
  --white: #FFFFFF;
  --teal: #007D72;
  --slate: #557080;
  --mist: #9FB8C4;
  --on-night: #DCE8ED;

  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --frame: clamp(20px, 5.5vw, 80px);
  --gap: clamp(20px, 2.2vw, 32px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--cloud); color: var(--night); font: 18px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color .15s var(--ease), text-decoration-thickness .15s var(--ease), text-underline-offset .15s var(--ease); }
a:hover { text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--aurora); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--aurora-tint); color: var(--night); }
strong { font-weight: 600; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--frame); }
/* one twelve-column grid for the header and every section, so the page keeps three left edges */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- the Night header ---------- */
.top { background: var(--night); color: var(--white); }
.bar { padding-top: 32px; }
.logo { display: block; height: 34px; width: auto; }
/* on damodi.io/terms and /privacy the logo leads back to the home page */
.home { display: block; width: fit-content; }

.title { padding-top: clamp(64px, 8vw, 128px); padding-bottom: clamp(56px, 6.5vw, 104px); }
.title .head { grid-column: 1 / -1; }      /* the whole width, so the title takes one line wherever it fits */
.top h1 { font-size: clamp(36px, 6vw, 88px); line-height: 1; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.top .lede { margin-top: 28px; max-width: 30em; font-size: 20px; line-height: 1.55; color: var(--on-night); }
.top .meta { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--mist); }


/* ---------- the text: one row per section ---------- */
.doc { padding-top: clamp(64px, 7vw, 112px); padding-bottom: clamp(80px, 8vw, 128px); }
.doc > section { row-gap: 16px; }
.doc > section + section { margin-top: clamp(48px, 5vw, 80px); }
.doc h2 { grid-column: 1 / span 4; align-self: start; position: sticky; top: 32px;
  font-size: clamp(22px, 1.9vw, 28px); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.doc .body { grid-column: 5 / span 8; max-width: 36em; }
.doc .body > * + * { margin-top: 18px; }
.doc ul { padding-left: 1.15em; }
.doc li { padding-left: .35em; }
.doc li + li { margin-top: 10px; }
.doc li::marker { color: var(--teal); }
.doc .aside { color: var(--slate); }                    /* the name of a right, after its plain words */
.doc .rights { columns: 2; column-gap: var(--gap); }
.doc .rights li { break-inside: avoid; }
.doc .rights li + li { margin-top: 0; }
.doc .rights li { margin-bottom: 10px; }
.doc .bases > li + li { margin-top: 16px; }

/* how to reach us: a white panel, the one place the page changes tone */
.reach { padding: 28px 32px 30px; background: var(--white); border-radius: 16px; }
.reach dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; }
.reach dt { color: var(--slate); }
.reach dd { font-weight: 600; }
.reach dd a { color: var(--night); }
.reach p + dl, .reach p + p { margin-top: 14px; }

/* ---------- the close ---------- */
footer { background: var(--white); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 32px; padding-bottom: 40px; font-size: 15px; line-height: 1.6; color: var(--slate); }
.foot .co { margin-right: auto; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot a { color: var(--slate); text-decoration: none; }
.foot a:hover { color: var(--night); text-decoration: underline; }
.foot a[aria-current="page"] { color: var(--night); font-weight: 600; }

/* ---------- arrival: the header's parts come in once, in reading order; the sections rise as they scroll in ---------- */
@keyframes legal-rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes legal-fade { from { opacity: 0; } }
.bar { animation: legal-fade .6s var(--ease) backwards; }
.top h1 { animation: legal-rise .8s .08s var(--ease) backwards; }
.top .lede { animation: legal-rise .7s .2s var(--ease) backwards; }
.top .meta { animation: legal-rise .7s .28s var(--ease) backwards; }
@supports (animation-timeline: view()) {
  /* measured in pixels, not in the block's height, so a long block is whole after its first lines are in view */
  .doc h2, .doc .body { animation: legal-rise linear both; animation-timeline: view(); animation-range: entry 0px entry 160px; }
  .doc .body { animation-range: entry 24px entry 200px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar, .top h1, .top .lede, .top .meta, .doc h2, .doc .body { animation: none; }
  a { transition: none; }
}

/* ---------- tablet: the text takes the rest of the row ---------- */
@media (max-width: 1080px) {
  .doc .body { grid-column: 5 / -1; }
}
/* ---------- phone and narrow tablet: each heading above its text ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .bar { padding-top: 24px; }
  .logo { height: 28px; }
  .top .lede { margin-top: 20px; font-size: 18px; }
  .doc h2, .doc .body { grid-column: 1 / -1; }
  .doc h2 { position: static; }
  .doc .rights { columns: 1; }
  .reach { padding: 24px; }
  .reach dl { grid-template-columns: 1fr; gap: 2px; }
  .reach dd + dt { margin-top: 10px; }
  .foot .co { margin-right: 0; }
}

@media print {
  body { background: none; font-size: 11pt; }
  .top { background: none; color: var(--night); }
  .top .lede, .top .meta { color: var(--night); }
  footer ul { display: none; }
  .doc h2 { position: static; }
  .doc > section { break-inside: avoid; }
  * { animation: none !important; }
}
