/* Source fonts */
@font-face {
  font-family: "Klipsk Display";
  src: url('/assets/klipsk-display.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url('/assets/plus-jakarta-regular.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url('/assets/plus-jakarta-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Brand tokens and shared defaults */
:root {
  --indigo: #19142e;
  --maya: #deedfc;
  --mineral: #fcfaf7;
  --ascension: #315bcb;
  --muted: #465775;
  --deep: #203b84;
  --error: #823242;
  font-family: "Plus Jakarta Sans",sans-serif;
  font-synthesis: none;
  color: var(--indigo);
  background: var(--mineral);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

h1,h2,p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

button,input {
  font: inherit;
}

button,a,input {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,button:focus-visible,input:focus-visible {
  outline: 2px solid var(--ascension);
  outline-offset: 4px;
}

/* Keyboard access */
.skip-link {
  position: absolute;
  left: 24px;
  top: -120px;
  padding: 12px;
  background: var(--mineral);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Shared header proportions, measured on the Saint Laurent reference. */
.menu {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  height: calc(72px + env(safe-area-inset-top));
  padding: 0 32px;
  padding-top: env(safe-area-inset-top);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  background: linear-gradient(var(--maya),transparent);
}

.menu.is-scrolled { background: var(--maya); }

.menu > a { grid-column: 2; display: flex; align-items: center; min-height: 44px; }
.menu img { width: 108px; height: auto; }
.menu p { grid-column: 3; justify-self: end; font-size: 12px; line-height: 20px; }

/* One viewport of media with live text anchored to its lower edge. */
html:has(.hero-panel) {
  --header-height: 72px;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  scroll-behavior: smooth;
}
/* Let the browser place the focused field above an on-screen keyboard. */
html:has(.launch-panel input:focus) { scroll-snap-type: none; }
.page { background: var(--maya); }
.hero-panel {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 24px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.closing-panel {
  min-height: 100svh;
  min-height: 100dvh;
  padding-top: calc(var(--header-height,72px) + env(safe-area-inset-top));
  display: grid;
  grid-template-rows: 1fr auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.launch-panel { display: grid; place-items: center; padding: 48px 40px; }
.launch-content { width: min(100%,1040px); display: grid; grid-template-columns: minmax(0,620px) minmax(0,360px); gap: 60px; align-items: first baseline; }
.hero { grid-area: 1/1/2/-1; position: relative; min-width: 0; overflow: hidden; background: var(--indigo); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 48%,rgb(25 20 46 / 12%) 64%,rgb(25 20 46 / 84%) 100%);
}
.heading {
  grid-area: 1/2/2/3;
  align-self: end;
  justify-self: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%,760px);
  padding-top: 160px;
  padding-bottom: max(40px,7svh);
  color: #fff;
  text-align: center;
}
.heading h1 {
  font-family: "Klipsk Display",serif;
  font-size: clamp(30px,2.8vw,40px);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}
.category { font-size: 13px; line-height: 21px; text-wrap: balance; }
.prose { font-family: "Klipsk Display",serif; font-size: 32px; font-weight: 700; line-height: 1.18; text-wrap: balance; }
.keep { white-space: nowrap; }

/* Signup form and feedback states */
.signup {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 0;
  margin-top: 0;
}

.signup h2 {
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
}

.signup form { margin-top: 22px; }

.invite {
  margin-top: 8px;
  text-align: left;
  font-size: 14px;
  line-height: 22px;
}

.fields { display: flex; flex-direction: column; gap: 4px; align-items: stretch; margin-top: 0; }
.fields input { height: 44px; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; background: transparent; padding: 0; }
.fields button { align-self: flex-start; width: auto; min-height: 44px; margin-top: 12px; padding: 10px 22px; border: 1px solid var(--indigo); border-radius: 0; background: transparent; color: var(--indigo); font-size: 12px; }
.fields button:hover:enabled, form[aria-busy="true"] .fields button { background: var(--indigo); color: var(--maya); }

label {
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

input {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 1px solid var(--muted);
  border-radius: 2px;
  background: #fff;
  color: var(--indigo);
  padding: 0 18px;
  font-size: 15px;
  line-height: 24px;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 2px;
  padding: 12px 16px;
  background: var(--ascension);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
  transition: background-color .18s ease;
}

button:hover:enabled {
  background: var(--deep);
}

button:disabled {
  cursor: not-allowed;
}

form[aria-busy="true"] button {
  cursor: wait;
  background: var(--deep);
}

.usage {
  font-size: 12px;
  line-height: 18px;
  margin-top: 32px;
}

.withdraw {
  font-size: 12px;
  line-height: 19px;
  margin-top: 6px;
}

.fields[hidden] {
  display: none;
}

.form-status {
  font-size: 12px;
  line-height: 19px;
  margin-top: 12px;
  color: var(--muted);
}

.form-status:empty,.error:empty,#turnstile-widget:empty {
  display: none;
}

.form-status[data-state="success"] {
  color: var(--ascension);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  max-width: 36ch;
  margin-top: 0;
}
.signup[data-state="success"] .invite,
.signup[data-state="success"] .usage,
.signup[data-state="success"] .withdraw { display: none; }
.signup[data-state="success"] form { margin-top: 16px; }

.form-status[data-state="error"],.error {
  color: var(--error);
}

.error {
  font-size: 13px;
  line-height: 21px;
}

#turnstile-widget {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 65px;
  margin-top: 16px;
  margin-bottom: 4px;
}

/* Footer navigation */
.footer {
  padding: 22px 5%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: var(--mineral);
}
.closing-panel .footer { width: calc(100% - 64px); max-width: 1120px; margin: 0 auto; padding: 20px 0 max(20px,env(safe-area-inset-bottom)); background: var(--maya); border-top: 1px solid rgb(25 20 46 / 20%); align-items: center; gap: 20px; }
.closing-panel .motto, .closing-panel .footer-meta, .closing-panel .footer a { font-size: 12px; line-height: 20px; }

.motto {
  font-size: 14px;
  line-height: 22px;
}

.legal-links,.footer-meta,.languages {
  display: flex;
  align-items: center;
}

.legal-links {
  gap: 18px;
}

.footer-meta {
  gap: 24px;
  font-size: 13px;
  line-height: 22px;
}

.languages {
  gap: 6px;
}

.footer a {
  font-size: 13px;
  line-height: 22px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.footer [aria-current] {
  font-weight: 600;
  text-decoration: none;
}

/* Temporary legal preparation routes */
.preparation-page .menu {
  position: relative;
}

.preparation-content {
  max-width: 800px;
  min-height: 50vh;
  padding: 64px 24px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preparation-content h1 {
  font-family: "Klipsk Display",serif;
  font-size: 42px;
  line-height: 1.15;
}

.preparation-content p {
  line-height: 1.7;
}

@media(max-width:999px) {
  .heading { max-width: 680px; }
  .footer { flex-wrap: wrap; gap: 12px 24px; }
}
@media(max-width:899px) {
  .launch-content { max-width: 540px; grid-template-columns: minmax(0,1fr); gap: 32px; }
  .signup { margin-top: 0; }
  .prose { font-size: 30px; }
}

/* The portrait asset also serves portrait tablets; compact type starts below 700px. */
@media(max-width:699px) {
  html:has(.hero-panel) { --header-height: 60px; }
  .menu img { width: 104px; }
  .launch-panel { padding: 28px 24px 24px; place-items: center; }
  .launch-content { max-width: 430px; gap: 28px; }
  .signup { gap: 0; }
  .signup form { margin-top: 28px; text-align: center; }
  .fields input { text-align: center; }
  .fields button { align-self: center; }
  .usage,.withdraw,.form-status { text-align: center; text-wrap: pretty; }
  .form-status[data-state="success"] { margin-inline: auto; }
  .signup h2 { font-size: 18px; line-height: 25px; text-align: center; }
  .invite { text-align: center; }
  .fields { display: flex; flex-direction: column; }
  .menu { height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 24px 0; }
  .menu p { display: none; }
  .heading { text-align: center; gap: 14px; padding-top: 120px; padding-bottom: max(28px,5svh); }
  .heading h1 { font-size: clamp(27px,7vw,30px); line-height: 1.15; }
  .category { font-size: 13px; line-height: 20px; text-wrap: pretty; }
  .hero img { object-position: 50% 50%; }
  .hero::after { background: linear-gradient(transparent 58%,rgb(25 20 46 / 12%) 68%,rgb(25 20 46 / 70%) 100%); }
  .prose { font-size: 24px; line-height: 28px; text-align: center; }
  .footer { padding: 22px 24px max(22px,env(safe-area-inset-bottom)); flex-direction: column; gap: 12px; align-items: center; text-align: center; }
  .footer-meta { gap: 16px; }
  .closing-panel .footer { width: calc(100% - 48px); padding: 12px 0 max(12px,env(safe-area-inset-bottom)); gap: 6px; align-items: center; text-align: center; }
  .legal-links { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .footer-meta { justify-content: center; flex-wrap: wrap; }
  input { font-size: 16px; }
  .preparation-content { padding-top: 40px; }
  .preparation-content h1 { font-size: 34px; }
}

/* Short landscape windows keep the copy on screen without a fixed 640px hero. */
@media(max-height:500px) and (min-width:700px) {
  .heading { padding-top: 100px; padding-bottom: 24px; gap: 10px; }
  .heading h1 { font-size: 32px; }
}

/* Respect reduced motion */
@media(prefers-reduced-motion:reduce) {
  html:has(.hero-panel) { scroll-behavior: auto; scroll-snap-type: none; }
  button {
    transition: none;
  }

}
