/* ============================================================
   Cénacle — dinner-series landing page
   Self-contained "Supper Club" dark identity. Detached from the
   Anantys portal theme on purpose (dedicated brand — spec 505).
   Flat surfaces, no gradients on surfaces, no glow shadows.
   ============================================================ */

:root {
  --cn-bg:           #15110c;
  --cn-bg-raised:    #1e1810;
  --cn-bg-sunken:    #100d08;
  --cn-ink:          #f4ece0;
  --cn-ink-soft:     #c4b9a6;
  --cn-ink-mute:     #8c8170;
  --cn-brass:        #c9a96a;
  --cn-brass-bright: #e0c489;
  --cn-line:         rgba(201, 169, 106, 0.22);
  --cn-line-soft:    rgba(244, 236, 224, 0.10);
  --cn-danger:       #e08a6a;

  --cn-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --cn-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --cn-maxw: 1060px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.cn-body {
  margin: 0;
  background: var(--cn-bg);
  color: var(--cn-ink);
  font-family: var(--cn-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Contain the horizontal slide of .cn-reveal--left/--right sections. */
  overflow-x: hidden;
}

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

.cn-wrap {
  max-width: var(--cn-maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--cn-serif);
  font-weight: 400;
  line-height: 1.14;
  margin: 0;
}

.cn-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cn-brass);
  font-weight: 600;
}

/* ---- Header ---- */
/* Sits above the fixed scrim so the logo stays crisp at scroll top. */
.cn-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--cn-line-soft);
}
.cn-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--cn-maxw);
  margin: 0 auto;
  padding: 1.05rem 1.25rem;
}
.cn-wordmark {
  font-family: var(--cn-serif);
  font-size: 1.3rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  padding-left: 0.4em; /* offset trailing letter-spacing */
  text-decoration: none;
  color: var(--cn-ink);
}
.cn-presented {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: var(--cn-ink-mute);
}
.cn-presented-label { display: none; letter-spacing: 0.05em; }
.cn-logo { height: 19px; width: auto; opacity: 0.92; }
.cn-x { color: var(--cn-line); }
.cn-accrea { color: var(--cn-ink-soft); font-weight: 600; letter-spacing: 0.06em; }

/* ---- Hero ---- */
.cn-hero {
  position: relative;
  text-align: center;
  padding: 5rem 0 5.5rem;
  background-color: var(--cn-bg);
  /* To add a real candlelit photo, set a background-image here and raise
     the ::before overlay opacity so the type stays readable. */
}
.cn-hero::before {
  /* Structural vignette — focuses the eye; not a decorative surface fill. */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 56% at 50% 36%,
              rgba(201, 169, 106, 0.11), transparent 72%);
  pointer-events: none;
}
.cn-hero > * { position: relative; }
.cn-hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  letter-spacing: -0.012em;
  max-width: 15ch;
  margin: 1.5rem auto 0;
}
.cn-hero h1 em { font-style: italic; color: var(--cn-brass-bright); }
/* Hero manifesto — two-tone "no bullshit" litany: the negative
   space (what Cénacle refuses) in muted ink, the positive promise
   in bright brass. The colour does the dramaturgy. */
.cn-manifesto {
  max-width: 34ch;
  margin: 1.6rem auto 0;
  font-size: 1.1rem;
  line-height: 1.5;
}
.cn-manifesto span { display: block; }
.cn-manifesto-no { color: var(--cn-ink-mute); }
.cn-manifesto-yes {
  margin-top: 0.55rem;
  color: var(--cn-brass-bright);
  font-weight: 500;
}
.cn-hero-cta { margin-top: 2.1rem; }
.cn-hero-meta {
  margin-top: 1.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cn-ink-mute);
}

.cn-rule {
  width: 44px;
  height: 1px;
  background: var(--cn-brass);
  border: 0;
  margin: 1.6rem auto;
}

