/* STARS NETWORK · the four pages (/campaign, /apply, /about, /contact)
   Same world as the homepage: bone type on ink, the serif for the human
   voice, Archivo for labels, the 3D stage fixed behind the copy. The copy
   owns the left column on a wide screen; the stage has the right. */

/* ------------------------------------------------------------------ stage */
.pg #gl { opacity: 0; transition: opacity .9s linear; }
.pg #gl.is-live { opacity: 1; }
/* the nav is already there when a page arrives: it is the one thing that
   stays put across the page change (view-transition-name: nav) */
.js body.pg .nav { opacity: 1; transition: transform .5s var(--ease-out); }

.pg-main { position: relative; z-index: 2; }
/* hidden means hidden, whatever display a component sets (the sent form, the
   confirmation before it is earned, a cleared error) */
.pg [hidden] { display: none !important; }
.beat {
  position: relative; display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh; padding: calc(var(--nav-h) + 24px) var(--pad) 72px;
}
.beat--hero { min-height: 100vh; min-height: 100svh; }
.beat--tall { min-height: 118vh; min-height: 118svh; }
.beat--form { align-items: flex-start; min-height: auto; padding-bottom: 120px; }
.pg-copy { position: relative; width: min(600px, 100%); }
.pg-copy--wide { width: min(1120px, 100%); }
/* a soft pool of ink behind the copy, so it reads over any part of the stage */
.pg-copy::before {
  content: ''; position: absolute; inset: -18% -30% -18% -42%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(8, 8, 10, .8), rgba(8, 8, 10, .5) 58%, rgba(8, 8, 10, 0));
}
.pg-copy--wide::before, .pg-copy--plain::before { display: none; }

/* ------------------------------------------------------------------- type */
.pg-kicker {
  display: flex; align-items: center; gap: 14px; margin: 0 0 26px;
  font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--bone-dim);
}
.pg-kicker::after { content: ''; width: 56px; height: 1px; background: var(--line); }
.pg-h1 { font-size: clamp(46px, 5.9vw, 104px); line-height: .94; letter-spacing: -0.018em; max-width: 11ch; }
.pg-h1 .line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.pg-h1 .line > span { display: block; }
.pg-h1--long { max-width: none; font-size: clamp(44px, 5.2vw, 92px); }
.pg-copy:has(.pg-h1--long) { width: min(640px, 100%); }
.pg-h2 { font-size: clamp(36px, 4.1vw, 72px); line-height: .97; letter-spacing: -0.016em; max-width: 12ch; }
.pg-h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 1.75vw, 30px); line-height: 1.12; margin: 0; letter-spacing: -0.008em; }
.pg-lead {
  margin: 28px 0 0; max-width: 30ch;
  font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 1.55vw, 27px); line-height: 1.3; color: var(--bone);
}
.pg-body { font-size: clamp(15px, 1.06vw, 17px); line-height: 1.64; color: var(--bone-dim); max-width: 44ch; margin: 22px 0 0; }
.pg-body + .pg-body { margin-top: 14px; }
.pg-small { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 18px 0 0; max-width: 46ch; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* an underlined text link with an arrow, for the quieter routes */
.arrow-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 44px;
  font-size: 15px; color: var(--bone); border-bottom: 1px solid var(--line);
  transition: border-color .16s ease;
}
.arrow-link svg { width: 14px; height: 10px; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .arrow-link:hover { border-color: var(--bone); }
  .arrow-link:hover svg { transform: translateX(3px); }
}
/* the storyboard's round arrow button */
.round-link {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-top: 18px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--bone);
  transition: border-color .16s ease, background-color .16s ease, transform .12s var(--ease-out);
}
.round-link svg { width: 14px; height: 10px; }
.round-link:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .round-link:hover { border-color: var(--bone); background: rgba(236, 230, 216, .08); } }

/* ------------------------------------------------- numbered rows (Kage) */
/* a step, a criterion or a benefit: number, heading, one or two lines */
.rows { list-style: none; margin: 40px 0 0; padding: 0; max-width: 620px; border-top: 1px solid var(--line-soft); counter-reset: row; }
.row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 18px; padding: 22px 0 24px; border-bottom: 1px solid var(--line-soft); }
.row__n { font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--bone-dim); padding-top: 9px; font-variant-numeric: tabular-nums; }
.row__d { grid-column: 2; margin: 8px 0 0; font-size: 15px; line-height: 1.62; color: var(--bone-dim); max-width: 46ch; }

/* a step section of its own: the big numeral carries the sequence */
.step__n {
  display: block; margin: 0 0 18px; font-family: var(--serif); font-size: clamp(64px, 7vw, 118px); line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(236, 230, 216, .5); font-variant-numeric: lining-nums;
}

/* ------------------------------------------------------------ two columns */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; margin-top: 52px; max-width: 780px; }
.col .pg-h3 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.col p { margin: 14px 0 0; font-size: 15px; line-height: 1.62; color: var(--bone-dim); max-width: 34ch; }

