/* Access — the opener with the INVITE recording, the way in on one time axis, the plans on ink, trial against a plan,
   the members' invite code, questions and the closing line. Load after tokens.css and site.css; behaviour in
   /assets/js/access.js. Mobile first; desktop from 900 px on the 12-column grid. */

/* ---------- 1. opener: the inscription and the recording on one ground line ---------- */
.ao { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding-top: var(--hdr); }
.ao-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; padding-top: clamp(24px, 4vh, 56px); }
.ao-h { grid-column: 1 / -1; font-family: var(--serif); font-weight: 400; font-size: var(--t-h1); line-height: .94; letter-spacing: -.014em; }
.ao-l { display: block; }
/* phones: the recording right-aligned under the inscription, as tall as the first screen allows */
.ao-rec { grid-column: 2; grid-row: 2; align-self: end; margin-top: 28px; width: min(72vw, calc((100svh - var(--hdr) - 37.8vw - 176px) * 9 / 16)); min-width: 200px; }
.ao-rec .rec-frame { aspect-ratio: 9 / 16; border-radius: var(--r-s) var(--r-s) 0 0; }
.ao-plinth { border-top: 1px solid var(--ink); }
.ao-sub { max-width: 30ch; padding: 18px 0 clamp(28px, 4.5vh, 44px); font-size: var(--t-lead); line-height: 1.45; letter-spacing: -.012em; color: var(--ink-soft); text-wrap: pretty; }

