/* The public pages: the front page and "Participate". Plan:
   1. top row: section links left, the mark in the middle, language and "Log in" right (all small pills)
   2. intro: one statement in the display font, its first sentence bold, the rest regular
   3. showcase: a wide soft panel with the mark, large and alive
   4. cards: soft, a small label, the text, then the facts in rows with thin lines
   5. steps and "who we are": each with a small label between two thin lines
   6. bottom: a dark teal block with the light mark, contact, the safety line
   Calm on purpose: much air, thin lines, small labels. Colours and sizes come from tokens.css. */

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

/* One width for every section, in the middle of the window */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  box-sizing: border-box;
}

a {
  color: var(--accent-text);
}

/* Small labels: mono, capitals, wide letters */
.eyebrow {
  margin: 0 0 var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.muted {
  color: var(--ink-muted);
}

/* A small round dot before a label (turquoise as an edge, never as text) */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--space-2);
  border-radius: 50%;
  background: var(--turquoise);
  vertical-align: 1px;
}

/* --- 1. The top row ----------------------------------------------------------------------- */

.site-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.top-links,
.top-right,
.languages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.top-right {
  justify-content: flex-end;
}

/* The mark and the name, in the middle */
.site-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

/* Large enough to read the hand and the flame */
.site-mark img {
  display: block;
  width: 64px;
  height: 64px;
}

/* The name in two lines ("CBT Persona / Robot"), about as tall as the mark beside it */
.site-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.05;
  white-space: nowrap;
}

/* Pills: small, quiet buttons and links of the top row */
.pill {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}

.pill:hover {
  background: var(--surface-soft);
}

