/* 12 Butterflies, the door and the onboarding (21 Oct 2026). Built to the live 12butterflies.life page: white ground, Poppins,
   the slow wing film bleeding off the left edge, the wordmark, soft teal buttons and a teal band at the foot.
   Layout: two columns on a wide screen (the wing, then the questions); on a phone the wing becomes a band above the questions.
   One visual world, light only, as the live page is. */
:root {
  --paper: #FFFFFF;          /* the live page's ground */
  --mist: #F5F7F7;           /* fields and quiet panels, a white leaning to the teal */
  --ink: #111111;            /* the wordmark and body text */
  --muted: #5B6869;          /* secondary text, a grey with the teal in it */
  --line: #DCE6E7;
  --teal: #9FCAD1;           /* the live page's button and footer band */
  --teal-deep: #3F7F89;      /* focus rings and links, the same teal deepened to read on white */
  /* the four stages, each one of the mark's twelve hues */
  --egg: #EAC820; --caterpillar: #8CC63F; --chrysalis: #68A3D4; --butterfly: #C756C1;
  --hue: var(--teal);        /* set per stage by the script */
  --sans: "Poppins", "Helvetica Neue", Arial, system-ui, sans-serif;
  --t-xs: .75rem; --t-sm: .875rem; --t-base: 1rem; --t-md: 1.125rem; --t-lg: 1.5rem; --t-xl: 2rem; --t-2xl: 2.6rem;
  --wing-w: 44vw;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.at-door .bar .mark { visibility: hidden; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; border-radius: 4px; }

.frame { display: grid; grid-template-columns: var(--wing-w) 1fr; min-height: 100%; }

/* the wing film, as on the live page */
.wing { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--paper); isolation: isolate; }
.wing video, .wing .wing-still { position: absolute; inset: 0; width: 100%; height: 100%; }
.wing video { object-fit: cover; object-position: 6% 50%; opacity: 0; transition: opacity 1.6s ease; }
.wing video.on { opacity: 1; }
.wing .wing-still { z-index: -1;
  background:
    radial-gradient(60% 45% at 18% 30%, rgba(240,137,68,.55), transparent 70%),
    radial-gradient(50% 40% at 30% 70%, rgba(237,106,120,.45), transparent 70%),
    radial-gradient(40% 35% at 55% 45%, rgba(131,202,187,.45), transparent 70%),
    radial-gradient(30% 30% at 10% 85%, rgba(88,56,124,.35), transparent 70%); }

.side { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-block: 28px 0; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.mark img { width: 150px; height: auto; }

/* the four stages: a sequence, so they are drawn in order and fill with each stage's hue */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(56px, 92px)); gap: 6px; }
.stages li { display: grid; gap: 6px; }
.stages .seg { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.stages .seg::after { content: ""; position: absolute; inset: 0; width: var(--fill, 0%); background: var(--c); transition: width .5s ease; border-radius: 4px; }
.stages li[data-stage="egg"] { --c: var(--egg); }
.stages li[data-stage="caterpillar"] { --c: var(--caterpillar); }
.stages li[data-stage="chrysalis"] { --c: var(--chrysalis); }
.stages li[data-stage="butterfly"] { --c: var(--butterfly); }
.stages .lab { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stages li.now .lab { color: var(--ink); }

.screen { flex: 1; width: 100%; max-width: 640px; padding-block: 56px 64px;
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 22px; }
.screen > * { margin: 0; animation: rise .5s ease both; }
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }

.living { font-size: var(--t-base); max-width: 30em; }
.wordmark { width: min(340px, 80%); height: auto; }
.welcome { font-size: var(--t-base); }
h1, h2 { font-weight: 300; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--t-2xl); line-height: 1.15; }
h2 { font-size: var(--t-xl); line-height: 1.25; max-width: 22em; }
.lede { font-size: var(--t-md); color: var(--ink); max-width: 34em; }
.help { font-size: var(--t-sm); color: var(--muted); max-width: 36em; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--hue); flex: none; }
.count { font-variant-numeric: tabular-nums; }

/* the stage opening: the stage name large, July's line beneath it */
.opening .name { font-size: clamp(3rem, 7vw, 5.2rem); font-weight: 300; line-height: 1; letter-spacing: -.02em; }
.opening .name::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 18px; border-radius: 4px; background: var(--hue); }
.quote { font-style: italic; font-weight: 300; font-size: var(--t-md); max-width: 28em; }
.opening ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.opening li { padding-left: 22px; position: relative; }
.opening li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--hue); }

/* the four stages laid out on the door */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.journey li { display: grid; gap: 2px; padding-top: 12px; border-top: 3px solid var(--c); }
.journey b { font-weight: 500; }
.journey span { font-size: var(--t-sm); color: var(--muted); }

/* fields */
label.lbl { font-size: var(--t-sm); font-weight: 500; }
.field { display: grid; gap: 8px; }
input[type=text], input[type=email], input[type=tel], input[type=url], textarea {
  font: inherit; color: var(--ink); background: var(--mist); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; width: 100%; transition: border-color .2s, background .2s; }
