/* =========================================================
   Phigil — redesign 2026
   Monochrome, spacious, editorial. Single signal accent.
   ========================================================= */

:root {
  --ink:        #0B0B0C;   /* near-black */
  --ink-2:      #2A2A2D;
  --muted:      #6E6E73;   /* secondary text on paper */
  --line:       #E4E2DC;   /* hairlines on paper */
  --paper:      #FAFAF7;   /* warm white */
  --paper-2:    #F2F0EA;   /* subtle raised panel */
  --signal:     #FF4438;   /* the only accent — reserved for the flag */
  --on-dark-mut:#9A9A9E;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);

  --r: 14px;
  --r-lg: 22px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --f-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
strong { font-weight: 600; }

.mono { font-family: var(--f-mono); font-weight: 400; letter-spacing: 0; }
.nowrap { display: inline; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.section__title { font-size: clamp(30px, 5.2vw, 60px); max-width: 16ch; }
.section--cap .section__title, .section--dark .section__title { max-width: 20ch; }

.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--f-sans); font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  padding: 12px 22px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--solid { background: var(--bg); color: var(--fg); }
.btn--solid:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.link-quiet { color: var(--muted); font-size: 14px; transition: color .2s; }
.link-quiet:hover { color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 21px; letter-spacing: -0.04em;
}
.wordmark__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); display: inline-block; }
.wordmark--sm { font-size: 19px; }
.nav__links { display: flex; gap: 34px; }
.nav__links a { font-size: 15px; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__toggle { display: none; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--paper); padding: 110px var(--pad) 40px;
  transform: translateY(-100%); transition: transform .5s var(--ease);
  display: flex;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mobile-menu a { font-size: clamp(26px, 8vw, 38px); font-weight: 600; letter-spacing: -0.03em; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { font-size: 17px; margin-top: 26px; align-self: flex-start; border-bottom: none; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(130px, 18vh, 200px); padding-bottom: clamp(60px, 9vh, 120px); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 80px);
  align-items: center;
}
.hero__title {
  font-size: clamp(58px, 9.6vw, 124px); font-weight: 800; letter-spacing: -0.055em; line-height: 0.9;
  margin-bottom: 30px;
}
.hero__accent { color: var(--signal); }
.hero__lede { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); max-width: 40ch; margin-bottom: 38px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero__meta { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); }

/* live call screen — fixed height, no reflow */
.callscreen {
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto;
  height: clamp(440px, 60vh, 560px);
  background: var(--ink); color: var(--paper); border-radius: var(--r-lg);
  padding: 22px 22px 24px;
  box-shadow: 0 40px 80px -40px rgba(11,11,12,.55);
  transition: box-shadow .4s var(--ease);
}
.callscreen.is-flagged { box-shadow: 0 0 0 2px rgba(255,68,56,.5), 0 40px 80px -40px rgba(11,11,12,.55); }

.callscreen__status { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; letter-spacing: .06em; color: var(--on-dark-mut); }
.cs-live { display: inline-flex; align-items: center; gap: 8px; }
.livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

/* caller identity */
.callscreen__id { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.avatar { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.avatar__glyph { width: 42px; height: 42px; color: var(--on-dark-mut); position: relative; z-index: 1;
  background: rgba(255,255,255,.06); border-radius: 50%; padding: 12px; box-sizing: content-box;
  outline: 1px solid rgba(255,255,255,.12); transition: color .4s, background .4s; }
.avatar__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.18); }
.avatar__ring--2 { inset: -14px; border-color: rgba(255,255,255,.08); }
.callscreen.is-flagged .avatar__glyph { color: #fff; background: var(--signal); outline-color: var(--signal); }

.caller { font-size: clamp(18px, 1.9vw, 22px); font-weight: 600; letter-spacing: -0.02em; }
.caller__num { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--on-dark-mut); }
.spoof-tag {
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--signal); border: 1px solid var(--signal); border-radius: 100px; padding: 2px 8px;
  opacity: 0; transform: translateY(-2px); transition: opacity .35s, transform .35s;
}
.callscreen.is-flagged .spoof-tag { opacity: 1; transform: none; }

