/* ============================================================
   Christchurch Web Solutions — landing page
   Art direction: the nautical chart. Warm chart-paper, ink navy,
   brand deep blue #0069a5, mint as the shallow-water tint.
   ============================================================ */

:root {
  --paper: #f5efe2;
  --paper-2: #fbf7ec;
  --card: #fdfaf1;
  --ink: #16263d;
  --muted: #51617a;
  --faint: #8b97a8;
  --line: rgba(22, 38, 61, 0.13);
  --line-strong: rgba(22, 38, 61, 0.30);
  --deep: #0069a5;
  --deep-dark: #00578b;
  --mint: #8ce8d4;
  --seagreen: #0d8a64;
  --night: #102137;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.005em;
}
h4 {
  font-family: var(--font-body);
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: rgba(0, 105, 165, 0.18); }

/* paper grain — barely there */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.04;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="180" height="180" filter="url(%23n)"/></svg>');
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--deep);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* ---------- shared bits ---------- */

.serif-i {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--deep);
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep);
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease);
}
.btn--primary {
  background: var(--deep);
  color: #fdfaf2;
  box-shadow: 0 10px 26px -12px rgba(0, 105, 165, 0.55);
}
.btn--primary:hover {
  background: var(--deep-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(0, 105, 165, 0.6);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--deep);
  background: rgba(0, 105, 165, 0.05);
  transform: translateY(-2px);
}
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px;
}

