/* UNCARVEDBLOCKS site styles. Shared by every page. */

/* Self-hosted fonts (SIL Open Font License, see fonts/). Geist is one variable
   file covering every weight; DM Mono is the same file the logos are made from. */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono-regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --navy-deep:  #151D30;
  --navy-mid:   #253551;
  --navy-light: #3A4155;
  --teal:       #23AAA1;
  --white:      #F0F2F5;
  --muted:      #8A97A8;
  --slate:      #6D7785;
  --line:       rgba(255, 255, 255, .07);
  --wrap:       1120px;
  --pad:        max(clamp(1rem, 6vw, 5rem), calc((100vw - var(--wrap)) / 2));
  --block:      44px;   /* hero square size */
  --step:       78px;   /* square size + gap */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--navy-deep);
  color: var(--white);
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 350;   /* between Light and Regular: light text on navy reads heavier than on white */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;   /* thinner, crisper light-on-dark text on Mac and iPhone */
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
section[id] { scroll-margin-top: 4.5rem; }

/* ── Shared type ── */
.label {
  font-family: 'DM Mono', monospace; font-size: .8rem; letter-spacing: .16em; line-height: 1.3;
  text-transform: uppercase; color: var(--teal); margin-bottom: 1rem;
}
h1, h2, h3 { font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.2rem; max-width: 46rem; }
h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 40rem; opacity: .88; }
.prose p { max-width: 40rem; opacity: .88; }
.prose p + p { margin-top: 1.1rem; }
.teal { color: var(--teal); }

.btn {
  display: inline-block; font: 500 .9rem/1 'Geist', sans-serif; letter-spacing: .02em;
  color: var(--navy-deep); background: var(--teal); text-decoration: none;
  padding: 1.05rem 1.9rem; border-radius: 2px; border: 0; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: #1d9991; transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem var(--pad);
  background: rgba(21,29,48,.95); border-bottom: 1px solid var(--line);   /* solid, so page text never shows through */
}
.logo {
  font-family: 'DM Mono', monospace; font-size: .9rem; letter-spacing: .22em;
  color: var(--white); text-decoration: none;
}
.logo span { color: var(--teal); }
.nav-links { display: flex; gap: 1.8rem; list-style: none; }
.nav-links a {
  font-size: .95rem; display: inline-block; padding: .6rem 0; text-decoration: none; color: var(--white); opacity: .8;
  transition: opacity .2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--teal); }

/* ── Sections ── */
.section { position: relative; padding: 6rem var(--pad); border-top: 1px solid var(--line); }
.page-head { padding: 9rem var(--pad) 3rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1.2rem; }
.not-found { min-height: 70vh; }
.not-found-cta { margin-top: 2rem; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: 7rem var(--pad) 5rem;
}
/* The text column and the blocks share one measurement: the column shrinks to
   leave room for the blocks (13rem), and the blocks sit 3rem to its right, so
   they can never overlap at in-between widths. */
.hero { --copy: min(44rem, calc(100vw - var(--pad) - 13rem)); }
.hero-copy { position: relative; z-index: 5; max-width: var(--copy); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 4.3rem); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 1.6rem; }
.hero .lede { margin-bottom: 2.4rem; }