/* ------------------------------------------------------------------ team */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 34px); margin: 48px 0 0; padding: 0; list-style: none; max-width: 1120px; }
.member { position: relative; margin: 0; }
.member__pic { position: relative; display: block; }
.member__pic img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
/* a strip of blue tape across one corner, as on the storyboard */
.member__pic::before {
  content: ''; position: absolute; z-index: 1; left: -6%; top: -3%; width: 38%; height: 12%;
  background: rgba(34, 72, 196, .78); transform: rotate(-9deg); mix-blend-mode: normal;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.member:nth-child(2n) .member__pic::before { left: auto; right: -5%; top: auto; bottom: 6%; transform: rotate(-12deg); }
.member:nth-child(3) .member__pic::before { transform: rotate(7deg); }
.member__name { margin: 16px 0 0; font-family: var(--serif); font-size: clamp(19px, 1.4vw, 23px); line-height: 1.2; }
.member__role { margin: 6px 0 0; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); }
/* until the names arrive: a visibly unfinished slot, not a fake name */
.member__name.is-pending { color: var(--muted); }
.member__name.is-pending::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border: 1px dashed var(--muted); border-radius: 50%; vertical-align: middle; }
.member__role.is-pending { color: var(--muted); }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 22px; margin: 40px 0 0; max-width: 580px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 9px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); padding: 0; }
.field__label small { font-size: inherit; font-weight: 500; letter-spacing: .14em; color: var(--muted); text-transform: none; }
.field__hint { margin: -2px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.field__input {
  width: 100%; min-height: 50px; margin: 0; padding: 13px 15px; border-radius: 0;
  font: inherit; font-size: 16px; line-height: 1.4; color: var(--bone);
  background: rgba(8, 8, 10, .66); border: 1px solid var(--line);
  transition: border-color .16s ease, background-color .16s ease;
  -webkit-appearance: none; appearance: none;
}
.field__input::placeholder { color: rgba(236, 230, 216, .5); opacity: 1; }
textarea.field__input { min-height: 150px; resize: vertical; }
select.field__input {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ece6d8' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
select.field__input:invalid { color: rgba(236, 230, 216, .5); }
select.field__input option { color: var(--bone); background: #121216; }
input[type="date"].field__input { color-scheme: dark; }
input[type="date"].field__input::-webkit-calendar-picker-indicator { filter: invert(.9) sepia(.15); opacity: .8; cursor: pointer; }
.field__input:disabled { opacity: .45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .field__input:hover:not(:disabled) { border-color: rgba(236, 230, 216, .4); } }
.field__input:focus { outline: none; border-color: var(--bone); background-color: rgba(8, 8, 10, .82); }
.field__input:focus-visible { outline: 1px solid var(--bone); outline-offset: 3px; }
/* an error is read without colour: the frame goes solid bone, and the note
   below says what to change */
.field.is-bad .field__input { border-color: var(--bone); background-color: rgba(236, 230, 216, .05); }
.field__error { display: flex; gap: 9px; align-items: flex-start; margin: 1px 0 0; font-size: 13px; line-height: 1.45; color: var(--bone); }
.field__error::before {
  content: ''; flex: none; width: 15px; height: 15px; margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7.2' fill='none' stroke='%23ece6d8' stroke-width='1.1'/%3E%3Cpath d='M8 4.2v5' stroke='%23ece6d8' stroke-width='1.3'/%3E%3Ccircle cx='8' cy='11.6' r='.9' fill='%23ece6d8'/%3E%3C/svg%3E") no-repeat center / contain;
}
.field__error[hidden] { display: none; }
.field__pair { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.field__pair .field__input { flex: 1 1 200px; width: auto; }
/* the "Not sure yet" tick box */
.check { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; color: var(--bone); cursor: pointer; -webkit-user-select: none; user-select: none; }
.check input {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--line); background: rgba(8, 8, 10, .66);
  display: grid; place-items: center; cursor: pointer; transition: border-color .16s ease, background-color .16s ease;
}
.check input::after {
  content: ''; width: 11px; height: 8px; opacity: 0; transform: scale(.8); transition: opacity .12s ease, transform .16s var(--ease-out);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5l3.3 3.2L11 1' fill='none' stroke='%2308080a' stroke-width='1.7'/%3E%3C/svg%3E") no-repeat center / contain;
}
.check input:checked { background: var(--bone); border-color: var(--bone); }
.check input:checked::after { opacity: 1; transform: none; }
.check input:focus-visible { outline: 1px solid var(--bone); outline-offset: 3px; }
/* spam trap: out of sight, out of the tab order */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: grid; gap: 14px; margin-top: 6px; }
.cta--wide { width: 100%; height: 54px; justify-content: center; gap: 16px; font-size: 10px; }
.cta__spin { display: none; width: 14px; height: 14px; border: 1.2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.form.is-busy .cta__spin { display: block; }
.form.is-busy .cta--wide svg { display: none; }
.form.is-busy .cta--wide { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__note { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.form__note a { color: var(--bone-dim); border-bottom: 1px solid var(--line); }
.form__status { margin: 0; min-height: 1.4em; font-size: 13px; color: var(--bone-dim); }
.form__alert { margin: 0; padding: 15px 17px; border: 1px solid var(--bone); background: rgba(236, 230, 216, .06); font-size: 14px; line-height: 1.55; color: var(--bone); }
.form__alert[hidden] { display: none; }

/* ----------------------------------------------------- the confirmation */
.done { max-width: 560px; margin-top: 12px; outline: none; }
.done[hidden] { display: none; }
.done__mark { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 0 30px; border: 1px solid var(--bone); border-radius: 50%; }
.done__mark svg { width: 34px; height: 26px; overflow: visible; }
.done__mark path { stroke-dasharray: 48; stroke-dashoffset: 48; }
.done:not([hidden]) .done__mark path { animation: tick .7s var(--ease-out) .25s forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.done h2:focus { outline: none; }
.done .pg-actions { margin-top: 32px; }
.done__socials { margin-top: 26px; }
/* once sent, the confirmation takes the form's place and its heading, and
   gets a full screen of its own like every other section */
.is-done > .pg-copy > :not(.done):not(.pg-kicker) { display: none; }
.beat--form.is-done { min-height: 100vh; min-height: 100svh; align-items: center; padding-bottom: 72px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 0; padding: 0; list-style: none; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 0 2px;
  font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bone);
  border-bottom: 1px solid var(--line); transition: border-color .16s ease;
}
.socials svg { width: 9px; height: 9px; }
@media (hover: hover) and (pointer: fine) { .socials a:hover { border-color: var(--bone); } }

/* contact details block */
.reach { display: grid; gap: 28px; margin-top: 44px; max-width: 520px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.reach__label { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); }
.reach__email { font-family: var(--serif); font-size: clamp(22px, 1.8vw, 30px); line-height: 1.2; border-bottom: 1px solid transparent; transition: border-color .16s ease; }
@media (hover: hover) and (pointer: fine) { .reach__email:hover { border-color: var(--line); } }
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; margin-top: 48px; max-width: 560px; }
.route { padding-left: 22px; border-left: 1px solid var(--line); }
.route p { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; line-height: 1.25; color: var(--bone); }

/* ----------------------------------------------------------------- footer */
.pg-foot {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center;
  padding: 26px var(--pad) calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.pg-foot a { transition: color .16s ease; }
@media (pointer: coarse) { .pg-foot { row-gap: 0; } .pg-foot > :not(.sep) { display: inline-flex; align-items: center; min-height: 44px; } }
@media (hover: hover) and (pointer: fine) { .pg-foot a:hover { color: var(--bone); } }
.pg-foot .sep { flex: 1 1 auto; }

/* ------------------------------------------------------------------ motion */
.js .pg-h1 .line > span { transform: translate3d(0, 108%, 0); }
.intro .pg-h1 .line > span { transform: none; transition: transform 1.05s var(--ease-out) calc(var(--i, 0) * 85ms + 160ms); }
@media (prefers-reduced-motion: reduce) {
  .js .pg-h1 .line > span { transform: none; opacity: 0; }
  .intro .pg-h1 .line > span { opacity: 1; transition: opacity .5s linear .1s; }
  .done:not([hidden]) .done__mark path { animation: none; stroke-dashoffset: 0; }
  .cta__spin { animation-duration: 2.4s; }
}

/* ----------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .beat { align-items: flex-end; padding: calc(var(--nav-h) + 16px) var(--pad) 64px; }
  /* the top of a phone's first screen is the stage's */
  .beat--hero { padding-top: calc(var(--nav-h) + 26svh); padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .beat--form { align-items: flex-start; }
  .beat--form.is-done { align-items: flex-end; }
  .pg-copy::before { inset: -12% -12% -10% -12%; background: radial-gradient(closest-side, rgba(8, 8, 10, .86), rgba(8, 8, 10, .62) 62%, rgba(8, 8, 10, 0)); }
  .pg-h1 { font-size: clamp(40px, 11.2vw, 56px); }
  .pg-h2 { font-size: clamp(32px, 8.6vw, 44px); }
  .pg-lead { font-size: 19px; margin-top: 20px; }
  .rows { margin-top: 30px; }
  .row { grid-template-columns: 40px minmax(0, 1fr); padding: 18px 0 20px; }
  .cols { grid-template-columns: 1fr; gap: 34px; margin-top: 40px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .form__row { grid-template-columns: 1fr; gap: 22px; }
  .routes { grid-template-columns: 1fr; gap: 20px; }
  .pg-actions .cta { flex: 1 1 100%; justify-content: space-between; }
  .step__n { font-size: 64px; margin-bottom: 12px; }
  .pg-foot { gap: 8px 18px; font-size: 9px; }
  .pg-foot .sep { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .beat { min-height: auto; padding-top: calc(var(--nav-h) + 12px); padding-bottom: 48px; }
  .pg-h1 { font-size: clamp(34px, 9vh, 52px); }
}