/* hand-drawn underline */
.squig {
  position: relative;
  display: inline-block;
  color: var(--deep);
}
.squig svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  width: 100%;
  height: 10px;
  overflow: visible;
}
.squig path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
}
.is-visible .squig path {
  animation: draw 0.9s 0.5s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ NAV ============ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(245, 239, 226, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(245, 239, 226, 0.92);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo img { height: 30px; width: auto; }
.nav__links {
  display: flex;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.nav__links a { transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--ink); }

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px 24px 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__bg svg {
  width: 100%;
  height: 100%;
}

.hero__inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
.hero__inner > .eyebrow,
.hero__inner > .hero__title,
.hero__inner > .hero__sub,
.hero__inner > .hero__cta {
  grid-column: 1;
}
.hero__chart { grid-column: 2; grid-row: 1 / span 4; }

.hero__title {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 600;
  margin-bottom: 26px;
}
.hero__sub {
  max-width: 540px;
  font-size: 17.5px;
  color: var(--muted);
  margin-bottom: 38px;
}
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* the chart card */
.chart-card {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 30px 70px -32px rgba(22, 38, 61, 0.45),
              0 4px 14px -8px rgba(22, 38, 61, 0.18);
}
.chart-card svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-route {
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
}
.is-visible .chart-route {
  animation: draw-route 2.2s 0.5s var(--ease) forwards;
}
@keyframes draw-route { to { stroke-dashoffset: 0; } }
.wp {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.is-visible .wp--0 { opacity: 1; transition-delay: 0.4s; }
.is-visible .wp--1 { opacity: 1; transition-delay: 1.1s; }
.is-visible .wp--2 { opacity: 1; transition-delay: 1.5s; }
.is-visible .wp--3 { opacity: 1; transition-delay: 1.9s; }
.is-visible .wp--4 { opacity: 1; transition-delay: 2.5s; }

/* ============ STATS ============ */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.stat__num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--deep);
  min-width: 86px;
}
.stat__label {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 210px;
  line-height: 1.45;
}

/* ============ SECTIONS ============ */

.section {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 130px 24px 0;
}
.section--tight { padding-top: 110px; }
.section__head {
  max-width: 640px;
  margin-bottom: 60px;
}
.section__head h2 {
  font-size: clamp(30px, 3.4vw, 42px);
}
.section__sub {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
}

/* ---------- services ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  padding: 30px 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 105, 165, 0.45);
  box-shadow: 0 20px 44px -24px rgba(22, 38, 61, 0.3);
}
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--deep);
  background: rgba(0, 105, 165, 0.08);
  border: 1px solid rgba(0, 105, 165, 0.2);
  transition: transform 0.35s var(--ease);
}
.card:hover .card__icon { transform: rotate(-7deg) scale(1.08); }
.card__icon svg { width: 22px; height: 22px; }
.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- stack marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 8px 0 14px;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: scroll 36s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll {
  to { transform: translateX(-50%); }
}
.marquee__list {
  display: flex;
  gap: 14px;
  padding: 0 7px;
  margin: 0;
  list-style: none;
}
.marquee__list li {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 13px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.marquee__list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--deep);
}
.marquee__list li:last-child { color: var(--faint); }
.marquee__list li:last-child::before { background: var(--faint); }

/* ---------- note from the studio (the dark moment) ---------- */

.note {
  margin-top: 120px;
  background: var(--night);
  color: #f1e9d8;
  padding: 104px 24px 112px;
}
.note__inner {
  max-width: 800px;
  margin: 0 auto;
}
.note .eyebrow { color: var(--mint); }
.note__nodes {
  display: flex;
  gap: 12px;
  margin-bottom: 34px;
}
.note__nodes span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid;
}
.note__nodes span:nth-child(1) { border-color: #3da4dc; }
.note__nodes span:nth-child(2) { border-color: #8ce8d4; }
.note__nodes span:nth-child(3) { border-color: #84e5ed; }
.note__nodes span:nth-child(4) { border-color: #80cff3; }
.note__nodes span:nth-child(5) { border-color: #8099b1; }
.note__text p {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 450;
  line-height: 1.55;
  margin-bottom: 1.1em;
}
.note__text p:last-child { margin-bottom: 0; }
.note .hl {
  background: linear-gradient(transparent 58%, rgba(140, 232, 212, 0.3) 58%);
  padding: 0 2px;
}
.note__sig {
  margin-top: 36px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  color: var(--mint);
}

/* ---------- process / passage plan ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 16px;
  right: 16px;
  border-top: 2px dashed rgba(0, 105, 165, 0.35);
}
.step {
  position: relative;
  padding: 0 24px 0 0;
}
.step__num {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--deep);
  background: var(--paper);
  color: var(--deep);
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.step h3 {
  font-size: 21px;
  margin: 18px 0 10px;
}
.step p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ============ CONTACT ============ */

.section--contact {
  padding-bottom: 140px;
}

.contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
}

/* mad-libs form */
.brief-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 38px;
  box-shadow: 0 18px 44px -28px rgba(22, 38, 61, 0.3);
}
.brief-form__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 30px;
  border: 0;
  padding: 0;
}
.brief-form__line legend {
  padding: 0;
  margin-bottom: 14px;
  float: left;
  width: 100%;
}
.brief-form input[type="text"],
.brief-form input[type="email"] {
  flex: 1 1 180px;
  min-width: 150px;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  padding: 4px 2px 7px;
  transition: border-color 0.25s var(--ease);
}
.brief-form input::placeholder { color: #a8b0bd; font-weight: 400; font-style: italic; }
.brief-form input:focus {
  outline: none;
  border-bottom-color: var(--deep);
}
.brief-form input.is-filled { border-bottom-color: rgba(0, 105, 165, 0.55); }

.brief-form__chips label { cursor: pointer; }
.brief-form__chips input { position: absolute; opacity: 0; pointer-events: none; }
.brief-form__chips span {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.22s var(--ease);
}
.brief-form__chips label:hover span {
  border-color: var(--deep);
  color: var(--ink);
}
.brief-form__chips input:checked + span {
  background: var(--deep);
  border-color: var(--deep);
  color: #fdfaf2;
  box-shadow: 0 0 0 3px rgba(0, 105, 165, 0.14);
}
.brief-form__chips input:focus-visible + span {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

.brief-form__line--area {
  display: block;
  font-size: 15px;
}
.brief-form__line--area label {
  display: block;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 10px;
}
.brief-form textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}
.brief-form textarea::placeholder { color: #a8b0bd; }
.brief-form textarea:focus {
  outline: none;
  border-color: var(--deep);
}

.brief-form__error {
  color: #b3261e;
  font-size: 14px;
  margin-bottom: 16px;
}

.btn--submit {
  width: 100%;
  position: relative;
  margin-top: 4px;
}
.btn__check {
  width: 20px;
  height: 20px;
  display: none;
}
.btn--submit.is-done .btn__label { display: none; }
.btn--submit.is-done .btn__check { display: block; }
.btn--submit.is-done {
  background: var(--seagreen);
  pointer-events: none;
}
.brief-form__note {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ticket / live preview */
.ticket {
  position: sticky;
  top: 100px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 24px 56px -30px rgba(22, 38, 61, 0.4);
  overflow: hidden;
}
.ticket::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--deep);
  opacity: 0.85;
}
.ticket__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.ticket__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--deep);
  text-transform: lowercase;
}
.ticket__status.is-received { color: var(--seagreen); }
.ticket__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.ticket__rows {
  margin: 0;
  display: grid;
  gap: 13px;
}
.ticket__rows > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--line-strong);
}
.ticket__rows dt {
  font-size: 12.5px;
  color: var(--faint);
  font-family: var(--font-mono);
}
.ticket__rows dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color 0.3s var(--ease);
}
.ticket__rows dd.is-empty { color: #b3bbc7; }
.ticket__summary {
  margin-top: 20px;
  padding: 16px 16px 17px;
  background: rgba(140, 232, 212, 0.16);
  border: 1px solid rgba(0, 105, 165, 0.16);
  border-radius: 12px;
}
.ticket__ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep);
  margin-bottom: 8px;
}
.ticket__ai::before {
  content: "✦";
  font-size: 12px;
}
.ticket__summary p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  min-height: 42px;
}
.ticket__success {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(13, 138, 100, 0.1);
  border: 1px solid rgba(13, 138, 100, 0.35);
  color: var(--seagreen);
}
.ticket__success svg { width: 28px; height: 28px; flex-shrink: 0; }
.ticket__success p { font-size: 13.5px; color: var(--ink); }

