/* Keely & Keeley — site styles
   VOICE   an essay read slowly at dusk, warm and a little strange
   IDEA    one moonlit world the reader walks through; the text is a printed essay laid over it
   PICTURE the stitched pixel ampersand, small, like a firefly
   COLOUR  moonlit blues; Soft Moon glow; Night ink at morning
   TYPE    CS Boris (headers, pull-lines) + Eloquia (body, statements), sized to match the Canva layout */

@font-face { font-family: "Eloquia Text"; src: url("fonts/eloquia-text-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Eloquia Text"; src: url("fonts/eloquia-text-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Eloquia Text"; src: url("fonts/eloquia-text-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Eloquia Text"; src: url("fonts/eloquia-text-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Eloquia Display"; src: url("fonts/eloquia-display-light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Eloquia Display"; src: url("fonts/eloquia-display-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "CS Boris"; src: url("fonts/csboris-regular-webfont.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "CS Boris"; src: url("fonts/csboris-italic-webfont.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --soft-moon: #E5E196;
  --moon-cream: #F1EEDC;
  --velvet-navy: #161C6F;
  --night-ink: #1B2142;
  --mist: #B8C7DC;
  --lilac: #BBB1D3;
  --moonflower: #DDA9AE;
  --dawn: #DDB496;

  --serif: "CS Boris", Georgia, serif;
  --sans: "Eloquia Text", system-ui, sans-serif;
  --display: "Eloquia Display", "Eloquia Text", system-ui, sans-serif;

  --edge: clamp(24px, 17vw, 260px);      /* the essay's left edge, as in Canva */
  --sub: clamp(0px, 2.9vw, 44px);        /* body indent under & headers */
  --col: 60ch;
  --body: clamp(18px, 1.98vw, 30px);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: #1a2a4a; color: var(--moon-cream);
  font-family: var(--sans); font-size: var(--body); line-height: 1.2; letter-spacing: .012em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
a { color: inherit; }
p { margin: 0 0 .9em; text-wrap: pretty; }
h2, .thesis, .h3 { text-wrap: balance; }
strong, b { font-weight: 700; }

/* ---------- background stack ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #1a2a4a; }
.bg-layer { position: absolute; inset: -1.5%; background-size: cover; background-position: center; opacity: 0; will-change: opacity, filter, transform; }
.bg-layer.is-on { opacity: 1; }
.tint { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 45% 45%, rgba(12,16,48,0) 45%, rgba(12,16,48,.32) 100%); }
.grain { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: url("img/grain.png"); opacity: .5; mix-blend-mode: soft-light; }
main { position: relative; z-index: 3; text-shadow: 0 1px 18px rgba(10,14,40,.28); }
.morning, body.is-morning main .morning { text-shadow: none; }

/* ---------- glyphs ---------- */
.glyph { display: inline-block; vertical-align: middle; line-height: 0; }
.glyph svg { display: block; shape-rendering: crispEdges; }
.glyph rect { fill: currentColor; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  font-size: 14px; letter-spacing: .02em; color: var(--mist);
  transition: background .6s ease, color .6s ease;
}
.nav.is-scrolled { background: rgba(22,28,111,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav a { text-decoration: none; }
.nav-name { display: inline-flex; align-items: center; gap: 5px; font-family: var(--serif); font-size: 21px; line-height: 1; color: var(--mist); opacity: 0; transform: translateY(-4px); transition: opacity .8s ease, transform .8s ease; }
.nav-name .na { height: 1.35em; width: auto; color: var(--soft-moon); transform: translateY(6%); }
.nav.is-scrolled .nav-name, .nav-name.always { opacity: 1; transform: none; }
body.is-morning .nav-name .na { color: var(--night-ink); }
.nav-links { display: flex; gap: clamp(16px, 2.4vw, 34px); align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; opacity: .85; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; }
.nav-links a.is-active::before { content: ""; position: absolute; left: -11px; top: 50%; width: 4px; height: 4px; margin-top: -2px; background: var(--soft-moon); }
.nav-cta { color: var(--soft-moon); border: 1px solid currentColor; border-radius: 999px; padding: 6px 14px; opacity: 1 !important; }
.nav-cta.is-active::before { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; color: var(--soft-moon); cursor: pointer; }
.nav-toggle .tog { display: block; height: 34px; width: auto; }
body.is-morning .nav, body.is-morning .nav-name, body.is-morning .nav-cta { color: var(--night-ink); }
body.is-morning .nav.is-scrolled { background: rgba(226,231,242,.45); }
body.is-morning .nav-links a.is-active::before { background: var(--night-ink); }

/* ---------- sections ---------- */
section { position: relative; padding: clamp(64px, 10vh, 110px) var(--edge) clamp(44px, 7vh, 80px); }
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 24px; }
.col { max-width: 1120px; }
.col > p, .col > .sub > p { max-width: var(--col); }

/* ---------- type ---------- */
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 66px); line-height: 1; color: var(--soft-moon); margin: 0 0 .25em; letter-spacing: -.01em; max-width: 16em; }
.thesis { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.9vw, 74px); line-height: 1.02; color: var(--lilac); margin: 0 0 .28em; }
.statement { font-family: var(--display); font-size: clamp(30px, 3.6vw, 54px); line-height: 1.08; margin: .7em 0 0; color: var(--moon-cream); }
.statement span { display: block; }
.statement .light { font-weight: 300; }
.statement .bold { font-weight: 700; }
.stack span { display: block; }

/* sub-section headers: lowercase Boris with the & beside them */
.h3 { display: flex; align-items: center; gap: .3em; margin: 0 0 .12em; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 2.95vw, 44px); line-height: 1; color: var(--moon-cream); }
.h3 .mark { flex: none; width: auto; height: 1.15em; color: var(--soft-moon); margin-top: -.08em; }
.sub { padding-left: var(--sub); }
.sub + .h3, .sub + .block { margin-top: 1.2em; }
.block + .block { margin-top: 4.2em; }

/* a guest's eye view: a different kind of offer, held in a veil of its own */
.veiled {
  position: relative; max-width: 42em;
  margin-left: -1.5em; padding: 1.3em 1.6em 1.4em;
  background: var(--veil, rgba(241,238,220,.10));
  border: 1px solid var(--veil-edge, rgba(241,238,220,.16));
  border-radius: 6px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.veiled .sub > p { max-width: none; }
/* same rhythm across the when → how seam as between the how-we-work blocks */
#when { padding-top: clamp(60px, 10vh, 110px); padding-bottom: 0; }
#threshold { padding-bottom: clamp(120px, 24vh, 240px); }
#how { padding-bottom: clamp(140px, 30vh, 300px); }
#how { padding-top: 4.2em; }

/* pacing: let each passage have its own scroll time */
.breathe { padding-top: clamp(100px, 18vh, 190px); padding-bottom: clamp(70px, 12vh, 140px); }
.breathe .col > p { margin-bottom: 1.25em; }
.breathe .pull { margin: 1.7em 0 1.8em; }
.breathe .statement { margin-top: 1.5em; }
.moment { min-height: 88vh; display: flex; align-items: center; padding-top: 12vh; padding-bottom: 10vh; }
.moment .col { width: 100%; }
.col > :last-child, .sub > :last-child, .block > :last-child { margin-bottom: 0; }
.h3 + .sub { margin-top: .3em; }

/* pull-lines: foggy, then clear */
.pull {
  position: relative; margin: .5em 0 .55em;
  font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3.15vw, 47px); line-height: 1.1; color: var(--soft-moon);
}
.pull span { display: block; }
.pull.indent { margin-left: clamp(40px, 15vw, 210px); }
.pull .sparkmark { position: absolute; left: -1.45em; top: .12em; width: 1em; height: 1em; --lo: .55; color: var(--soft-moon); }
.pull .sparkmark .glyph { position: absolute; }
.pull .sparkmark .s1 { left: 0; top: 0; }
.pull .sparkmark .s2 { left: .45em; top: .34em; }
.pull .sparkmark .s3 { left: .08em; top: .7em; }

/* text rises out of the fog and dissolves again, both driven by scroll (site.js) */
.rv { opacity: var(--op, 1); transform: translateY(calc(var(--fy, 0) * 16px)); filter: blur(calc(var(--fy, 0) * 5px)); will-change: opacity, transform; }
.pull.rv { filter: blur(calc(var(--fy, 0) * 10px)); }
.hero .lockup, .hero .tagline { animation: arrive 1.6s ease both; }
.hero .tagline { animation-delay: .5s; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); filter: blur(5px); } }

/* ---------- hero ---------- */
.lockup { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1vw, 14px); margin: 0; }
.lockup .name { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.8vw, 80px); color: var(--mist); line-height: 1; }
.lockup .amp { color: var(--soft-moon); transform: translateY(8%); }
.label { display: flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 .3em; }
.tagline { margin: clamp(22px, 4vh, 40px) 0 0; font-size: clamp(17px, 1.9vw, 26px); color: var(--mist); text-shadow: none; }
.cue { position: absolute; left: 50%; bottom: clamp(18px, 5vh, 48px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--soft-moon); text-decoration: none; }
.cue .glyph:nth-child(1) { opacity: .95; }
.cue .glyph:nth-child(2) { opacity: .7; transform: translateX(-6px); }
.cue .glyph:nth-child(3) { opacity: .45; transform: translateX(4px); }

.amp rect { opacity: 0; transition: opacity .35s ease; }
.amp.is-stitched rect { opacity: 1; }
.amp rect.tw { animation: tw 1.6s ease-in-out; }
@keyframes tw { 0%,100% { opacity: 1; } 45% { opacity: .25; } }
.spark { animation: spark var(--d, 2.6s) ease-in-out infinite; animation-delay: var(--o, 0s); }
@keyframes spark { 0%,100% { opacity: var(--lo, .35); } 50% { opacity: var(--hi, 1); } }

/* ---------- when to call us ---------- */
.calls p { margin-bottom: 2em; max-width: 62ch; }
.aside { display: flex; gap: 8px; align-items: flex-start; font-style: italic; font-size: max(14px, .64em); line-height: 1.25; max-width: 72ch; opacity: .9; }
.aside .glyph { color: var(--soft-moon); margin-top: .45em; }

/* ---------- encounters ---------- */
.rows { display: grid; gap: 2.4em; }
.row { display: grid; grid-template-columns: minmax(150px, 10.6em) minmax(0, 1fr); gap: clamp(16px, 3vw, 44px); max-width: 40em; }
.sub > p { max-width: 37em; }
.airy { line-height: 1.45; max-width: 44ch; }
.row .name { font-weight: 700; }

/* ---------- morning ---------- */
.morning, .morning h2, .morning .statement, .morning .pull, .morning .h3 { color: var(--night-ink); }
.morning h2 { font-size: clamp(40px, 4.9vw, 74px); }
.morning .lead { font-size: var(--body); line-height: 1.45; max-width: 48ch; }
.morning .about { font-size: clamp(17px, 1.75vw, 26px); max-width: 74ch; }
.morning .about p { max-width: none; }
.trio { display: flex; flex-direction: column; gap: 10px; margin: 1.1em 0 1.3em; color: var(--night-ink); }
.trio .glyph:nth-child(2) { transform: translateX(-4px); opacity: .8; }
.trio .glyph:nth-child(3) { transform: translateX(3px); opacity: .6; }
.summon { display: inline-flex; align-items: center; gap: 12px; margin-top: 1em; padding: 15px 26px 15px 28px; border-radius: 999px; background: var(--night-ink); color: var(--moon-cream); font-weight: 500; font-size: clamp(16px, 1.3vw, 19px); letter-spacing: .02em; text-decoration: none; box-shadow: 0 6px 22px rgba(27,33,66,.18); transition: background .3s, gap .3s, transform .3s; }
.summon:hover { background: var(--velvet-navy); gap: 16px; transform: translateY(-1px); }
.signature { display: block; width: clamp(200px, 21vw, 300px); margin: 1.4em 0 0 -8px; opacity: .94; }
.foot { margin-top: 2em; font-size: 13px; opacity: .7; }

/* ---------- margin thread ---------- */
.thread { position: fixed; left: clamp(14px, 3vw, 44px); top: 16vh; bottom: 10vh; width: 40px; z-index: 4; pointer-events: none; color: var(--mist); }
.thread svg { display: block; }
.thread rect { fill: currentColor; opacity: 0; transition: opacity .6s ease; }
.thread rect.on, .thread g.on rect { opacity: .6; }
body.is-morning .thread { color: var(--night-ink); }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  br.d { display: none; }
  .nav-links { display: none; position: fixed; inset: 0; z-index: 20; flex-direction: column; justify-content: center; gap: 28px; background: rgba(22,28,111,.9); backdrop-filter: blur(12px); font-size: 19px; color: var(--moon-cream); }
  .nav.is-open .nav-links { display: flex; }
  .nav-toggle { display: block; position: relative; z-index: 30; }
  section { padding: 96px 24px 72px; }
  .sub { padding-left: 0; }
  .veiled { margin-left: -14px; margin-right: -14px; padding: 1.1em 14px 1.2em; }
  .moment { min-height: 90vh; }
  .breathe { padding-top: 120px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .pull.indent { margin-left: 44px; }
  .pull .sparkmark { left: -1.3em; }
  .thread { display: none; }
  body { line-height: 1.38; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .amp rect { opacity: 1; transition: none; }
  .spark, .amp rect.tw { animation: none; }
  .rv { opacity: 1; filter: none; transform: none; }
  .hero .lockup, .hero .tagline { animation: none; }
}