/* live transcript caption */
.callscreen__caption { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
.caption__label { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-mut); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq i { width: 2.5px; height: 4px; background: var(--on-dark-mut); border-radius: 2px; display: block; }
.caption__text { margin-top: 10px; height: 3.2em; font-size: 15px; line-height: 1.45; color: var(--paper); }
.caption__text .cap-who { color: var(--on-dark-mut); font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; }
.caption__text.is-flag { color: #fff; }
.caption__text.is-flag .cap-who { color: var(--signal); }

/* call controls */
.callscreen__controls { display: flex; justify-content: center; gap: 16px; }
.cc { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--paper); display: grid; place-items: center; cursor: default; padding: 0; }
.cc svg { width: 19px; height: 19px; }
.cc--end { background: var(--signal); border-color: var(--signal); color: #fff; }

/* system scam banner — drops over the top, no reflow */
.callscreen__alert {
  position: absolute; left: 14px; right: 14px; top: 14px; z-index: 3;
  display: flex; align-items: center; gap: 13px;
  background: var(--signal); color: #fff; border-radius: 12px; padding: 13px 15px;
  box-shadow: 0 18px 30px -16px rgba(255,68,56,.7);
  opacity: 0; transform: translateY(-120%);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.callscreen.is-flagged .callscreen__alert { opacity: 1; transform: none; }
.alert__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 700; }
.alert__title { font-weight: 600; font-size: 14.5px; }
.alert__sub { font-size: 11px; opacity: .92; margin-top: 2px; letter-spacing: .04em; }

/* ---------- bands ---------- */
.band { padding-block: clamp(80px, 13vh, 170px); }
.band--quiet { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statement {
  font-size: clamp(30px, 5.6vw, 70px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04;
  max-width: 22ch;
}
.statement__num { color: var(--ink); }
.statement__unit { color: var(--signal); }
.statement__tail { color: var(--muted); display: block; margin-top: .2em; }
.source { color: var(--muted); font-size: 12px; margin-top: 26px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 13vh, 170px); }
.section__head { margin-bottom: clamp(46px, 7vh, 84px); }
.section__head--left { max-width: none; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.step { border-top: 1px solid var(--ink); padding-top: 26px; }
.step__no { display: block; color: var(--signal); font-size: 13px; margin-bottom: 26px; }
.step h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 14px; }
.step p { color: var(--muted); font-size: 16px; max-width: 34ch; }

/* capability cards */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  grid-column: span 2; background: var(--paper-2); border-radius: var(--r-lg);
  padding: clamp(26px, 2.6vw, 38px); display: flex; flex-direction: column;
  border: 1px solid transparent; transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card--lead { grid-column: span 6; background: var(--ink); color: var(--paper); }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.card__idx { color: var(--muted); font-size: 12px; }
.card--lead .card__idx { color: var(--on-dark-mut); }
.tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); border: 1px solid var(--signal); padding: 4px 10px; border-radius: 100px; }
.card__title { font-size: clamp(20px, 2vw, 26px); margin-bottom: 14px; letter-spacing: -0.03em; }
.card--lead .card__title { font-size: clamp(26px, 3.4vw, 40px); max-width: 18ch; }
.card__body { color: var(--muted); font-size: 16px; }
.card--lead .card__body { color: var(--on-dark-mut); max-width: 58ch; font-size: 17px; }
.card__list { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; font-size: 12.5px; color: var(--paper); }
.card__list li { position: relative; padding-left: 16px; }
.card__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

/* platform (dark) */
.section--dark { background: var(--ink); color: var(--paper); border-radius: clamp(24px, 3vw, 40px); margin-inline: clamp(8px, 1.5vw, 20px); }
.section--dark .eyebrow { color: var(--on-dark-mut); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(36px, 5vw, 72px) clamp(40px, 6vw, 96px); }
.spec { border-top: 1px solid rgba(255,255,255,.18); padding-top: 26px; }
.spec h3 { font-size: clamp(20px, 2.2vw, 27px); margin-bottom: 12px; }
.spec p { color: var(--on-dark-mut); max-width: 42ch; }

/* stats */
.band--stats { border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat__num { font-size: clamp(42px, 6vw, 82px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.stat__suf { color: var(--signal); }
.stat__lbl { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }

/* faq */
.faq__wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.faq { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 26px 40px 26px 0; position: relative;
  font-size: clamp(18px, 2vw, 23px); font-weight: 500; letter-spacing: -0.02em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-weight: 400; font-size: 26px; color: var(--muted); transition: transform .3s var(--ease);
}
.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa p { color: var(--muted); max-width: 60ch; padding-bottom: 28px; }

/* cta */
.cta { padding-block: clamp(90px, 15vh, 200px); }
.cta__inner { max-width: 760px; }
.cta__title { font-size: clamp(34px, 6vw, 74px); letter-spacing: -0.045em; line-height: 1; margin-bottom: 22px; }
.cta__lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); margin-bottom: 48px; max-width: 46ch; }
.cta__form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  font-family: var(--f-sans); font-size: 17px; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 10px 2px; transition: border-color .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field textarea { resize: vertical; }
.cta__form .btn { grid-column: 1 / -1; justify-self: start; }
.cta__note { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 13px; color: var(--signal); min-height: 1em; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 8vh, 96px); padding-bottom: 40px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: clamp(36px, 5vw, 80px); padding-bottom: 56px; }
.footer__tag { color: var(--muted); margin-top: 16px; max-width: 26ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer__cols h4 { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 18px; }
.footer__cols a { display: block; color: var(--ink-2); padding: 6px 0; font-size: 15px; transition: color .2s; }
.footer__cols a:hover { color: var(--ink); }
.footer__base { border-top: 1px solid var(--line); padding-top: 28px; color: var(--muted); font-size: 12px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 980px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 6px; justify-content: center;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0;
  }
  .nav__toggle span { display: block; height: 2px; width: 24px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__demo { max-width: 460px; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { border-top: 1px solid var(--line); padding-block: 32px; }
  .step:first-child { border-top-color: var(--ink); }
  .step p { max-width: none; }

  .cards { grid-template-columns: 1fr; }
  .card, .card--lead { grid-column: 1 / -1; }
  .specs { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 44px 24px; }
  .faq__wrap { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .cta__form { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .br-d { display: none; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .callcard__feed { min-height: 200px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .livedot, .wave span, .bubble, .callcard__alert { animation: none !important; }
}
