/* ============================================================
   30 Cubits — precision nautical instrument
   ink-dark water, slate-blue accent, one brass detail
   ============================================================ */

:root {
  --ink:      #0b1017;
  --ink-2:    #0e141d;
  --line:     rgba(127, 166, 205, 0.16);
  --line-dim: rgba(127, 166, 205, 0.08);
  --text:     #c9ced6;
  --text-dim: #8d96a3;
  --blue:     #7fa6cd;
  --blue-deep:#496a8d;
  --brass:    #c8a35f;

  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 1120px;
  --gauge: clamp(260px, 36vh, 320px); /* ruler scale height = ark height = 30 cubits */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--text);
  background:
    /* faint water-lines */
    repeating-linear-gradient(to bottom, transparent 0 47px, var(--line-dim) 47px 48px),
    /* depth gradient */
    linear-gradient(to bottom, #0d1320 0%, var(--ink) 38%, #090d13 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--blue-deep); color: #fff; }

.skip {
  position: absolute; left: -200vw; top: 0;
  background: var(--blue); color: var(--ink);
  padding: 0.6rem 1rem; z-index: 100; font-family: var(--mono);
}
.skip:focus { left: 0; }

a { color: var(--blue); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------------------------------------------- header */
.site-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2rem) var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand img { display: block; width: clamp(150px, 18vw, 206px); height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.06em;
  color: var(--text-dim); text-decoration: none;
}
.site-nav a:hover { color: var(--blue); }
.nav-cta {
  color: var(--blue) !important;
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  transition: border-color 0.25s, background 0.25s;
}
.nav-cta:hover { border-color: var(--blue); background: rgba(127,166,205,0.07); }

/* ---------------------------------------------- kicker / section labels */
.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 0.7rem;
  flex-wrap: wrap; min-width: 0;
  margin: 0 0 1.1rem;
}
.kicker.center { justify-content: center; }
/* diagonal-cut stripe, echoing the ark's slits */
.tick {
  width: 34px; height: 9px; flex: none;
  background: var(--blue-deep);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}

/* ---------------------------------------------- hero */
.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6.5rem) var(--pad) clamp(4rem, 10vh, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 7.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
  color: #e8ebf0;
}
.hero h1 em { color: var(--blue); font-style: italic; }

.lede {
  max-width: 34em;
  color: var(--text-dim);
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  margin: 0 0 2.2rem;
}

.cta-row { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.cta-aside { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); }

.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 0.88rem; letter-spacing: 0.04em;
  color: var(--ink); background: var(--blue);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background 0.25s, transform 0.25s;
}
.btn:hover { background: #9cbcdd; transform: translateY(-2px); }
.btn.big { font-size: clamp(1rem, 2.4vw, 1.25rem); padding: 1.05rem 2rem; }

/* hero right: ruler + ark, drawn to the same scale —
   the ark mark stands exactly 30 cubits on the gauge */
.hero-instrument {
  display: flex; align-items: flex-end; justify-content: flex-end;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  position: relative;
}
.ark {
  display: block;
  height: var(--gauge);
  width: auto;
  flex: none;
  color: var(--blue-deep);
  opacity: 0.92;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

/* stripes slide in like decks being laid */
.s { animation: lay 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.s0 { animation-delay: 0.95s; }
.s1 { animation-delay: 0.80s; }
.s2 { animation-delay: 0.65s; }
.s3 { animation-delay: 0.50s; }
.s4 { animation-delay: 0.35s; }
.s5 { animation-delay: 0.20s; }
@keyframes lay {
  from { transform: translateX(-36px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* the draft-mark ruler */
.ruler {
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--mono);
  color: var(--text-dim);
  border-right: 1px solid var(--line);
  padding-right: 0.9rem;
  position: relative;
}
.r-cap {
  font-size: 1.5rem; color: var(--brass); line-height: 1;
  margin-bottom: 0.4rem;
}
.r-cap small { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.r-scale {
  height: var(--gauge);
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-end;
  font-size: 0.7rem;
}
.r-label { display: block; letter-spacing: 0.08em; line-height: 1; transform: translateY(0.35em); }
.r-label:first-child { transform: none; }
.r-note {
  font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  position: absolute; left: -1.9rem; top: 0.2rem;
  color: var(--text-dim); opacity: 0.75;
}

/* ---------------------------------------------- decks (services) */
.decks {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) var(--pad);
}
.sect-head { margin-bottom: 2.4rem; }
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  color: #e8ebf0;
  margin: 0;
}
h2 em { color: var(--blue); }

.deck {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding: clamp(1.6rem, 4vh, 2.4rem) 0.9rem;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.deck:last-of-type { border-bottom: 1px solid var(--line); }

/* sliding accent stripe on hover — a deck plank */
.deck::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 7px;
  background: var(--blue-deep);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), 0 100%);
  transform: translateX(-9px);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.deck:hover::before { transform: translateX(0); }
.deck:hover { background: linear-gradient(to right, rgba(127,166,205,0.045), transparent 60%); }

.deck-no {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--blue);
  letter-spacing: 0.1em;
}
.deck-no::after { content: " /"; color: var(--text-dim); }

.deck h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  margin: 0 0 0.55rem;
  color: #e4e8ee;
}
.deck p { margin: 0; color: var(--text-dim); max-width: 36em; }

.deck-tags {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  justify-content: flex-end;
}
.deck-tags li {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
}

/* scroll reveal (JS-gated so content shows without JS) */
.js .reveal-io { opacity: 0; transform: translateY(22px); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal-io.in { opacity: 1; transform: none; }

/* ---------------------------------------------- contact */
.contact {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) var(--pad);
  text-align: center;
}
.contact h2 { margin-bottom: 1.2rem; }
.contact-line {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--text-dim);
  margin: 0 0 2.4rem;
}

/* ---------------------------------------------- footer */
.site-foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem var(--pad) 2.6rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim);
}
.site-foot p { margin: 0; }
.foot-mark { opacity: 0.7; }
.foot-note { margin-left: auto !important; opacity: 0.65; }

/* ---------------------------------------------- load-in reveals */
.reveal { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.12s; }
.d2 { animation-delay: 0.24s; }
.d3 { animation-delay: 0.36s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------- responsive */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-instrument { justify-content: flex-start; }
  .ruler { display: none; }
  .ark { height: clamp(140px, 24vw, 220px); }
  .deck { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .deck-tags { grid-column: 2; justify-content: flex-start; margin-top: 0.9rem; }
}
@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .deck { grid-template-columns: 1fr; gap: 0.6rem; }
  .deck-no { margin-bottom: -0.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .s { animation: none; }
  .js .reveal-io { opacity: 1; transform: none; transition: none; }
  .btn, .deck::before { transition: none; }
}
