/* Skyscribe Assist
   Palette taken from the logo stamp and the reference images. */
:root {
  --night: #0A1430;      /* deep sky in the reference images */
  --night-2: #0F1C40;
  --navy: #1B2A5C;       /* logo ink */
  --gold: #E8C35A;       /* logo stamp */
  --gold-soft: #C9A74A;
  --paper: #F3E3A2;      /* stamp paper, used for the demo document */
  --paper-ink: #17224A;
  --text: #EEF0F6;
  --text-dim: #B4BCD3;
  --rule: rgba(232, 195, 90, 0.22);

  --display: "Saira", "Arial Narrow", sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--gold); color: var(--night); padding: .75rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ---------- Stamp: recreates the perforated edge of the logo ---------- */
.stamp {
  --r: 5px;
  display: inline-block;
  padding: calc(2 * var(--r));
  background: #FBF7EA;
  -webkit-mask:
    radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
          mask:
    radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
}
.stamp--mini { --r: 2px; width: 4.25rem; }
.stamp--foot { --r: 5px; width: min(17rem, 70vw); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .8rem 1.4rem;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none; border-radius: 4px; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--gold { background: var(--gold); color: var(--night); }
.btn--gold:hover { background: #F2D27A; }
.btn--ghost { border-color: rgba(232, 195, 90, .6); color: var(--gold); }
.btn--ghost:hover { border-color: var(--gold); background: rgba(232, 195, 90, .08); }
.btn--quiet { background: none; border-color: var(--rule); color: var(--text-dim); font-size: .9375rem; min-height: 2.75rem; }
.btn--quiet:hover { color: var(--gold); border-color: var(--gold); }
.btn--sm { min-height: 2.75rem; padding: .6rem 1.1rem; font-size: .9375rem; }
.cta-pair { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 20, 48, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(232, 195, 90, .12);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand__name { font: italic 800 1.25rem/1 var(--display); letter-spacing: -.01em; color: var(--gold); }
.nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.link-phone { color: var(--text); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.link-phone:hover { color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 62rem); display: flex; overflow: hidden; isolation: isolate; }
/* Phones and tablets: text on the empty sky, photo as a full-width band beneath it */
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--night) 0%, rgba(10,20,48,0) 18%),
    url("assets/ref-2.jpg") center bottom / 100% auto no-repeat,
    var(--night);
}
.hero__content { padding-top: clamp(3rem, 10vh, 6rem); padding-bottom: 62vw; }

/* Desktop: text on the left, photo anchored right so the desk-to-site line reads */
@media (min-width: 1024px) {
  .hero { min-height: min(100svh, 56rem); }
  .hero__bg {
    background:
      linear-gradient(90deg, var(--night) 0%, var(--night) 34%, rgba(10,20,48,.6) 46%, rgba(10,20,48,0) 62%),
      url("assets/ref-2.jpg") right bottom / auto 100% no-repeat,
      var(--night);
  }
  .hero__content { padding-top: clamp(4rem, 12vh, 8rem); padding-bottom: 6rem; }
}
.hero__place { color: var(--gold); font-weight: 500; margin-bottom: 1.25rem; }
.hero h1 {
  font-style: italic; font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 5.25rem);
  letter-spacing: -.02em; line-height: .98;
  max-width: 14ch;
  color: #FFFFFF;
}
.hero__lede { margin: 1.75rem 0 2.25rem; max-width: 36rem; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section); }
.section h2 {
  font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.25rem);
  letter-spacing: -.015em; max-width: 20ch;
}
.intro { margin-top: 1.25rem; max-width: 40rem; color: var(--text-dim); font-size: 1.125rem; }

.section--grid { background: var(--night-2) url("assets/ref-3.jpg") center / cover; }
.section--demo { background: var(--night); }
.section--network {
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(10,20,48,.75) 55%, rgba(10,20,48,.35) 100%),
    url("assets/ref-5.jpg") center / cover;
}
.section--steel { background: #0B1633 url("assets/ref-4.jpg") center / cover; }
.section--ready { background: var(--night-2); border-top: 1px solid var(--rule); }

/* ---------- Compare (what takes the most time) ---------- */
.compare { margin-top: 3rem; border-top: 1px solid var(--rule); }
.compare__head, .compare__row {
  display: grid; grid-template-columns: 13rem 1fr 1fr; gap: 2rem;
  padding-block: 1.75rem; border-bottom: 1px solid var(--rule);
}
.compare__head { padding-block: 1rem; color: var(--text-dim); font-size: .9375rem; font-weight: 500; }
.compare__head span:last-child { color: var(--gold); }
.compare__row h3 { font-size: 1.5rem; font-weight: 700; color: #FFFFFF; }
.compare__row p { color: var(--text-dim); max-width: 34ch; }
.compare__row p:last-child { color: var(--text); }

/* ---------- Demo ---------- */
.demo { margin-top: 3rem; display: grid; grid-template-columns: minmax(0, 5fr) 3rem minmax(0, 7fr); align-items: start; gap: 1.5rem; }
.demo figure { margin: 0; }
.demo__notes figcaption { color: var(--text-dim); font-size: .9375rem; margin-bottom: .75rem; }
.demo__notes pre {
  margin: 0; padding: 1.5rem;
  white-space: pre-wrap; word-break: break-word;
  font: 400 1rem/1.75 "Instrument Sans", sans-serif;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px dashed rgba(180, 188, 211, .35);
  border-radius: 4px;
  transform: rotate(-1deg);
}
.demo__arrow { align-self: center; height: 2px; background: var(--gold); position: relative; box-shadow: 0 0 12px rgba(232,195,90,.7); }
.demo__arrow::before, .demo__arrow::after {
  content: ""; position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: #FFE7A0; transform: translateY(-50%); box-shadow: 0 0 14px 3px rgba(232,195,90,.8);
}
.demo__arrow::before { left: -5px; }
.demo__arrow::after { right: -5px; }

.doc {
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: 2px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(23,34,74,.15) inset;
  font-size: .9688rem;
}
.doc__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--paper-ink); }
.doc__logo { border: 1.5px dashed rgba(23,34,74,.45); padding: .35rem .75rem; font-size: .8125rem; color: rgba(23,34,74,.7); }
.doc__title { font: italic 800 1.375rem/1 var(--display); }
.doc__to { margin: 1rem 0; }
.doc__lines { list-style: none; margin: 0; padding: 0; }
.doc__lines li { display: flex; justify-content: space-between; gap: 1.5rem; padding: .6rem 0; border-bottom: 1px solid rgba(23,34,74,.18); }
.doc__lines li span:last-child, .doc__total span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.doc__total { display: flex; justify-content: space-between; padding-top: 1rem; font-weight: 600; font-size: 1.125rem; }
.doc__note { margin-top: 1rem; font-size: .875rem; color: rgba(23,34,74,.75); }

