@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Instrument+Sans:wght@400;500;600&display=swap");

/*
  Sunset Sessions — member profile.

  The page is built like a line-up on a bill rather than a grid of identical
  cards: the person's name leads, their roles are rule-separated rows set in
  large display type, and the sunset gradient is spent once per screen on the
  single action that matters.
*/

:root{
  --ink:#070B16;        /* page */
  --night:#0C1224;      /* raised surface */
  --dusk:#161E38;       /* field */
  --sand:#F6F0E7;       /* primary text  17.4:1 */
  --mist:#C4CDE2;       /* secondary text 11.4:1 */
  --dim:#A9B6D0;        /* secondary text 9.6:1 on page, 8.1:1 on fields */
  --gold:#FFB324;
  --amber:#FF8A1F;
  --coral:#FF5C39;
  --rule:rgba(129,144,178,.26);
  --rule-strong:rgba(129,144,178,.45);

  --display:"Archivo","Helvetica Neue",Arial,sans-serif;
  --body:"Instrument Sans","Helvetica Neue",Arial,sans-serif;

  --gutter:clamp(1rem,5vw,3.5rem);
  --measure:62ch;
}

*,*::before,*::after{box-sizing:border-box}

/* Someone who has turned up contrast on their device gets the strongest set. */
@media (prefers-contrast:more){
  :root{
    --dim:#D4DCEC;
    --mist:#EDF1F8;
    --rule:rgba(196,205,226,.45);
    --rule-strong:rgba(196,205,226,.7);
  }
}

html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  background:var(--ink);
  color:var(--sand);
  font-family:var(--body);
  font-size:1.125rem;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

/* The sunset sits behind the top of the page and stops there. */
body::before{
  content:"";
  position:fixed;
  inset:0 0 auto 0;
  height:min(70vh,640px);
  background:
    radial-gradient(90% 100% at 78% 0%, rgba(255,138,31,.20) 0%, rgba(255,92,57,.09) 45%, transparent 72%);
  pointer-events:none;
  z-index:0;
}
body > *{position:relative;z-index:1}

::selection{background:var(--gold);color:var(--ink)}

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

h1,h2,h3{
  font-family:var(--display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-.025em;
  margin:0;
  text-wrap:balance;
}
h1{font-size:clamp(2.6rem,1.6rem + 4.2vw,4.5rem)}
h2{font-size:clamp(1.7rem,1.3rem + 1.8vw,2.5rem);letter-spacing:-.02em}
h3{font-size:1.25rem;font-weight:700;letter-spacing:-.01em}

p{margin:0 0 1rem;max-width:var(--measure)}
a{color:inherit}

.lede{color:var(--mist);font-size:1.125rem;line-height:1.6}
.note{color:var(--dim);font-size:1rem;line-height:1.55}

/* ---------------------------------------------------------------- header */

.masthead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem var(--gutter);
  border-bottom:1px solid var(--rule);
  background:rgba(7,11,22,.9);
  backdrop-filter:blur(16px);
  position:sticky;
  top:0;
  z-index:20;
}

.brand{
  display:flex;
  align-items:center;
  gap:.6rem;
  text-decoration:none;
  color:var(--sand);
}
.brand img{height:30px;width:auto;display:block}
.brand span{
  font-family:var(--display);
  font-weight:850;
  font-size:.9375rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  white-space:nowrap;
}
@media (max-width:420px){ .brand span{display:none} }

.menu{display:flex;align-items:center;gap:.25rem;flex-wrap:nowrap}
.menu a,.menu button{white-space:nowrap}