/* ============ FOOTER ============ */

.footer {
  margin-top: 140px;
  background: var(--night);
  color: #e8e2d3;
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer__brand img { height: 26px; width: auto; margin-bottom: 18px; }
.footer__brand p {
  color: #9daabb;
  font-size: 14px;
  line-height: 1.7;
}
.footer__col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6e7f95;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer__col a {
  display: block;
  color: #9daabb;
  font-size: 14.5px;
  padding: 5px 0;
  transition: color 0.2s var(--ease);
}
.footer__col a:hover { color: var(--mint); }
.footer__legal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #64758f;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__chart { grid-column: 1; grid-row: auto; max-width: 560px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
  .step { border-top: 2px dashed rgba(0, 105, 165, 0.3); padding-top: 22px; }
  .step__num { margin-top: -39px; }
  .contact { grid-template-columns: 1fr; }
  .ticket { position: static; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
}

@media (max-width: 480px) {
  .nav__inner { padding: 12px 16px; gap: 12px; }
  .nav__logo img { height: 23px; }
  .nav .btn--sm { padding: 9px 16px; font-size: 13px; white-space: nowrap; }
}

@media (max-width: 640px) {
  .hero { padding-top: 120px; }
  .stats__inner { grid-template-columns: 1fr; gap: 22px; padding: 36px 24px; }
  .stat__num { min-width: 70px; font-size: 36px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding-top: 90px; }
  .note { padding: 80px 24px 88px; }
  .brief-form { padding: 28px 22px; }
  .brief-form__line { font-size: 18px; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .ticket__pulse {
    animation: none !important;
  }
  .squig path,
  .chart-route {
    animation: none !important;
    stroke-dashoffset: 0;
  }
  .wp { opacity: 1 !important; transition: none !important; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * { transition-duration: 0.01ms !important; }
}