/* Blocks, from the LinkedIn banner */
.blocks {
  position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: none;
  left: calc(var(--pad) + var(--copy) + 3rem);   /* just right of the text column */
  display: flex; gap: 24px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.col { overflow: hidden; }
.col.b { margin-top: calc(var(--step) / 2); }
.track { display: flex; flex-direction: column; gap: calc(var(--step) - var(--block)); will-change: transform; }
.col.a .track { animation: up 140s linear infinite; }
.col.b .track { animation: down 170s linear infinite; }
.sq {
  width: var(--block); height: var(--block); flex: none;
  background: linear-gradient(170deg, rgba(35,170,161,var(--a)) 0%, rgba(35,170,161,calc(var(--a) * .55)) 100%);
  animation: pulse var(--d) ease-in-out var(--delay) infinite alternate;
}
@keyframes up    { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes down  { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes pulse { from { opacity: 1; } to { opacity: .25; } }

/* ── Who we work with ── */
.who { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; max-width: 48rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; max-width: 60rem; }
.facts div { border-top: 1px solid rgba(35,170,161,.35); padding-top: 1rem; }
.facts dt { font-family: 'DM Mono', monospace; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: .5rem; }
.facts dd { opacity: .85; }

/* ── Services ── */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 2.5rem; }
.service {
  position: relative; overflow: hidden;
  background: rgba(37,53,81,.35); border: 1px solid rgba(255,255,255,.05);
  padding: 2rem; transition: background .3s ease;
}
.service::before {
  content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 0;
  background: var(--teal); transition: height .4s ease;
}
.service:hover { background: rgba(37,53,81,.6); }
.service:hover::before { height: 100%; }
.service .num { font-family: 'DM Mono', monospace; font-size: .75rem; letter-spacing: .16em; color: var(--teal); opacity: .8; margin-bottom: 1.4rem; }
.service h3 { margin-bottom: .4rem; }
.service .formal { font-family: 'DM Mono', monospace; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.service p:last-child { opacity: .85; }

/* ── Readiness check ── */
.check { margin-top: 2.5rem; max-width: 52rem; }
.q {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center;
  padding: 1.2rem 0; border-top: 1px solid var(--line);
}
.q:last-of-type { border-bottom: 1px solid var(--line); }
.q p { font-size: 1.05rem; }
.q .n { font-family: 'DM Mono', monospace; font-size: .7rem; color: var(--teal); margin-right: .6rem; }
.yn { display: flex; gap: .5rem; }
.yn button {
  font: 500 .9rem/1 'Geist', sans-serif; min-width: 4.6rem; min-height: 44px; padding: .7rem 1.1rem;
  color: var(--white); background: transparent; border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px; cursor: pointer; transition: all .2s ease;
}
.yn button:hover { border-color: var(--teal); }
.yn button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--navy-deep); }
.result { margin-top: 2.5rem; }
.result[hidden] { display: none; }
.score { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -.025em; margin-bottom: 1.2rem; }
.score:focus { outline: none; }   /* focused by script so screen readers announce it */
.gaps { list-style: none; display: grid; gap: 1rem; margin-bottom: 1.6rem; }
.gaps li { padding-left: 1.2rem; border-left: 2px solid var(--teal); max-width: 44rem; }
.gaps strong { font-weight: 500; display: block; margin-bottom: .2rem; }
.gaps span { opacity: .85; }
.fine { font-size: .9rem; color: var(--muted); max-width: 44rem; }
.fine + .fine { margin-top: .6rem; }
.check-reset { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; margin-top: 1.2rem; }

/* ── About strip / bio ── */
.bio { display: grid; grid-template-columns: minmax(0, 13rem) 1fr; gap: 3.5rem; align-items: start; }
/* Square portrait with a teal block tucked behind one corner, echoing the hero */
.portrait { position: relative; isolation: isolate; margin: 0 var(--block) var(--block) 0; }
.portrait::after {
  content: ''; position: absolute; z-index: -1; right: calc(var(--block) * -1); bottom: calc(var(--block) * -1);
  width: 55%; aspect-ratio: 1; background: linear-gradient(170deg, rgba(35,170,161,.9), rgba(35,170,161,.45));
}
.portrait img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.bio .more { display: inline-block; margin-top: 1.4rem; color: var(--teal); text-decoration: none; font-weight: 500; }
.bio .more:hover { text-decoration: underline; }

/* ── Contact ── */
.contact { text-align: left; }
.contact .email {
  display: inline-block; margin-top: 1.6rem;
  font-family: 'DM Mono', monospace; font-size: clamp(1rem, 2vw, 1.25rem); letter-spacing: .06em;
  color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(35,170,161,.35); padding-bottom: .2rem;
}
.contact .email:hover { border-color: var(--teal); }

/* Contact form */
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.5rem;
  max-width: 40rem; margin-top: 2rem;
}
.contact-form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-wide, .contact-form .btn { grid-column: 1 / -1; }
.contact-form .btn { justify-self: start; }
.field label { font-size: .9rem; color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--white);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.2); border-radius: 2px;
  padding: .8rem .9rem; min-height: 44px; width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }   /* readable on navy */