/* Narrow phones: the brand takes its own line so the menu never wraps. */
@media (max-width:560px){
  .masthead{
    flex-direction:column;
    align-items:stretch;
    gap:.6rem;
    padding:.75rem var(--gutter) .5rem;
  }
  /* Staff see a fourth item, so let the row scroll rather than clip it. The
     fade on the right says "there is more" instead of looking chopped off. */
  .menu{
    gap:0;
    margin-inline:-.35rem;
    padding-right:1.25rem;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    mask-image:linear-gradient(to right,#000 calc(100% - 2rem),transparent);
  }
  .menu::-webkit-scrollbar{display:none}
  .menu a,.menu button{padding:.4rem .5rem;font-size:.9375rem;flex:none}
  .menu [aria-current="page"]::after{left:.5rem;right:.5rem}
}
.menu a,.menu button{
  font:inherit;
  font-size:.9375rem;
  font-weight:500;
  color:var(--mist);
  background:none;
  border:0;
  padding:.5rem .7rem;
  border-radius:8px;
  cursor:pointer;
  text-decoration:none;
  position:relative;
}
@media (hover:hover){
  .menu a:hover,.menu button:hover{color:var(--sand);background:rgba(129,144,178,.1)}
}
.menu [aria-current="page"]{color:var(--gold)}
.menu [aria-current="page"]::after{
  content:"";
  position:absolute;
  left:.7rem;right:.7rem;bottom:.25rem;
  height:2px;
  background:var(--gold);
  border-radius:2px;
}
.menu .leave{color:var(--dim)}

/* ------------------------------------------------------------------ page */

main{
  flex:1;
  width:100%;
  max-width:68rem;
  margin-inline:auto;
  padding:clamp(2rem,5vw,3.5rem) var(--gutter) 5rem;
}

.pagefoot{
  padding:1.5rem var(--gutter) 2.5rem;
  border-top:1px solid var(--rule);
  color:var(--dim);
  font-size:.9375rem;
}

.stack > * + *{margin-top:2.75rem}

/* Identity block: the name leads, everything else defers to it. */
.identity h1{margin-bottom:.4rem}
.identity .lede{max-width:46ch}
.identity-photo{
  width:7rem;height:7rem;
  display:grid;place-items:center;
  overflow:hidden;
  border-radius:50%;
  border:1px solid var(--rule-strong);
  background:var(--dusk);
  color:var(--gold);
  font-size:3rem;
  margin-bottom:1.25rem;
}
.identity-photo img{width:100%;height:100%;object-fit:cover}
.media-section{border-top:1px solid var(--rule);padding-top:2rem}
.media-section .note{max-width:50rem}
.photo-controls{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(19rem,1fr));
  gap:1.25rem 2rem;
  margin:1.25rem 0 .75rem;
}
.photo-slot{display:flex;gap:1.1rem;align-items:flex-start;min-width:0}
.photo-slot-text{min-width:0;flex:1}
.photo-slot h3{font-size:1.1rem;margin-bottom:.15rem}

/* The current photo is the control. Seeing it is how you know it is set. */
.photo-preview{
  flex:none;
  width:5.5rem;height:5.5rem;
  display:grid;place-items:center;
  overflow:hidden;
  border-radius:50%;
  border:1px dashed var(--rule-strong);
  background:var(--dusk);
  color:var(--dim);
  font-size:1.6rem;
}
.photo-preview.filled{border-style:solid;border-color:var(--gold)}
.photo-preview img{width:100%;height:100%;object-fit:cover}
.photo-preview.count{border-radius:16px;flex-direction:column;gap:0;line-height:1.1}
.photo-preview.count strong{
  font-family:var(--display);font-size:1.9rem;font-weight:800;
  color:var(--sand);font-variant-numeric:tabular-nums;
}
.photo-preview.count span{font-size:.9375rem;color:var(--dim)}

.photo-state{margin:0 0 .7rem;font-size:1rem;color:var(--dim)}
.photo-state.on{color:var(--mist)}
.photo-state.on::before{
  content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--gold);margin-right:.5rem;vertical-align:.1em;
}

.photo-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
/* The native control is kept for keyboard and screen readers; the label is
   what people see and click. */
.file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.photo-actions label{cursor:pointer;margin:0}
.file-input:focus-visible + label{outline:2px solid var(--gold);outline-offset:3px}
.file-input:disabled + label,.alt.off{opacity:.5;cursor:not-allowed}
.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:1.5rem;margin-top:1.5rem}
.photo-tile{
  min-width:0;margin:0;
  border:1px solid var(--rule);border-radius:16px;
  padding:.75rem;background:rgba(12,18,36,.5);
}
.photo-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;background:var(--dusk)}
.photo-tile label{display:block;margin:.8rem 0 0;color:var(--dim);font-size:1rem}
.photo-tile input{font-size:1rem;margin-top:.3rem}
.tile-actions{display:flex;gap:.9rem;align-items:center;margin-top:.5rem}
.tile-actions .plain{font-size:1rem;padding:.35rem 0}
.media-editor{margin:1.25rem 0;padding:1.25rem;border:1px solid var(--rule-strong);border-radius:16px;background:var(--dusk)}
.media-editor[hidden]{display:none}
.media-editor canvas{display:block;width:min(100%,480px);height:auto;border-radius:12px;background:var(--ink)}
.editor-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.75rem 1.25rem;margin-top:1rem;max-width:48rem}
.editor-controls label{display:block;color:var(--sand)}
.editor-controls input[type=range]{display:block;width:100%;accent-color:var(--gold);min-height:2.75rem}
.checklist{list-style:none;padding:0;margin:0;max-width:48rem}
.checklist li{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:.85rem 0;border-bottom:1px solid var(--rule)}
.checklist small{display:block;color:var(--dim);font-size:.9375rem;margin-left:1.15rem}
.checklist a{color:var(--gold)}

