/* ---------- Tokens ---------- */
:root {
  --abyss: #061f29;
  --deep: #0c3d49;
  --mid: #1f7a85;
  --surface: #6dc8cc;
  --foam: #f1ece1;
  --cream: #ece4d2;
  --sand: #d9c39a;
  --coral: #ff7a5a;
  --ink: #07171c;
  --muted: #5b6f73;
  --rule: rgba(7, 23, 28, 0.14);
  --rule-on-dark: rgba(241, 236, 225, 0.22);

  --display: "Fraunces", "Times New Roman", serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--foam);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

/* ---------- Grain overlay ---------- */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  mix-blend-mode: multiply;
  opacity: 0.35;
  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.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Side rail ---------- */
.rail {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 50;
  white-space: nowrap;
}
.rail::after {
  content: "";
  display: inline-block;
  width: 48px;
  height: 1px;
  background: currentColor;
  margin-left: 14px;
  vertical-align: middle;
  opacity: 0.5;
}

@media (max-width: 900px) { .rail { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--foam) 78%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--abyss);
}
.brand__mark { color: var(--mid); }
.brand__text {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand__text em {
  font-style: italic;
  font-weight: 300;
  color: var(--mid);
}

.nav nav {
  justify-self: center;
  display: flex;
  gap: 28px;
}
.nav nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
  transition: color 0.35s var(--ease);
}
.nav nav a span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav nav a:hover { color: var(--mid); }
.nav nav a:hover::after { transform: scaleX(1); }

.reply-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--cream);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--abyss);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.reply-pill:hover {
  background: var(--foam);
  border-color: var(--mid);
  transform: translateY(-1px);
}
.reply-pill__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 122, 90, 0.55);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 122, 90, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 122, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 90, 0); }
}

@media (max-width: 820px) {
  .nav__inner { grid-template-columns: auto auto; }
  .nav nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  background: var(--abyss);
  color: var(--foam);
  overflow: hidden;
  isolation: isolate;
}

.hero__field {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.caustic {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
  mix-blend-mode: screen;
  will-change: transform;
}
.caustic--a {
  width: 70vmax; height: 70vmax;
  left: -20vmax; top: -20vmax;
  background: radial-gradient(circle at 30% 30%, #1f7a85 0%, transparent 60%);
  animation: drift-a 22s var(--ease) infinite alternate;
}
.caustic--b {
  width: 55vmax; height: 55vmax;
  right: -15vmax; top: 20vh;
  background: radial-gradient(circle at 60% 40%, #6dc8cc 0%, transparent 65%);
  opacity: 0.55;
  animation: drift-b 28s var(--ease) infinite alternate;
}
.caustic--c {
  width: 40vmax; height: 40vmax;
  left: 30%; bottom: -15vmax;
  background: radial-gradient(circle at 50% 50%, #ff7a5a 0%, transparent 55%);
  opacity: 0.22;
  animation: drift-c 34s var(--ease) infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vmax, 4vmax) scale(1.1); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vmax, -3vmax) scale(1.15); }
}
@keyframes drift-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-4vmax, 2vmax) scale(1.2); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--gutter) 200px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--surface);
  margin: 0 0 36px;
}
.eyebrow__dash {
  display: inline-block;
  width: 38px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.display {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "opsz" 120;
  font-size: clamp(54px, 9.5vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--foam);
}
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--sand);
}
.display .line {
  display: block;
  overflow: hidden;
}

.display--lg { font-size: clamp(46px, 7.5vw, 124px); }
.display--md { font-size: clamp(38px, 5.5vw, 80px); }
.display--sm { font-size: clamp(26px, 3.5vw, 38px); }
.display--on-dark { color: var(--foam); }
.display--on-dark em { color: var(--surface); }

.hero__meta {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  margin-top: 56px;
  align-items: end;
}
.lede {
  max-width: 46ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: color-mix(in oklab, var(--foam) 85%, transparent);
  margin: 0;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .hero__meta { grid-template-columns: 1fr; }
  .hero__actions { justify-content: flex-start; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform 0.5s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  border: 1px solid transparent;
}
.btn svg { transition: transform 0.5s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--sand);
  color: var(--abyss);
}
.btn--primary:hover {
  background: var(--foam);
  transform: translateY(-1px);
}
.btn--ghost {
  color: var(--foam);
  border-color: rgba(241, 236, 225, 0.4);
}
.btn--ghost:hover {
  border-color: var(--foam);
  background: rgba(241, 236, 225, 0.08);
}

.hero__corner {
  position: absolute;
  right: var(--gutter);
  top: clamp(90px, 14vh, 170px);
  z-index: 2;
  text-align: right;
}
.hero__corner .mono { margin: 0; color: var(--surface); }
.hero__corner .mono--muted { color: color-mix(in oklab, var(--foam) 50%, transparent); }

@media (max-width: 760px) { .hero__corner { display: none; } }

.hero__wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 120px;
  color: var(--foam);
  z-index: 1;
}

