/* chandellelabs.com: static front page. No JavaScript; CSP-clean (no inline style or script).

   THE APP'S OPENING SCREEN, AT REST (Dharshan, 2026-11-27, on a picture of the sign-in's opening
   screen: "i wnat this page there"). Every size and place below is read off the app so the two
   pages are one picture:
     ground, glow and colours  frontend/src/shared/styles/signin-etincelle.css (--si-*), light
     the mark's size and place frontend/src/features/login/stage/signinStage.ts doorPose()
     the pill, the corner, the footer   frontend/src/features/login/Etincelle.tsx
     type sizes                frontend/src/shared/styles/tokens.css (--text-*; one step down at ≤768)
   The app draws the mark with a moving canvas; this page shows its finished, resting frame.
   Light only: the app's opening screen is light unless a person saved dark in the dashboard on
   that device, which this page cannot know. */

:root {
  /* the sign-in's own colours (signin-etincelle.css, light) */
  --paper: #f2ede5;
  --ink: #17161c;
  --muted: #6b6670;
  --hair: #d9d2c5;
  --hover: rgba(23, 22, 28, 0.05);
  /* the default accent (amber) and the glow drawn from it: color-mix(--accent 8%, transparent) */
  --accent: #f59e0b;
  --glow: rgba(245, 158, 11, 0.08);
  /* the pill's hover: color-mix(in srgb, --ink 86%, --paper) */
  --ink-hover: #343438;
  /* the type ramp (tokens.css): above 768 */
  --text-base: 0.875rem; /* 14 */
  --text-sm: 0.8125rem; /* 13 */
  --text-xs: 0.75rem; /* 12 */
  /* the mark's width on the opening screen (doorPose): 22 % of the width, 300 to 380 px */
  --lw: min(max(22vw, 300px), 380px);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
/* phones and small tablets: every role one step smaller (tokens.css, ≤768); 11 px is the floor */
@media (max-width: 768px) {
  :root {
    --text-base: 0.8125rem; /* 13 */
    --text-sm: 0.75rem; /* 12 */
    --text-xs: 0.6875rem; /* 11 */
  }
}
/* below 640 the mark is 72 % of the width, at most 300 px (doorPose, narrow) */
@media (max-width: 639.98px) {
  :root {
    --lw: min(72vw, 300px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection {
  background: rgba(245, 158, 11, 0.3);
  color: var(--ink);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The stage: the full window (never shorter than 440, as in the app), the paper with its glow. */
.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: max(100vh, 440px);
  overflow: hidden;
  background: radial-gradient(55% 42% at 50% 46%, var(--glow), transparent 70%) var(--paper);
}
@supports (height: 100dvh) {
  .stage {
    height: max(100dvh, 440px);
  }
}

/* The mark: its centre a little above the middle, at 42 % of the stage's height (doorPose). */
.mark {
  position: absolute;
  left: 50%;
  top: 42%;
  width: var(--lw);
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--ink);
  line-height: 0;
}
.mark svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 498 / 256;
  overflow: visible;
}

/* The pill: 44 px under the mark's box, 48 high, ink on paper (Etincelle.tsx, the door button). */
.signin {
  position: absolute;
  left: 50%;
  top: calc(42% + var(--lw) * 128 / 498 + 44px);
  transform: translateX(-50%);
  border-radius: 999px;
  text-decoration: none;
  outline-offset: 4px;
}
.signin:focus-visible {
  outline: 2px solid var(--accent);
}
.signin .pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-base);
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 150ms ease-out,
    background-color 150ms ease-out;
}
.signin .pill svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 150ms ease-out;
}
.signin:hover .pill {
  transform: translateY(-1px);
  background: var(--ink-hover);
}
.signin:hover .pill svg {
  transform: translateX(4px);
}
.signin:active .pill {
  transform: translateY(0) scale(0.97);
}

/* The language, top right: a borderless "FR ⌄" like the app's, its list the languages and a tick.
   A <details> opens it without script; each language is its own page. */
.lang {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 50;
}
.lang summary {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 6px 24px 6px 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary::marker {
  content: '';
}
.lang summary:hover,
.lang[open] summary {
  background: var(--hover);
}
.lang summary:focus-visible {
  outline: 2px solid var(--accent);
}
.lang summary svg {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  color: var(--muted);
  pointer-events: none;
}
.lang ul {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 88px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #faf7f2;
  border: 1px solid var(--hair);
  border-radius: 10px;
  box-shadow: 0 8px 24px -12px rgba(23, 22, 28, 0.28);
}
.lang li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}
.lang li a:hover {
  background: var(--hover);
}
.lang li a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.lang abbr {
  text-decoration: none;
}
.lang li svg {
  width: 14px;
  height: 14px;
  flex: none;
}
@media (pointer: coarse) {
  .lang li a {
    min-height: 44px;
  }
}

/* The footer: one line on a wide screen, the link under the words on a phone (Etincelle.tsx). */
footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  padding: 0 16px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}
footer span {
  text-align: center;
  text-wrap: balance;
}
footer a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 200ms;
}
footer a:hover,
footer a:focus-visible {
  color: var(--ink);
}
footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 6px;
}

/* Small phones: the corner control moves in to 8 px (the app's max-sm). */
@media (max-width: 639.98px) {
  .lang {
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signin .pill,
  .signin .pill svg,
  footer a {
    transition: none;
  }
}