/* Details as a proper description list — no meta strings joined by dots. */
.facts{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));
  gap:1.25rem 2rem;
  margin:0;
  padding:1.6rem 0 0;
  border-top:1px solid var(--rule);
}
/* Wider columns once there is room, so an email address fits on one line. */
@media (min-width:700px){
  .facts{grid-template-columns:repeat(auto-fit,minmax(12.5rem,1fr))}
}
/* There are five facts. Auto-fit settles on four and strands the last one on a
   row of its own, so past this width ask for five explicitly. */
@media (min-width:46rem){
  /* Three facts of unequal length: an email needs more room than a city, so
     the columns are weighted rather than equal. Scoped to the profile header,
     since the dashboard reuses .facts with a different set. */
  .identity .facts{grid-template-columns:1.5fr 1fr 1.1fr;gap:1.25rem 2rem}
  /* The two permissions sit together, not stretched across the page. */
  .facts.permissions{grid-template-columns:repeat(2,minmax(0,16rem));gap:1.25rem 2.5rem}
}
.facts > div{min-width:0}
.facts dt{
  color:var(--dim);
  font-size:.9375rem;
  font-weight:500;
  margin-bottom:.2rem;
}
.facts dd{
  margin:0;
  font-size:1.125rem;
  overflow-wrap:anywhere;
}
.facts dd.unset{color:var(--dim)}

.sectionhead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:.25rem;
}
.sectionhead .note{margin:0}

/* ------------------------------------------------------------- the line-up */

.lineup{border-top:1px solid var(--rule-strong)}

.act{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:.5rem 1.5rem;
  padding:1.4rem 0;
  border-bottom:1px solid var(--rule);
}
.act-name{
  font-family:var(--display);
  font-size:clamp(1.4rem,1.1rem + 1vw,1.9rem);
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.05;
}
.act-note{color:var(--dim);font-size:1rem;margin:.25rem 0 0}
.act-tools{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}

.state{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-size:.9375rem;
  color:var(--mist);
  margin-bottom:.35rem;
}
.state::before{
  content:"";
  width:7px;height:7px;
  border-radius:50%;
  background:var(--gold);
}
.state.off{color:var(--dim)}
.state.off::before{background:var(--dim)}

@media (max-width:640px){
  .act{grid-template-columns:1fr;gap:.9rem}
  .act-tools{justify-content:flex-start}
}

/* Choosing a role: a list of openings, not a grid of boxes. */
.openings{display:grid;gap:0;border-top:1px solid var(--rule-strong)}
.opening{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:.3rem 1rem;
  width:100%;
  text-align:left;
  background:none;
  border:0;
  border-bottom:1px solid var(--rule);
  padding:1.25rem .25rem;
  color:var(--sand);
  cursor:pointer;
  font:inherit;
  transition:padding-left .15s ease,background-color .15s ease;
}
@media (hover:hover){
  .opening:hover{background:rgba(129,144,178,.06);padding-left:.85rem}
}
.opening:active{background:rgba(255,179,36,.08)}
.opening strong{
  display:block;
  font-family:var(--display);
  font-size:1.35rem;
  font-weight:800;
  letter-spacing:-.02em;
}
.opening span{color:var(--dim);font-size:1rem;grid-column:1}
.opening em{
  grid-row:1 / span 2;
  grid-column:2;
  font-style:normal;
  font-size:.9375rem;
  color:var(--gold);
  white-space:nowrap;
  justify-self:end;
}

/* A tappable row needs to look tappable on a phone, where there is no hover. */
.opening::after{
  content:"";
  grid-row:1 / span 2;
  grid-column:3;
  width:8px;height:8px;
  border-right:1.5px solid var(--dim);
  border-top:1.5px solid var(--dim);
  transform:rotate(45deg);
  align-self:center;
  margin-left:.9rem;
}
.openings .opening{grid-template-columns:1fr auto auto}
@media (prefers-reduced-motion:reduce){
  .opening{transition:none}
  .opening:hover{padding-left:.25rem}
}