/* ---------- Mono utility ---------- */
.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mono--label { color: var(--mid); margin: 0 0 22px; }
.mono--label.mono--on-dark { color: var(--surface); }
.mono--muted { color: var(--muted); }
.mono--on-dark { color: color-mix(in oklab, var(--foam) 70%, transparent); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.section--cream { background: var(--cream); }
.section--deep { background: var(--deep); color: var(--foam); }
.section--abyss {
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(31, 122, 133, 0.4), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(255, 122, 90, 0.18), transparent 70%),
    var(--abyss);
  color: var(--foam);
}

.section__head {
  max-width: var(--max);
  margin: 0 auto 64px;
}
.section__head--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}
@media (max-width: 760px) { .section__head--split { grid-template-columns: 1fr; } }

.section__intro {
  max-width: 42ch;
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}
.section__intro--on-dark { color: color-mix(in oklab, var(--foam) 78%, transparent); }

/* ---------- Services ---------- */
.services {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service {
  position: relative;
  padding: 56px 40px 56px 0;
  border-bottom: 1px solid var(--rule);
}
.service:nth-child(odd) { padding-right: 56px; }
.service:nth-child(even) { padding-left: 56px; border-left: 1px solid var(--rule); }
.service__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mid);
  margin: 0 0 18px;
}
.service h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.service p { margin: 0 0 12px; max-width: 38ch; }
.service::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 1px;
  background: var(--mid);
  transition: width 0.6s var(--ease);
}
.service:nth-child(even)::before { left: 1px; }
.service:hover::before { width: 100%; }

@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(odd), .service:nth-child(even) {
    padding: 40px 0;
    border-left: 0 !important;
  }
}

/* ---------- Notes ---------- */
.notes {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.note {
  padding: 40px 32px;
  background: rgba(241, 236, 225, 0.04);
  border: 1px solid var(--rule-on-dark);
  border-radius: 4px;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.note:hover {
  transform: translateY(-4px);
  background: rgba(241, 236, 225, 0.08);
  border-color: rgba(241, 236, 225, 0.45);
}
.note h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.015em;
  margin: 14px 0 12px;
  color: var(--foam);
}
.note p { margin: 0; color: color-mix(in oklab, var(--foam) 78%, transparent); }

@media (max-width: 820px) { .notes { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__copy h2 { margin: 0 0 28px; }
.about__copy > p { max-width: 56ch; font-size: 17px; }
.about-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--rule);
}
.about-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 16px;
}
.about-list span { color: var(--mid); font-size: 13px; }

.card-area {
  background: var(--abyss);
  color: var(--foam);
  padding: 40px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.card-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(109, 200, 204, 0.25), transparent 60%);
  pointer-events: none;
}
.card-area .mono--label { color: var(--surface); }
.card-area__primary {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 8px 0 28px;
  position: relative;
}
.card-area dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  position: relative;
}
.card-area dl > div {
  padding-top: 14px;
  border-top: 1px solid var(--rule-on-dark);
}
.card-area dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--surface);
  margin-bottom: 4px;
}
.card-area dd {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
}

@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 48px;
}
.contact header { max-width: 60ch; }
.contact h2 { margin: 0 0 24px; }

.promise {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--rule-on-dark);
  border-radius: 999px;
  font-size: 14px;
  color: var(--foam);
}
.promise em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--sand);
}
.promise__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 2.4s var(--ease) infinite;
}

#lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--surface);
}
.field label .opt {
  font-family: var(--body);
  text-transform: none;
  letter-spacing: 0;
  color: color-mix(in oklab, var(--foam) 50%, transparent);
  font-size: 12px;
  margin-left: 8px;
}
.field input,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-on-dark);
  color: var(--foam);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 300;
  padding: 10px 0 12px;
  transition: border-color 0.4s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sand);
}
.field textarea {
  resize: vertical;
  min-height: 80px;
  font-size: 18px;
  line-height: 1.5;
}

#lead-form button {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  border: 0;
  background: var(--sand);
  color: var(--abyss);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.4s var(--ease), transform 0.5s var(--ease);
}
#lead-form button:hover { background: var(--foam); transform: translateY(-1px); }
#lead-form button svg { transition: transform 0.5s var(--ease); }
#lead-form button:hover svg { transform: translateX(4px); }

#form-message {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--sand);
  margin: 0;
  min-height: 1.5em;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 720px) {
  #lead-form { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--abyss);
  color: var(--foam);
  padding: 64px var(--gutter);
}
.footer {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule-on-dark);
  padding-top: 40px;
}
.footer .display em { color: var(--surface); }
.footer__lines { text-align: right; display: grid; gap: 6px; }
.footer__lines a {
  font-family: var(--display);
  font-size: 26px;
  font-style: italic;
  font-weight: 400;
  text-decoration: none;
  color: var(--foam);
  transition: color 0.4s var(--ease);
}
.footer__lines a:hover { color: var(--sand); }

@media (max-width: 600px) {
  .footer { flex-direction: column; align-items: flex-start; }
  .footer__lines { text-align: left; }
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