/* ---- Buttons ---- */
.cn-btn {
  display: inline-block;
  font-family: var(--cn-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.95rem 2.1rem;
  background: var(--cn-brass);
  color: #1a1408;
  border: 1px solid var(--cn-brass);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.cn-btn:hover { background: var(--cn-brass-bright); border-color: var(--cn-brass-bright); }
.cn-btn-block { width: 100%; text-align: center; }

/* ---- Section scaffold ---- */
.cn-section { padding: 4.5rem 0; border-top: 1px solid var(--cn-line-soft); }
.cn-section-head { text-align: center; margin-bottom: 3rem; }
.cn-section-head h2 { font-size: clamp(2rem, 5vw, 2.9rem); margin-top: 0.7rem; }
.cn-section-head p {
  max-width: 48ch;
  margin: 1rem auto 0;
  color: var(--cn-ink-soft);
}

/* ---- Act dividers — two-act structure: the format vs the edition.
   Act I = "Le Cénacle" (timeless), Act II = "Édition NN" (the theme). ---- */
.cn-act {
  text-align: center;
  padding: 3.4rem 0;
  background: var(--cn-bg-sunken);
}
.cn-act-edition { border-top: 1px solid var(--cn-line); }
/* Chevron jumps here — land it near the viewport centre so the focus
   fade shows it lit, not stranded faded at the top edge. */
#acte-1 { scroll-margin-top: calc(50vh - 80px); }
.cn-act-num {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cn-brass);
  font-weight: 600;
}
.cn-act-title {
  display: block;
  font-family: var(--cn-serif);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.14;
  margin-top: 0.5rem;
}
.cn-act-title em { font-style: italic; color: var(--cn-brass-bright); }
.cn-act-sub {
  margin: 0;
  color: var(--cn-ink-mute);
  font-size: 0.92rem;
}
.cn-act .cn-rule { margin: 1.3rem auto; }

/* ---- Edition theme (Act II opener) ---- */
.cn-theme { text-align: center; }
.cn-theme-inner { max-width: 640px; margin: 0 auto; }
.cn-theme h2 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin-top: 0.7rem;
}
.cn-theme h2 em { font-style: italic; color: var(--cn-brass-bright); }
.cn-theme-lead {
  margin-top: 1.4rem;
  color: var(--cn-ink-soft);
  font-size: 1.06rem;
}

/* ---- Principle (3 columns) ---- */
.cn-grid-3 { display: grid; gap: 2.4rem; }
.cn-pillar { border-top: 1px solid var(--cn-line); padding-top: 1.1rem; }
.cn-pillar-num { font-family: var(--cn-serif); font-size: 1.1rem; color: var(--cn-brass); }
.cn-pillar h3 { font-size: 1.5rem; margin: 0.5rem 0 0.6rem; }
.cn-pillar p { margin: 0; color: var(--cn-ink-soft); font-size: 0.98rem; }

/* ---- "Pour qui" ---- */
.cn-forwho { background: var(--cn-bg-raised); }
.cn-forwho-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.cn-forwho .cn-lead {
  font-family: var(--cn-serif);
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  line-height: 1.3;
}
.cn-forwho .cn-lead em { color: var(--cn-brass-bright); font-style: italic; }
.cn-forwho p { margin-top: 1.6rem; color: var(--cn-ink-soft); }

/* ---- Hosts ---- */
.cn-grid-2 { display: grid; gap: 2rem; }
.cn-host {
  border: 1px solid var(--cn-line);
  background: var(--cn-bg-raised);
  padding: 2rem 1.8rem;
  text-align: center;
}
.cn-host-medallion {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.2rem;
  border: 1px solid var(--cn-brass);
  border-radius: 50%;
  overflow: hidden;
}
.cn-host-medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Unify portraits to B&W — matches the brass-on-dark identity. */
  filter: grayscale(1) contrast(1.03);
}
.cn-host h3 { font-size: 1.5rem; }
.cn-host-role {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cn-brass);
}
.cn-host p { margin: 1rem 0 0; color: var(--cn-ink-soft); font-size: 0.96rem; }

/* ---- Evening outline ---- */
.cn-steps { max-width: 620px; margin: 0 auto; }
.cn-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--cn-line-soft);
}
.cn-step:last-child { border-bottom: 0; }
.cn-step-mark {
  font-family: var(--cn-serif);
  font-size: 1.05rem;
  color: var(--cn-brass);
  padding-top: 0.2rem;
}
.cn-step h3 { font-size: 1.25rem; }
.cn-step p { margin: 0.3rem 0 0; color: var(--cn-ink-soft); font-size: 0.95rem; }

/* ---- Application form ---- */
.cn-apply { background: var(--cn-bg-sunken); }
.cn-form { max-width: 600px; margin: 0 auto; }
.cn-field { margin-bottom: 1.3rem; border: 0; padding: 0; min-width: 0; }
.cn-field-row { display: grid; gap: 1.3rem; }
.cn-label,
.cn-legend {
  display: block;
  padding: 0;
  font-size: 0.77rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cn-ink-soft);
  margin-bottom: 0.5rem;
}
.cn-opt { color: var(--cn-ink-mute); text-transform: none; letter-spacing: 0; }
.cn-input,
.cn-textarea,
.cn-select {
  width: 100%;
  background: var(--cn-bg-raised);
  border: 1px solid var(--cn-line);
  color: var(--cn-ink);
  font-family: var(--cn-sans);
  font-size: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 2px;
}
.cn-input:focus,
.cn-textarea:focus,
.cn-select:focus { outline: none; border-color: var(--cn-brass); }
.cn-input::placeholder,
.cn-textarea::placeholder { color: var(--cn-ink-mute); }
.cn-textarea { resize: vertical; min-height: 78px; }

