/* ==========================================================
   evening.css · the almers.io home page
   Loaded after scrollcraft.css (the scroll engine's floor) and
   almers.css (the brand kit). Brand tokens win; this file only
   lays out the page and the evening scene.
   ========================================================== */

:root {
  /* hand the engine the brand */
  --sc-canvas: #F5F4F8;  --sc-surface: #FFFFFF;
  --sc-ink: #1F2240;     --sc-ink-soft: #5B5E73;
  --sc-accent: #1F2240;  --sc-accent-ink: #FFFFFF;
  --sc-font-display: var(--font-display);
  --sc-font-text: var(--font-body);

  --bar-h: 64px;
  --frame: max(16px, 3vw);
  --band-deep: #262A4D;   /* the kit's dark-theme band: a quiet step up from night */
}
@media (min-width: 800px) { :root { --bar-h: 72px; --frame: max(24px, 3vw); } }

html { background: var(--night); }
body { background: var(--night); letter-spacing: 0; }
.wordmark img { display: block; }

/* ---------------------------------------------------- header -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--bar-h); padding: 0;
  display: flex; align-items: center;
  background: var(--bg); color: var(--ink);
  transition: background-color 180ms var(--sc-ease-out), color 180ms var(--sc-ease-out);
}
.bar .wrap, .hero .wrap { max-width: none; padding-inline: var(--frame); }
.bar .wm-dark { display: none; }
.bar.is-dark { background: var(--night); color: var(--on-band); --focus: var(--lamp); }
.bar.is-dark .wm-dark { display: block; }
.bar.is-dark .wm-light { display: none; }
.bar.is-dark .btn-secondary { color: var(--on-band); border-color: var(--on-band-muted); }
.bar.is-dark .btn-secondary:hover { border-color: var(--on-band); }
.bar .btn { min-height: 44px; padding-block: 10px; }
@media (max-width: 380px) { .bar .wordmark img { height: 24px; } .bar .btn { padding-inline: 16px; } }

/* ------------------------------------------------------ hero -- */
.hero { position: relative; z-index: 2; background: var(--bg); padding: calc(var(--bar-h) + var(--space-5)) 0 0; }
.hero-copy { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.hero h1 { font-size: 44px; line-height: 46px; letter-spacing: -0.035em; max-width: 13ch; }
.hero-note { font-size: 15px; line-height: 22px; color: var(--ink-muted); max-width: 46ch; }
@media (min-width: 700px) { .hero h1 { font-size: 64px; line-height: 64px; } }

/* --------------------------------------------- evening stage -- */
.evening { position: relative; z-index: 1; }
.ev-stage { color: var(--on-band); }
.ev-ground { position: absolute; inset: 0; background: var(--ground, var(--night)); }

.ev-clock {
  position: absolute; z-index: 3; left: var(--frame); bottom: -0.16em; margin: 0;
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(132px, 34vw, 240px); letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--clock-ink, var(--band-deep));
  pointer-events: none; user-select: none;
}

.ev-scene { position: absolute; inset: 0; z-index: 2; clip-path: var(--clip, none); }
.ev-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  overflow: visible; transform-origin: 0 0;
}
/* night defaults, so a page without scripts still shows a finished scene */
.ev-stage {
  --sky-top: #14162A; --sky-bot: #2A2E57; --far: #1B1D38;
  --wall: #1C1E38; --sill: #24274A; --floor: #171930;
  --rf: #2E3258; --desk: #101225; --desk-edge: #2B2F55;
}