.language {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.language.is-current {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.language:disabled {
  opacity: 0.45;
  cursor: default;
}

.pill-strong {
  border-color: var(--berry);
  color: var(--berry);
}

/* --- Buttons. They are links that look like buttons, because they lead to another page. --- */

.button {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}

.button-big {
  padding: 14px var(--space-10);
  font-size: 18px;
}

.button-main {
  background: var(--berry);
  color: var(--on-berry);
}

.button:hover {
  opacity: 0.9;
}

.button:focus-visible,
.pill:focus-visible,
.site-mark:focus-visible,
a:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 3px;
}

/* --- 2. The statement ------------------------------------------------------------------------- */

.intro {
  padding-top: var(--space-20);
  padding-bottom: var(--space-10);
}

.statement {
  margin: 0;
  max-width: 1040px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  hyphens: none;
}

/* One family for the whole statement (Playfair Display): the first sentence bold,
   its key word bold italic in berry, the rest regular. Plex stays for text, Mono for labels. */
.statement-lead {
  font-weight: 700;
}

.statement-lead em {
  color: var(--accent-text);
}

/* The rest: the display font in its regular weight, lighter than the first sentence */
.statement-rest {
  font-weight: 400;
  color: var(--ink);
}

.intro-buttons {
  margin-top: var(--space-10);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* The statement comes in softly */
.intro > * {
  animation: appear 0.9s ease backwards;
}

.intro > *:nth-child(2) { animation-delay: 0.35s; }

@keyframes appear {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- 3. The showcase --------------------------------------------------------------------------- */

.showcase-panel {
  position: relative;
  height: 460px;
  border-radius: var(--radius-lg);
  background: var(--sand);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.showcase-mark {
  display: block;
  height: 420px;
  margin-bottom: 20px;
}

/* PLACEHOLDER until the mascot's animation: a quiet dashed frame in the middle */
.showcase-panel {
  align-items: center;
}

.showcase-placeholder {
  width: 320px;
  height: 320px;
  border: 2px dashed rgba(15, 61, 62, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 61, 62, 0.6);
}

.showcase-label {
  position: absolute;
  left: var(--space-6);
  top: var(--space-4);
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* --- 4. Cards ---------------------------------------------------------------------------------- */

.cards,
.note-section {
  padding-top: var(--space-10);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.note-section {
  padding-bottom: var(--space-20);
}

.card {
  padding: var(--space-6);
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.card-label {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.card-text {
  margin: 0;
  flex-grow: 1;
}

.card p:last-child {
  margin-bottom: 0;
}

/* The facts: one row each, a thin line above */
.card-rows {
  margin: var(--space-6) 0 0;
}

.card-rows div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.card-rows dt {
  font-weight: 500;
}

.card-rows dd {
  margin: 0;
  color: var(--ink-muted);
  text-align: right;
}

/* --- The notification form ("Participate"; on only when the server says so) ------------------- */

.signup-section {
  padding-top: var(--space-10);
}

.signup {
  max-width: 640px;
  gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
}

.field input,
.field select {
  padding: 10px var(--space-4);
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.field input:focus-visible,
.field select:focus-visible,
.agree input:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 2px;
}

.info-text {
  padding: var(--space-4);
  border: 1px dashed var(--ink-muted);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--ink-muted);
}

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
}

.agree input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--berry);
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.signup-note {
  margin: 0;
  font-size: 15px;
}

/* --- 5. Steps, who we are ------------------------------------------------------------------------ */

/* A small label between two thin lines, as a section's door */
.rule-label {
  margin: 0 0 var(--space-6);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-title {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
}

.section-title em {
  color: var(--accent-text);
}

.steps-section {
  padding-top: var(--space-20);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-10);
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.1;
  color: var(--accent-text);
}

.steps h3 {
  margin: var(--space-2) 0;
  font-size: 19px;
  font-weight: 500;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
}

.two-columns {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-10) var(--space-20);
}

.two-columns p {
  margin: 0;
}

.two-columns .rule-label {
  margin-bottom: var(--space-6);
}

.timeline {
  margin: 0;
}

.timeline dt {
  margin-top: var(--space-4);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.timeline dt:first-child {
  margin-top: 0;
}

.timeline dd {
  margin: 0;
}

/* --- 6. The bottom: dark teal ------------------------------------------------------------------- */

.site-bottom {
  background: var(--teal);
  color: var(--sand);
  font-size: 15px;
}

.site-bottom a {
  color: var(--sand);
}

.site-bottom-grid {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr 1fr;
  gap: var(--space-6);
}

.site-bottom-grid p {
  margin: 0;
}

.bottom-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bottom-mark .site-name {
  font-size: 26px;
}

.bottom-label {
  margin-bottom: var(--space-2) !important;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.site-bottom-line {
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
  box-shadow: inset 0 1px 0 rgba(232, 220, 194, 0.25);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 14px;
}

.site-bottom-line p {
  margin: 0;
}

/* --- Narrow windows: the top row stacks, the bottom grid folds ------------------------------- */

@media (max-width: 860px) {
  .site-top {
    grid-template-columns: 1fr auto;
  }
  .top-links {
    display: none;
  }
  .site-mark {
    justify-self: start;
  }
  .site-bottom-grid {
    grid-template-columns: 1fr 1fr;
  }
  .showcase-panel {
    height: 320px;
  }
  .showcase-mark {
    height: 280px;
  }
}

/* Animation turned off in the system: nothing moves */
@media (prefers-reduced-motion: reduce) {
  .intro > * {
    animation: none;
  }
}

/* --- «I want to take part» (on only when the server says apply is open; decisions of 3 Dec 2026) --- */

.apply-section {
  padding-top: var(--space-10);
}

.apply-hello {
  max-width: 640px;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.apply-hello .field {
  text-align: left;
}

.apply-hello .signup-row {
  justify-content: center;
}

/* The mascot (a placeholder: the logo's hand until the drawing comes) waves gently */
.apply-mascot {
  width: 120px;
  height: 120px;
  animation: apply-wave 2.4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

@keyframes apply-wave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .apply-mascot {
    animation: none;
  }
}

.apply-hello-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.apply-name-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.apply-skip {
  border: 1px solid var(--ink-muted);
  background: transparent;
  color: var(--ink);
}

.apply-small {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.apply-info {
  border-style: solid;
  line-height: 1.55;
  color: var(--ink);
}

.apply-thanks {
  max-width: 640px;
  gap: var(--space-4);
}

.apply-section [hidden] {
  display: none;
}