input:focus, textarea:focus { outline: none; border-color: var(--teal-deep); background: var(--paper); }
textarea { min-height: 150px; resize: vertical; }
input.code { font-size: var(--t-lg); letter-spacing: .18em; text-transform: uppercase; max-width: 15ch; font-variant-numeric: tabular-nums; }

/* choices: the chips the live Typeform used, drawn as soft pills */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  font-size: var(--t-sm); transition: background .2s, border-color .2s, color .2s; }
.chip:hover span { border-color: var(--teal-deep); }
.chip input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
.chips.big { flex-direction: column; align-items: stretch; }
.chips.big .chip span { display: block; border-radius: 12px; padding: 14px 18px; font-size: var(--t-base); }
.chips.big .chip small { display: block; color: var(--muted); font-size: var(--t-sm); }

/* the 1 to 5 scale */
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.scale label { position: relative; display: grid; justify-items: center; gap: 8px; cursor: pointer; }
.scale input { position: absolute; opacity: 0; }
.scale .dot { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  font-variant-numeric: tabular-nums; transition: background .2s, border-color .2s, transform .2s; }
.scale label:hover .dot { border-color: var(--teal-deep); }
.scale input:checked + .dot { background: var(--hue); border-color: var(--hue); transform: scale(1.06); }
.scale input:focus-visible + .dot { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
.ends { display: flex; justify-content: space-between; max-width: 460px; font-size: var(--t-xs); color: var(--muted); letter-spacing: .04em; }

/* buttons: the live page's teal button */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.btn { font: inherit; font-size: var(--t-base); color: var(--ink); background: var(--teal); border: 0; border-radius: 10px;
  padding: 16px 22px; cursor: pointer; text-decoration: none; transition: filter .2s, transform .2s; }
.btn:hover { filter: brightness(.95); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; }
.link { font: inherit; font-size: var(--t-sm); background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.msg { font-size: var(--t-sm); min-height: 1.4em; }
.msg.bad { color: #A33A2B; }
.msg.good { color: var(--teal-deep); }
.hint { font-size: var(--t-xs); color: var(--muted); }

.panel { background: var(--mist); border-radius: 14px; padding: 20px 22px; display: grid; gap: 12px; }
.panel[hidden] { display: none; }

/* read-back before sending */
details.review { border-top: 1px solid var(--line); padding-top: 14px; }
details.review summary { cursor: pointer; font-weight: 500; }
details.review dl { margin: 14px 0 0; display: grid; gap: 4px 0; max-height: 46vh; overflow: auto; padding-right: 8px; }
details.review dt { font-size: var(--t-xs); color: var(--muted); margin-top: 10px; }
details.review dd { margin: 0; font-size: var(--t-sm); white-space: pre-wrap; overflow-wrap: anywhere; }

/* badges: July's names, earned at the end of each stage */
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--mist); font-size: var(--t-sm); }
.badge i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); display: block; }

/* the circle preview at the end: who brought you in, and the five invitations that will be yours */
.circle { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring .me, .ring .slot { position: absolute; border-radius: 50%; }
.ring .me { inset: 44px; background: var(--butterfly); }
.ring .slot { width: 22px; height: 22px; border: 1.5px dashed var(--teal-deep); background: var(--paper); }
.circle p { margin: 0; font-size: var(--t-sm); }

.foot { background: var(--teal); padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px));
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px));
  font-size: var(--t-xs); letter-spacing: .02em; }

/* phones: the wing becomes a band across the top, as the live page stacks */
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; }
  .wing { position: relative; height: 30vh; min-height: 190px; }
  .wing video { object-position: 0% 50%; }
  .bar { padding-block: 20px 0; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .screen { padding-block: 28px 48px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); gap: 18px; }
  .foot { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 2rem; } h2 { font-size: 1.55rem; }
  .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .journey { grid-template-columns: 1fr; }
  .scale .dot { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen > * { animation: none; }
  .wing video { transition: none; }
}

/* projects and companies (21 Oct 2026): sections, facts, tags, the owner's note and the public-or-private switches */
.section { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.section h3 { margin: 0; font-size: var(--t-xs); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.section .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 36em; }
.stack { display: grid; gap: 12px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 24px; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: var(--t-xs); color: var(--muted); letter-spacing: .04em; }
.facts dd { margin: 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--mist); font-size: var(--t-sm); }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--teal-deep)); flex: none; }
.note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: var(--mist); border-left: 3px solid var(--hue); border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: var(--t-sm); }
.vislist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.vis { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vis > div { display: grid; gap: 2px; min-width: 0; }
.vis b { font-weight: 500; font-size: var(--t-sm); }
.vis .hint { overflow-wrap: anywhere; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); transition: transform .2s; box-shadow: 0 1px 2px rgba(17,17,17,.2); }
.switch input:checked + .track { background: var(--teal-deep); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
.switch .state { font-size: var(--t-xs); color: var(--muted); min-width: 9.5em; }
ul.mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.mine li { display: grid; gap: 2px; }
.editor { margin-top: 8px; }
.editor .vislist { margin-top: 10px; }
@media (max-width: 860px) { .switch .state { min-width: 0; } .vis { align-items: flex-start; } }