.js .ao-l { opacity: 0; transform: translateY(.18em); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.js .ao-l:nth-child(2) { transition-delay: .08s; }
.js .ao-l:nth-child(3) { transition-delay: .16s; }
.js .ao-rec, .js .ao-sub { opacity: 0; transition: opacity 1s var(--ease) .35s; }
.js .ao.is-in .ao-l, .js .ao.is-in .ao-rec, .js .ao.is-in .ao-sub { opacity: 1; transform: none; }

/* small tablets: the inscription and the recording side by side on the ground line */
@media (min-width: 600px) and (max-width: 899.98px) {
  .ao-stage { grid-template-rows: 1fr; column-gap: 24px; align-items: end; }
  .ao-h { grid-column: 1; grid-row: 1; margin-bottom: .13em; }
  .ao-rec { grid-column: 2; grid-row: 1; width: min(40vw, calc((100svh - var(--hdr) - 170px) * 9 / 16)); }
}
@media (min-width: 900px) {
  .ao-stage { grid-template-columns: repeat(12, 1fr); grid-template-rows: 1fr; column-gap: var(--gap); align-items: end; padding-top: 0; }
  /* the last line's descender meets the ground line, as on Home */
  .ao-h { grid-column: 1 / span 8; grid-row: 1; margin-bottom: .13em; }
  .ao-rec { grid-column: 9 / span 4; grid-row: 1; justify-self: end; margin: 32px clamp(0px, 3vw, 48px) 0 0; width: min(100%, 400px, calc((100svh - var(--hdr) - 170px) * 9 / 16)); }
  .ao-plinth .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .ao-sub { grid-column: 1 / span 5; padding-top: 24px; }
}

/* ---------- 2. the way in: the code, seven trial days, the open line to a plan, on one axis ---------- */
.aw { padding: clamp(72px, 8vw, 128px) 0 var(--sec); }
.aw-axis { display: grid; gap: 44px; }
.aw-vis { position: relative; display: flex; align-items: flex-end; min-height: 20px; border-bottom: 1px solid var(--ink); }
.aw-code { padding-bottom: 12px; font-size: clamp(22px, 2.1vw, 32px); font-weight: 500; letter-spacing: .02em; white-space: pre; }
.aw-code .aw-rest { font-weight: inherit; visibility: hidden; }
.aw-code .aw-caret { display: inline-block; width: 2px; height: .9em; margin: 0 -1px; background: var(--ink); vertical-align: -.08em; }
.aw-days { display: flex; gap: 3px; width: 100%; padding-bottom: 6px; }
.aw-days i {
  flex: 1; height: 40px; display: flex; align-items: flex-start; padding: 6px 7px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--rule);
  font: 400 11px/1 var(--mono); font-style: normal; color: var(--ink-mute); font-variant-numeric: tabular-nums;
  transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease);
}
.aw-days i.is-on, .rm .aw-days i { background: var(--ink); color: var(--on-ink-soft); box-shadow: none; }
.aw-open { position: absolute; right: -2px; bottom: -8.5px; width: 16px; height: 16px; background: var(--paper); }
.aw-open svg { width: 16px; height: 16px; }
.aw-t { margin-top: 20px; font-size: clamp(21px, 1.75vw, 27px); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.aw-s { margin-top: 8px; max-width: 32ch; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.aw-down { color: var(--ink); }
.aw-down svg { transform: rotate(90deg); }
.aw-down:hover svg { transform: rotate(90deg) translateX(3px); }

@media (min-width: 900px) {
  .aw-axis { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .aw-seg-code { grid-column: 1 / span 3; }
  .aw-seg-days { grid-column: 4 / span 6; }
  .aw-seg-term { grid-column: 10 / span 3; }
  /* one unbroken axis across the column gaps */
  .aw-seg:not(:last-child) .aw-vis { margin-right: calc(var(--gap) * -1); padding-right: var(--gap); }
  .aw-vis { height: 88px; min-height: 0; }
  .aw-days i { height: 60px; padding: 8px 9px; font-size: 12px; }
  .aw-t { margin-top: 26px; }
}

/* ---------- 3. plans, on ink: each term as a span of the year, beside its price ---------- */
.ap { background: var(--ink); color: var(--on-ink); padding: var(--sec) 0; }
.ap .lead { color: var(--on-ink-soft); max-width: 26ch; }
.ap-head { display: grid; gap: 14px; }
.ap-list { margin-top: clamp(48px, 6vw, 96px); border-top: 1px solid var(--on-ink); }
.ap-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 16px; padding: 22px 0 20px; border-bottom: 1px solid var(--rule-ink); }
.ap-term { grid-row: 1; grid-column: 1; font-size: 17px; font-weight: 500; letter-spacing: -.015em; }
.ap-price { grid-row: 1; grid-column: 2; display: flex; align-items: baseline; justify-content: flex-end; white-space: nowrap; }
.ap-n { font-size: clamp(52px, 7.2vw, 116px); font-weight: 500; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ap-u { margin-left: .4em; font-size: clamp(17px, 1.9vw, 30px); font-weight: 500; letter-spacing: -.01em; }
/* the year as a track with a tick per month; the term's span drawn over it */
.ap-span {
  grid-row: 2; grid-column: 1 / -1; position: relative; height: 9px; margin-top: 18px;
  background: linear-gradient(var(--rule-ink), var(--rule-ink)) 0 100% / 100% 1px no-repeat,
              repeating-linear-gradient(to right, var(--rule-ink) 0 1px, transparent 1px calc(100% / 12)) 0 100% / calc(100% + 1px) 6px no-repeat;
}
.ap-span i { position: absolute; left: 0; bottom: 0; width: calc(var(--k) * 100%); height: 3px; background: var(--on-ink); transform-origin: 0 50%; }
.js .ap-span i { transform: scaleX(0); transition: transform 1.4s var(--ease-io); }
.js .is-in .ap-span i { transform: none; }
.js .is-in .ap-row:nth-child(2) .ap-span i { transition-delay: .12s; }
.js .is-in .ap-row:nth-child(3) .ap-span i { transition-delay: .24s; }
.ap-foot { margin-top: 36px; display: grid; gap: 28px; }
.ap-terms { display: grid; gap: 8px; max-width: 54ch; font-size: 15px; line-height: 1.5; color: var(--on-ink-soft); }

@media (min-width: 900px) {
  .ap-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .ap-head .h2 { grid-column: 1 / span 7; }
  .ap-head .lead { grid-column: 9 / span 4; padding-bottom: .3em; }
  .ap-row { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; padding: 26px 0 22px; }
  .ap-term { grid-column: 1 / span 3; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.03em; line-height: 1; padding-bottom: .1em; }
  .ap-span { grid-column: 4 / span 5; grid-row: 1; margin: 0 0 .9em; }
  .ap-price { grid-column: 9 / span 4; grid-row: 1; }
  .ap-foot { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: center; margin-top: 40px; }
  .ap-terms { grid-column: 1 / span 6; font-size: 16px; }
}

/* ---------- 4. trial against a plan: a ruled comparison ---------- */
.at { padding: var(--sec) 0; }
.at-h { max-width: 12ch; }
.at-t { width: 100%; margin-top: 40px; table-layout: fixed; border-top: 1px solid var(--ink); }
.at-t th, .at-t td { padding: 18px 12px 18px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--rule-2); }
.at-t thead th { padding: 14px 12px 14px 0; font-size: 13px; font-weight: 400; color: var(--ink-mute); letter-spacing: 0; }
.at-t thead th:nth-child(n+2) { width: 27%; }
.at-t thead th.is-plan { color: var(--ink); font-weight: 500; box-shadow: inset 0 2px 0 var(--ink); }
.at-t tbody th { font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.at-t td { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.at-t td svg { display: inline-block; width: 15px; height: 15px; margin-right: 7px; vertical-align: -2px; }
.at-t td.is-plan { font-weight: 500; }
.at-t .is-no { color: var(--ink-mute); }
.js .at-t tbody .is-plan { opacity: 0; transition: opacity .7s var(--ease); }
.js .at-t.is-on tbody .is-plan { opacity: 1; }
.js .at-t.is-on tbody tr:nth-child(2) .is-plan { transition-delay: .12s; }
.js .at-t.is-on tbody tr:nth-child(3) .is-plan { transition-delay: .24s; }

@media (min-width: 900px) {
  .at-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
  .at-h { grid-column: 1 / span 5; }
  .at-t { grid-column: 7 / span 6; margin-top: .35em; }
  .at-t th, .at-t td { padding: 22px 16px 22px 0; }
  .at-t thead th:nth-child(n+2) { width: 24%; }
  .at-t td { font-size: 16px; }
}

/* ---------- 5. invites for members: the members' code ---------- */
.ai { background: var(--paper-2); padding: var(--sec) 0; }
.ai-rules { margin-top: clamp(40px, 5vw, 80px); border-top: 1px solid var(--ink); }
.ai-rules li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.ai-rules li.is-last { border-bottom-color: var(--ink); }
.ai-n { font-size: 13px; color: var(--ink-mute); letter-spacing: 0; }
.ai-rules p { font-size: clamp(24px, 3.2vw, 48px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; text-wrap: balance; }
@media (min-width: 900px) {
  .ai-h { max-width: 14ch; }
  .ai-rules li { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding: 26px 0 28px; }
  .ai-n { grid-column: 1; font-size: 14px; }
  .ai-rules p { grid-column: 2 / span 11; }
}

/* ---------- 6. questions, collapsed ---------- */
.aq { padding: var(--sec) 0; }
.aq-list { margin-top: 36px; border-top: 1px solid var(--ink); }
.aq details { border-bottom: 1px solid var(--rule); }
.aq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 19px 0; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; line-height: 1.3; letter-spacing: -.015em;
  transition: color .2s var(--ease);
}
.aq summary::-webkit-details-marker { display: none; }
.aq summary::after {
  content: ""; flex: none; width: 13px; height: 13px; transition: transform .35s var(--ease);
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
}
.aq details[open] summary::after { transform: rotate(45deg); }
.aq summary:hover { color: var(--ink-soft); }
.aq summary:focus-visible { outline-offset: 2px; }
.aq details p { max-width: 56ch; padding: 0 40px 22px 0; color: var(--ink-soft); }
.js .aq details[open] p { animation: aq-in .5s var(--ease); }
@keyframes aq-in { from { opacity: 0; transform: translateY(-4px); } }
.aq details a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (min-width: 900px) {
  .aq-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
  .aq-h { grid-column: 1 / span 4; position: sticky; top: calc(var(--hdr) + 40px); }
  .aq-list { grid-column: 6 / span 7; margin-top: .35em; }
  .aq summary { padding: 22px 0; }
  .aq details p { padding-bottom: 26px; }
}

/* ---------- 7. closing: the page's one brand line ---------- */
.ac { padding: var(--sec) 0; border-top: 1px solid var(--rule); }
.ac-in { display: grid; gap: 32px; }
.ac-h { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 84px); line-height: .98; letter-spacing: -.014em; }
.ac-h span { display: block; }
.ac-cta { justify-self: start; }
@media (min-width: 900px) {
  .ac-in { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .ac-h { grid-column: 1 / span 8; }
  .ac-cta { grid-column: 10 / span 3; justify-self: end; padding-bottom: .4em; }
}

/* reduced motion: everything in its final state */
.rm .ao-l, .rm .ao-rec, .rm .ao-sub, .rm .at-t tbody .is-plan { opacity: 1 !important; transform: none !important; transition: none !important; }
.rm .ap-span i { transform: none !important; transition: none !important; }
.rm .aq details[open] p { animation: none; }