/* --------------------------------------------------------------- controls */

.actions{display:flex;gap:.7rem;flex-wrap:wrap;align-items:center;margin-top:1.75rem}

button{font:inherit;cursor:pointer}

/* The pill shape belongs to the three button styles, not to every <button>:
   list rows are buttons too, and a pill radius curves their dividers. */
.go,.alt,.plain{
  border-radius:999px;
  transition:filter .15s ease,border-color .15s ease,color .15s ease;
}
@media (prefers-reduced-motion:reduce){ .go,.alt,.plain{transition:none} }

/* The gradient is spent here and nowhere else. */
.go{
  background:linear-gradient(97deg,var(--gold),var(--coral));
  color:#1A0D02;
  border:0;
  padding:.8rem 1.5rem;
  font-weight:650;
  text-decoration:none;
  display:inline-block;
}
@media (hover:hover){ .go:hover{filter:brightness(1.07)} }
.go:active{filter:brightness(.95)}

.alt{
  background:transparent;
  color:var(--sand);
  border:1px solid var(--rule-strong);
  padding:.8rem 1.4rem;
  font-weight:500;
  text-decoration:none;
  display:inline-block;
}
@media (hover:hover){ .alt:hover{border-color:var(--gold);color:var(--gold)} }
.alt:active{border-color:var(--gold);color:var(--gold)}

.plain{
  background:none;border:0;
  color:var(--mist);
  padding:.55rem .3rem;
  border-radius:6px;
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-thickness:1px;
  text-decoration-color:var(--rule-strong);
}
@media (hover:hover){
  .plain:hover{color:var(--gold);text-decoration-color:currentColor}
  .plain.warn:hover{color:var(--coral)}
}
.plain:active{color:var(--gold)}

/* ------------------------------------------------------------------ forms */

.workspace{display:grid;grid-template-columns:14rem minmax(0,1fr);gap:3.5rem}
/* Grid children default to min-width:auto, which lets the scrolling step list
   push the whole page wider than the screen. */
.workspace > *{min-width:0}
@media (max-width:900px){ .workspace{grid-template-columns:1fr;gap:1.75rem} }

.progress{position:sticky;top:5.5rem;align-self:start}
@media (max-width:900px){ .progress{position:static} }

.progress ol{list-style:none;margin:0 0 1.25rem;padding:0;counter-reset:s}
.progress li{
  display:flex;
  gap:.7rem;
  align-items:baseline;
  padding:.45rem 0;
  color:var(--dim);
  font-size:.9375rem;
  counter-increment:s;
}
.progress li::before{
  content:counter(s);
  font-variant-numeric:tabular-nums;
  font-size:.9375rem;
  color:var(--dim);
  min-width:1.1rem;
}
.progress li.done{color:var(--mist)}
.progress li.done::before{content:"✓";color:var(--gold)}
.progress li.here{color:var(--sand);font-weight:600}
.progress li.here::before{color:var(--gold)}
@media (max-width:900px){
  .progress ol{display:flex;gap:.9rem;overflow-x:auto;padding-bottom:.5rem;margin-bottom:.75rem}
  .progress li{white-space:nowrap}
  .progress .note{display:none}
}

.meter{height:3px;background:var(--dusk);border-radius:99px;overflow:hidden;margin:1.25rem 0 2rem}
.meter i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--coral));transition:width .35s ease}
@media (prefers-reduced-motion:reduce){ .meter i{transition:none} }

.step{color:var(--dim);font-size:1rem;margin:0 0 .5rem}

.field{margin-bottom:1.75rem;max-width:34rem}
.field > label,.field legend{
  display:block;
  font-size:1rem;
  font-weight:600;
  margin-bottom:.1rem;
  color:var(--sand);
  padding:0;
}
.field .optional{
  display:block;
  font-size:.9375rem;
  font-weight:400;
  color:var(--dim);
  margin-bottom:.55rem;
}
.field .helper{color:var(--dim);font-size:1rem;margin:.45rem 0 0;line-height:1.5}