.demo__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.demo__caption { color: var(--text-dim); font-size: .9375rem; }

/* Writing animation (only when JS + motion allowed) */
.doc.is-writing .doc__to,
.doc.is-writing .doc__lines li,
.doc.is-writing .doc__total,
.doc.is-writing .doc__note { opacity: 0; }
.doc .is-shown { opacity: 1 !important; transition: opacity .35s ease; }
.doc .is-current { box-shadow: inset 3px 0 0 var(--gold-soft); padding-left: .6rem; transition: padding .2s ease; }

/* ---------- Services ---------- */
.services { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.service { padding: 2rem 2rem 2rem 0; }
.service + .service { padding-left: 2rem; border-left: 1px solid var(--rule); }
.service h3 { font-size: 1.5rem; color: var(--gold); margin-bottom: .75rem; }
.service p { color: var(--text-dim); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 1.4rem; left: 1.4rem; right: 0; height: 1px; background: var(--rule); }
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  margin-bottom: 1.5rem; position: relative;
  background: var(--night); border: 1.5px solid var(--gold); color: var(--gold);
  font: italic 800 1.25rem/1 var(--display);
}
.steps h3 { font-size: 1.375rem; margin-bottom: .6rem; color: #FFFFFF; }
.steps p { color: var(--text-dim); }

/* ---------- Ready ---------- */
.ready { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: end; }
.ready__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.ready__list li { padding-left: 1.25rem; border-left: 2px solid var(--gold); color: var(--text-dim); max-width: 38rem; }
.ready__list strong { display: block; color: #FFFFFF; font-weight: 600; font-size: 1.125rem; }
.ready__cta { display: flex; flex-direction: column; gap: .75rem; }

/* ---------- Closing ---------- */
.closing { position: relative; min-height: clamp(34rem, 60vw, 48rem); display: flex; align-items: flex-start; overflow: hidden; isolation: isolate; }
.closing__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--night) 0%, rgba(10,20,48,.6) 40%, rgba(10,20,48,0) 70%),
    linear-gradient(90deg, rgba(10,20,48,.7) 0%, rgba(10,20,48,0) 45%),
    url("assets/ref-1.jpg") center bottom / cover no-repeat;
}
.closing__content { padding-block: var(--section); }
.closing h2 { font-style: italic; font-weight: 800; font-size: clamp(2.25rem, 5vw, 4rem); max-width: 12ch; margin-bottom: 2rem; letter-spacing: -.02em; }

/* ---------- Footer ---------- */
.footer { background: #070F26; padding-block: 3.5rem 6rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.footer__text { display: grid; gap: .35rem; color: var(--text-dim); }
.footer__text a { color: var(--gold); text-decoration: none; font-weight: 500; }
.footer__small { font-size: .875rem; }

.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .compare__head { display: none; }
  .compare__row { grid-template-columns: 1fr; gap: .75rem; }
  .compare__row p { max-width: none; }
  .compare__row p::before { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .2rem; }
  .compare__row p:nth-of-type(1)::before { content: "Today"; color: var(--text-dim); }
  .compare__row p:nth-of-type(2)::before { content: "With a system"; color: var(--gold); }

  .demo { grid-template-columns: 1fr; }
  .demo__arrow { width: 2px; height: 2.5rem; justify-self: center; }
  .demo__arrow::before { left: 50%; top: -5px; transform: translateX(-50%); }
  .demo__arrow::after { left: 50%; top: auto; bottom: -5px; right: auto; transform: translateX(-50%); }

  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 1.75rem 0; border-left: 0; }
  .service + .service { border-top: 1px solid var(--rule); }

  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps::before { display: none; }

  .ready { grid-template-columns: 1fr; align-items: start; }
  .ready__cta { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .link-phone { display: none; }
  .nav .btn { display: none; }
  .brand__name { font-size: 1.125rem; }
  .hero .cta-pair .btn { flex: 1 1 100%; }
  .steps { grid-template-columns: 1fr; }
  .ready__cta .btn, .closing .btn { flex: 1 1 100%; }
  .doc__lines li { font-size: .875rem; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 2fr; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .625rem 1rem calc(.625rem + env(safe-area-inset-bottom));
    background: rgba(7, 15, 38, .94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