/* the phone: night status bar on top, the conversation below */
.ev-phone {
  position: absolute; z-index: 4; margin: 0;
  top: var(--ph-top, calc(var(--bar-h) + 12px));
  left: var(--ph-left, 16px);
  width: var(--ph-w, calc(100% - 32px));
  height: var(--ph-h, 60svh);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); --focus: var(--ink);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 2px 4px rgba(10, 12, 32, 0.16), 0 18px 40px rgba(10, 12, 32, 0.26);
  transform: translate3d(var(--ph-dx, 0px), var(--ph-dy, 0px), 0);
}
.ev-status {
  display: flex; justify-content: space-between; gap: var(--space-3); white-space: nowrap;
  background: var(--night); color: var(--on-band-muted);
  padding: 12px 20px;
  font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.ev-status .on { color: var(--lamp); }
.ev-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) 20px 18px; }
.ev-thread {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 32px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 32px);
}
.ev-track {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: var(--space-3);
  transform: translate3d(0, var(--track-y, 0px), 0);
}
.ev-track .bubble { max-width: 88%; }
.ev-sep { align-self: center; text-align: center; max-width: 32ch; margin: var(--space-1) 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ev-body .chat-note { opacity: var(--note-op, 1); }

/* the statement, on the night ground */
.ev-copy {
  position: absolute; z-index: 3;
  left: var(--frame); right: var(--frame); bottom: max(20px, 3svh);
  display: grid; gap: var(--space-3);
  color: var(--on-band);
}
.ev-copy .text-statement { max-width: 15ch; }
.ev-copy .text-lead { color: var(--on-band-muted); font-size: 16px; line-height: 24px; max-width: 52ch; }

/* wide screens: copy and stage side by side */
@media (min-width: 1100px) and (min-height: 640px) {
  .hero { height: 100vh; height: 100svh; padding: var(--bar-h) 0 0; background: transparent; display: flex; align-items: center; pointer-events: none; }
  .hero-copy { pointer-events: auto; max-width: calc(55vw - 170px - var(--frame)); }
  .hero h1 { font-size: clamp(52px, 4.8vw, 72px); line-height: 1; }
  .evening { margin-top: -100vh; margin-top: -100svh; }
  .ev-clock { font-size: min(15vw, 30svh); }
  .ev-copy { right: auto; bottom: auto; top: calc(50% + var(--bar-h) / 2); translate: 0 -50%; width: min(560px, 40vw); gap: var(--space-5); }
  .ev-copy .text-lead { font-size: 19px; line-height: 30px; }
}
@media (max-width: 699px) {
  .ev-copy .text-statement { font-size: 30px; line-height: 34px; }
}
@media (max-height: 700px) and (max-width: 1099px) {
  .ev-copy .text-statement { font-size: 26px; line-height: 30px; }
  .ev-copy .text-lead { font-size: 15px; line-height: 22px; }
}

/* ------------------------------------------------- morning -- */
.morning { position: relative; z-index: 2; }
.section.flush { padding-top: 0; }
.split { display: grid; gap: var(--space-5) var(--space-7); }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; align-items: start; } }
.head { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.head-wide { margin-bottom: var(--space-6); }

/* --------------------------------------------------- price -- */
.price-band { position: relative; z-index: 2; }
.price-note { font-size: 15px; line-height: 22px; }

/* ----------------------------------------------- questions -- */
.questions { background: var(--bg); color: var(--ink); position: relative; z-index: 2; }

/* --------------------------------------------------- close -- */
.closing { position: relative; z-index: 2; }
/* Copy on the left, the visitor's clock on the right: they never overlap. On phones the clock drops below the copy. */
.close-stage { position: relative; overflow: clip; display: flex; flex-direction: column; padding-top: var(--space-8); }
.close-inner { position: relative; z-index: 1; display: grid; gap: var(--space-5); width: 100%; }
.close-inner > * { max-width: 30rem; }
.close-inner .stack { display: grid; gap: var(--space-3); justify-items: start; }
.closing .address { font-size: 15px; line-height: 22px; color: var(--on-band-muted); }
.closing .address strong { color: var(--on-band); font-weight: 600; user-select: all; }
.close-now { color: var(--on-band-muted); }
.close-now .on { color: var(--lamp); }
.close-clock {
  order: 2; align-self: flex-end; margin: var(--space-6) var(--frame) -0.16em 0;
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: 30vw; letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
  color: var(--band-deep); pointer-events: none; user-select: none;
}
@media (min-width: 900px) {
  .close-stage { padding-block: 96px; }
  .close-clock { position: absolute; right: var(--frame); top: 50%; translate: 0 -50%; margin: 0; font-size: min(17vw, 230px); }
}
.site-footer { position: relative; z-index: 2; }

/* ------------------------------------- no scripts / reduced -- */
html:not(.js) .evening { margin-top: 0; }
html:not(.js) .hero { background: var(--bg); height: auto; padding-bottom: var(--space-8); }
html:not(.js) .ev-phone { position: relative; inset: auto; width: auto; max-width: 440px; height: auto; margin: calc(var(--bar-h) + 16px) auto 0; transform: none; }
html:not(.js) .ev-thread { -webkit-mask-image: none; mask-image: none; overflow: visible; }
html:not(.js) .ev-track { position: static; transform: none; }
html:not(.js) .ev-stage { position: relative; height: auto; padding-bottom: var(--space-8); }
html:not(.js) .ev-copy { position: relative; inset: auto; translate: none; width: auto; max-width: 1120px; margin: var(--space-7) auto 0; padding-inline: var(--frame); }
html:not(.js) .close-now { display: none; }
html:not(.js) :is([data-sc-cue], [data-sc-in], [data-sc-stagger] > *) { opacity: 1 !important; transform: none !important; }