input[type=text],input[type=tel],input[type=email],input[type=number],select,textarea{
  width:100%;
  font:inherit;
  color:var(--sand);
  background:var(--dusk);
  border:1px solid var(--rule-strong);
  border-radius:12px;
  padding:.8rem .95rem;
  margin-top:.4rem;
}
input::placeholder{color:var(--dim)}
input[readonly]{
  color:var(--mist);
  background:rgba(22,30,56,.5);
  border-style:dashed;
  cursor:default;
}
@media (hover:hover){ input:hover,select:hover,textarea:hover{border-color:var(--dim)} }
input:focus,select:focus,textarea:focus{border-color:var(--gold);outline:none;box-shadow:0 0 0 3px rgba(255,179,36,.16)}

/* A real dropdown arrow, since the native one is invisible on dark. */
select{
  appearance:none;
  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.5 6 6.5l5-5' stroke='%238190B2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 1rem center;
  background-size:12px;
  padding-right:2.6rem;
}
select option{background:var(--night);color:var(--sand)}

fieldset{border:0;padding:0;margin:0;min-width:0}

/* Short options pair up even on a phone — nine full-width rows for one
   question is a lot of thumb. */
.choices{display:grid;gap:.5rem;grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr));margin-top:.5rem}
.choice{
  display:flex;
  gap:.65rem;
  align-items:center;
  font-weight:400;
  margin:0;
  background:var(--dusk);
  border:1px solid var(--rule-strong);
  border-radius:12px;
  padding:.75rem .85rem;
  cursor:pointer;
  font-size:1rem;
  line-height:1.3;
  min-height:3.25rem;
}
@media (hover:hover){ .choice:hover{border-color:var(--dim)} }
.choice:has(input:checked){border-color:var(--gold);background:rgba(255,179,36,.08)}

/* The native control is a solid white block on this background, which shouts
   louder than the words. This keeps the real input — and its keyboard
   behaviour — and only redraws the box. */
.choice input{
  appearance:none;
  width:1.2rem;height:1.2rem;
  margin:0;
  flex:none;
  border:1.5px solid var(--dim);
  border-radius:5px;
  background:transparent;
  display:grid;
  place-content:center;
  cursor:pointer;
}
.choice input[type=radio]{border-radius:50%}
.choice input::before{
  content:"";
  width:.6rem;height:.6rem;
  transform:scale(0);
  background:var(--ink);
  clip-path:polygon(14% 44%,0 60%,40% 100%,100% 22%,84% 6%,38% 66%);
}
.choice input[type=radio]::before{clip-path:circle(50%);width:.5rem;height:.5rem}
.choice input:checked{background:var(--gold);border-color:var(--gold)}
.choice input:checked::before{transform:scale(1)}

[aria-invalid="true"]{border-color:#FF8E70 !important}
.choices[aria-invalid="true"] .choice{border-color:rgba(255,142,112,.6)}

.problem{
  color:#FF8E70;
  font-size:.9375rem;
  margin-top:.75rem;
  min-height:1.4em;
}
.problem:not(:empty)::before{content:"⚠ ";}

.heads-up{
  border:1px solid rgba(255,179,36,.4);
  background:rgba(255,179,36,.07);
  border-radius:14px;
  padding:1rem 1.15rem;
  margin-bottom:1.75rem;
  font-size:.9375rem;
  color:var(--mist);
  max-width:34rem;
}
.heads-up strong{color:var(--sand)}

/* ----------------------------------------------------------------- review */

.recap{margin-bottom:2.25rem}
.recap h3{margin-bottom:.9rem;padding-bottom:.5rem;border-bottom:1px solid var(--rule)}
.recap dl{
  margin:0 0 .85rem;
  display:grid;
  grid-template-columns:minmax(0,20ch) minmax(0,1fr);
  gap:.55rem 1.5rem;
  font-size:1rem;
}
@media (max-width:620px){
  .recap dl{grid-template-columns:1fr;gap:.1rem}
  .recap dt{margin-top:.85rem}
}
.recap dt{color:var(--dim);font-size:1rem}
.recap dd{margin:0;overflow-wrap:anywhere}
.recap dd.unset{color:var(--dim)}

/* ------------------------------------------------------------- gate pages */

body.gate main{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:70vh;
  max-width:46rem;
}
body.gate h1{margin-bottom:1rem}
/* align-self matters: the gate's flex column would otherwise stretch the mark
   to the full width and squash it. */
.gate .mark{height:56px;width:auto;align-self:flex-start;margin-bottom:1.75rem}

/* A heading focused only to move screen-reader position should not draw a
   focus ring, since the person did not tab to it. */
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus{outline:none}