/* Budget radio cards */
.cn-budget { display: grid; gap: 0.7rem; }
.cn-budget-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--cn-line);
  background: var(--cn-bg-raised);
  padding: 1rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
}
.cn-budget-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.cn-budget-card:has(input:checked) {
  border-color: var(--cn-brass);
  background: rgba(201, 169, 106, 0.07);
}
.cn-budget-card:focus-within { border-color: var(--cn-brass); }
.cn-budget-dot {
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid var(--cn-brass);
  border-radius: 50%;
}
.cn-budget-card:has(input:checked) .cn-budget-dot { background: var(--cn-brass); }
.cn-budget-amount { font-family: var(--cn-serif); font-size: 1.08rem; }

/* Error banner */
.cn-error {
  border: 1px solid var(--cn-danger);
  background: rgba(224, 138, 106, 0.08);
  color: var(--cn-danger);
  padding: 0.85rem 1rem;
  border-radius: 2px;
  margin-bottom: 1.6rem;
  font-size: 0.92rem;
}
.cn-form-note {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--cn-ink-mute);
  font-size: 0.85rem;
}

/* ---- FAQ ---- */
.cn-faq { max-width: 620px; margin: 0 auto; }
.cn-faq details { border-bottom: 1px solid var(--cn-line-soft); padding: 1.15rem 0; }
.cn-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--cn-serif);
  font-size: 1.2rem;
}
.cn-faq summary::-webkit-details-marker { display: none; }
.cn-faq summary::after { content: "+"; color: var(--cn-brass); }
.cn-faq details[open] summary::after { content: "\2013"; }
.cn-faq p { margin: 0.8rem 0 0; color: var(--cn-ink-soft); font-size: 0.96rem; }

/* ---- Footer ---- */
.cn-footer {
  border-top: 1px solid var(--cn-line-soft);
  padding: 3rem 0;
  text-align: center;
}
.cn-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--cn-ink-mute);
  font-size: 0.86rem;
}
.cn-footer-brand .cn-logo { height: 22px; }
.cn-footer-fine { margin-top: 1rem; color: var(--cn-ink-mute); font-size: 0.77rem; }

/* ============================================================
   Scroll experience — premium isolation + reveal-on-entry.
   ============================================================ */

/* Edge scrim — fixed gradients that fade the top/bottom of the
   viewport to the page background, so each section reads as an
   isolated "plate". pointer-events:none keeps every click through. */
.cn-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.cn-scrim::before,
.cn-scrim::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 13vh;
}
.cn-scrim::before {
  top: 0;
  background: linear-gradient(to bottom, var(--cn-bg), transparent);
}
.cn-scrim::after {
  bottom: 0;
  background: linear-gradient(to top, var(--cn-bg), transparent);
}

/* Focus fade — opacity & directional drift are driven per-frame by
   cenacle.js from each section's distance to the viewport centre
   line. If the script never runs, sections keep this default
   opacity:1 — the page degrades to fully visible (SEO + a11y safe). */
.cn-reveal {
  will-change: opacity, transform;
}

/* Scroll cue — bobbing chevron inviting the first scroll. */
.cn-scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2.4rem;
  border: 1px solid var(--cn-line);
  border-radius: 50%;
  color: var(--cn-brass);
  text-decoration: none;
  animation: cn-bob 2.4s ease-in-out infinite;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.cn-scroll-cue:hover {
  border-color: var(--cn-brass);
  color: var(--cn-brass-bright);
}
@keyframes cn-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Per-section "next" chevron — injected by cenacle.js at the foot of
   every section. Static (only the hero cue bobs, as the first cue). */
.cn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 2.6rem auto 0;
  padding: 0;
  background: transparent;
  border: 1px solid var(--cn-line);
  border-radius: 50%;
  color: var(--cn-brass);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease;
}
.cn-next:hover {
  border-color: var(--cn-brass);
  color: var(--cn-brass-bright);
  background: rgba(201, 169, 106, 0.07);
}
.cn-next:focus-visible {
  outline: 2px solid var(--cn-brass);
  outline-offset: 3px;
}

/* Accessibility — honour reduced-motion: cenacle.js bails out (every
   section stays at its default opacity:1); just stop the chevron bob. */
@media (prefers-reduced-motion: reduce) {
  .cn-scroll-cue { animation: none; }
}

/* ---- Confirmation (merci) page ---- */
.cn-merci {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
}
.cn-merci h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); max-width: 17ch; }
.cn-merci p { max-width: 45ch; margin: 1.4rem auto 0; color: var(--cn-ink-soft); }
.cn-merci .cn-btn { margin-top: 2.2rem; }