.field input:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* spam trap, off screen */
.contact-status { margin-top: 1.2rem; max-width: 40rem; }
.contact-status:empty { display: none; }
.contact-status:focus { outline: none; }
.contact-status.ok { font-size: 1.1rem; }
.contact-status.error { color: #F2A7A7; }
.contact-alt { margin-top: 1.8rem; color: var(--muted); }
.contact-alt .email { margin-top: 0; font-size: 1rem; }

/* ── Footer ── */
.footer {
  display: grid; grid-template-columns: 1fr auto; gap: 1.6rem 2rem; align-items: center;
  padding: 2.5rem var(--pad); border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}
.footer-name strong { font-weight: 500; }
.footer > div { display: flex; flex-wrap: wrap; column-gap: .6rem; }
.footer address { font-style: normal; }
.footer address::before { content: "·"; margin-right: .6rem; }
.footer ul { list-style: none; display: flex; align-items: center; gap: 1.4rem; justify-content: flex-end; }
.footer a { text-decoration: none; display: inline-block; padding: .5rem 0; }
.footer a:hover { color: var(--white); }

/* ── Phone bar ── */
.phone-bar { display: none; }

/* ── Phones ── */
@media (max-width: 720px) {
  :root { --block: 26px; --step: 44px; }
  .label, .facts dt { font-size: .85rem; }
  body { padding-bottom: 4.5rem; }   /* room for the sticky bar */
  .nav { padding: 1rem; }
  .logo { font-size: .8125rem; }   /* size only; letter-spacing stays at the brand's .22em */
  .nav-links { gap: 1.2rem; }
  .section { padding: 4rem 1rem; }
  .page-head { padding: 7rem 1rem 2rem; }

  /* Blocks sit under the button in normal flow, so nothing moves when the
     address bar hides on scroll. */
  .hero { display: block; min-height: 0; padding: 6.5rem 1rem 3rem; }
  .hero-copy { max-width: none; }
  .blocks {
    position: relative; top: auto; bottom: auto; left: auto;
    margin: 3rem -1rem 0; flex-direction: column; gap: 14px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
  }
  .col.b { margin-top: 0; margin-left: calc(var(--step) / 2); }
  .track { flex-direction: row; }
  .col.a .track { animation-name: left; }
  .col.b .track { animation-name: right; }

  .facts, .services { grid-template-columns: 1fr; }
  .facts { gap: 1.4rem; margin-top: 2.2rem; }
  .q { grid-template-columns: 1fr; gap: .8rem; }
  .bio { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { max-width: 10rem; margin: 0 1.5rem 1.5rem 0; }
  .portrait::after { right: -1.5rem; bottom: -1.5rem; }
  .footer { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .footer ul { justify-content: flex-start; margin: -.5rem 0; order: -1; }   /* links first, company line last */

  /* Hidden while another email button is on screen (see site.js), so only one shows at a time */
  .phone-bar {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom));
    transform: translateY(110%); visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
    background: rgba(21,29,48,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  }
  .phone-bar.show { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
  .phone-bar .btn { display: block; text-align: center; padding: .85rem 1.5rem; }
}

/* The footer company line wraps below about 346px; drop the dot so the city starts its own line cleanly */
@media (max-width: 350px) {
  .footer address::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track, .sq { animation: none !important; }
  .btn, .service, .service::before { transition: none; }
  .phone-bar, .phone-bar.show { transition: none; }
}