/* ---- Spec 506 QA-r1 — convive (post-validation home, the cooptation loop) ----
   Extreme clarity: no top divider, no sub-sections, no card-in-card. The
   3-step counter is the focal point.                                       */
.cn-convive {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}
.cn-convive h1 {
  font-size: clamp(2.2rem, 5.5vw, 3rem);
  margin: 0.4rem 0 1.2rem;
  line-height: 1.1;
}
.cn-convive-lead {
  font-size: 1.05rem;
  color: var(--cn-ink-soft);
  margin: 0 0 2rem;
  max-width: 56ch;
}
.cn-loop {
  margin: 2.5rem 0 3rem;
  padding: 0;
}
.cn-loop-step {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--cn-line-soft);
}
.cn-loop-step:last-child {
  border-bottom: 1px solid var(--cn-line-soft);
}
.cn-loop-label {
  margin: 0;
  color: var(--cn-ink-soft);
  font-size: 1.05rem;
  font-family: var(--cn-sans);
}
.cn-loop-num {
  margin: 0;
  font-family: var(--cn-serif);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--cn-brass-bright);
  line-height: 1;
}
.cn-filleuls-roster {
  margin: -1.8rem 0 2.4rem;
  font-family: var(--cn-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--cn-ink-soft);
  text-align: right;
  line-height: 1.6;
}
.cn-filleul {
  white-space: nowrap;
}
.cn-filleul-sep {
  margin: 0 0.6rem;
  color: var(--cn-brass);
}
/* ---- Spec 506 QA-r2 — magic-link entry points on landing ---- */
.cn-already-applied {
  margin: 1.6rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--cn-ink-mute);
}
.cn-already-applied a {
  color: var(--cn-brass);
  text-decoration: underline;
}
.cn-already-applied a:hover {
  color: var(--cn-brass-bright);
}
.cn-loggedout-banner {
  background: var(--cn-bg-raised);
  border-bottom: 1px solid var(--cn-line);
  padding: 1rem 0;
  text-align: center;
}
.cn-loggedout-banner p {
  margin: 0;
  color: var(--cn-ink-soft);
  font-size: 0.95rem;
}
.cn-loggedout-banner a {
  color: var(--cn-brass-bright);
  text-decoration: underline;
}
.cn-convive-form {
  margin-top: 1rem;
}
.cn-convive-form-intro {
  font-family: var(--cn-serif);
  font-size: 1.6rem;
  margin: 0 0 1.2rem;
  color: var(--cn-ink);
}
.cn-convive-empty {
  margin: 1.5rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--cn-line-soft);
  border-radius: 4px;
  color: var(--cn-ink-soft);
  font-size: 0.98rem;
}
.cn-convive-logout {
  margin-top: 2.5rem;
  text-align: center;
}

/* ---- Spec 506 — code-entry + form errors + secondary button ---- */
.cn-help {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--cn-ink-mute);
  line-height: 1.45;
}
.cn-parainage {
  margin: 0 0 2rem;
  padding: 0.9rem 1rem;
  background: var(--cn-bg-raised);
  border: 1px solid var(--cn-line);
  border-radius: 4px;
  color: var(--cn-ink);
  font-size: 0.95rem;
}
.cn-parainage strong { color: var(--cn-brass); }
.cn-form-error {
  margin: 0.5rem 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--cn-danger);
  border-radius: 4px;
  color: var(--cn-danger);
  background: rgba(224, 138, 106, 0.05);
  font-size: 0.95rem;
}
.cn-flash {
  margin: 0.5rem 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--cn-line);
  border-radius: 4px;
  color: var(--cn-ink-soft);
  font-size: 0.95rem;
}
.cn-form-code {
  max-width: 24rem;
  margin: 1.6rem auto 0;
  width: 100%;
}
.cn-code-input {
  text-align: center;
  font-family: var(--cn-serif);
  font-size: 2rem;
  letter-spacing: 0.32em;
  font-weight: 500;
}
.cn-form-resend {
  max-width: 24rem;
  margin: 1rem auto 0;
  width: 100%;
}
.cn-btn-secondary {
  background: transparent;
  color: var(--cn-ink-soft);
  border: 1px solid var(--cn-line);
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
}
.cn-btn-secondary:hover {
  color: var(--cn-ink);
  border-color: var(--cn-brass);
  background: transparent;
}
/* ---- Desktop ---- */
@media (min-width: 768px) {
  .cn-presented-label { display: inline; }
  .cn-section { padding: 5.5rem 0; }
  .cn-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cn-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .cn-field-row { grid-template-columns: 1fr 1fr; }
  .cn-budget { grid-template-columns: repeat(3, 1fr); }
}
