/* Something Outside Corp. — landing page
   A field instrument for wild places: night-forest ground, lichen paper,
   signal orange for anything that matters. */

:root {
  --night: #0c1814;
  --spruce: #12241e;
  --moss: #2f4a3c;
  --contour: #3f6152;
  --lichen: #e9e3d2;
  --paper: #f4efe2;
  --ink: #16201b;
  --mist: #a9b8ae;
  --signal: #ff6a1a;
  --signal-deep: #e2530a;
  --glacier: #9fd4e3;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--lichen);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over everything, for atmosphere */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--signal);
  color: var(--night);
  padding: 0.5rem 1rem;
  z-index: 200;
}
.skip:focus { left: 0.5rem; }

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

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(12, 24, 20, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 227, 210, 0.08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brand-mark { width: 2.4rem; height: 2.4rem; color: var(--lichen); overflow: visible; }
.brand-mark .box,
.brand-mark .peak { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.brand-mark .arc { fill: none; stroke: var(--signal); stroke-width: 1.4; stroke-dasharray: 1.2 2.2; stroke-linecap: round; opacity: 0.8; }
.brand-mark .ball { fill: var(--signal); transform-box: fill-box; transform-origin: center; }
/* The ball pops off the summit and lands outside the box */
.brand-mark .ball { animation: ball-out 1.4s cubic-bezier(0.3, 0.7, 0.4, 1) 0.6s both; }
.brand:hover .brand-mark .ball { animation: ball-hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes ball-out {
  0% { transform: translate(-14px, -2px) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  45% { transform: translate(-6px, -9px) scale(1); }
  75% { transform: translate(0, 0) scale(1.15, 0.85); }
  88% { transform: translate(0, -3px) scale(0.95, 1.05); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes ball-hop {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(0, -7px) scale(0.95, 1.05); }
  80% { transform: translate(0, 0) scale(1.12, 0.88); }
}
.nav nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 2rem); }
.nav nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--mist);
  transition: color 0.2s;
}
.nav nav a:hover { color: var(--lichen); }
.nav .nav-cta {
  color: var(--lichen);
  border: 1px solid rgba(233, 227, 210, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.nav .nav-cta:hover { border-color: var(--signal); color: var(--signal); }

@media (max-width: 760px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-signal { background: var(--signal); color: var(--night); }
.btn-signal:hover { background: var(--signal-deep); }
.btn-ghost { border: 1px solid rgba(233, 227, 210, 0.3); color: var(--lichen); }
.btn-ghost:hover { border-color: var(--lichen); }
.btn-big {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1rem, 0.8rem + 1vw, 1.4rem);
  padding: 1.1rem 2rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem var(--gutter) 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 75% 30%, rgba(63, 97, 82, 0.35), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(255, 106, 26, 0.08), transparent 70%),
    var(--night);
}
.topo {
  position: absolute;
  /* Taller than its section so moving it with the scroll never shows an edge */
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  transform: translate3d(0, var(--scroll-y, 0px), 0);
  will-change: transform;
  pointer-events: none;
}
.topo path {
  fill: none;
  stroke: var(--contour);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.topo path.index { stroke: #567d6b; stroke-width: 1.6; }
.topo .drift { animation: drift 60s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1.02); }
  to { transform: translate3d(-2%, -1.5%, 0) scale(1.06); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  margin: 0 0 1.2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--glacier);
}
h1, h2, h3 { font-family: var(--display); line-height: 0.92; margin: 0; }
h1 {
  font-weight: 900;
  font-size: clamp(3.6rem, 2rem + 8vw, 8.5rem);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
h1 .accent { color: var(--signal); }
.lede {
  max-width: 34rem;
  margin: 1.8rem 0 2.2rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: #d5d9cc;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Route-check readout: a device floating above the map.
   The wrapper carries the parallax (scroll + pointer tilt), the card keeps
   its own tilt and entrance animation. */
.hud-wrap {
  position: relative;
  perspective: 1200px;
  transform: translate3d(0, var(--scroll-y, 0px), 0);
  will-change: transform;
}
.hud-wrap::before {
  /* soft glow pooled on the map beneath the device */
  content: "";
  position: absolute;
  inset: 12% 6% -10%;
  background: radial-gradient(closest-side, rgba(159, 212, 227, 0.16), transparent);
  filter: blur(30px);
  transform: translate3d(calc(var(--tilt-y, 0) * -0.6px), calc(var(--tilt-x, 0) * 0.6px + 28px), 0);
  pointer-events: none;
}
.hud {
  position: relative;
  background: linear-gradient(160deg, rgba(26, 50, 41, 0.82), rgba(10, 20, 17, 0.9));
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(159, 212, 227, 0.24);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 30px -12px rgba(0, 0, 0, 0.55),
    0 60px 120px -30px rgba(0, 0, 0, 0.85);
  transform: rotate(1.2deg);
  transform-style: preserve-3d;
}
.hud > * { transform: translateZ(18px); }
.hud::before {
  /* corner registration marks, like an instrument face */
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  pointer-events: none;
  background:
    linear-gradient(var(--glacier), var(--glacier)) top left / 10px 1px no-repeat,
    linear-gradient(var(--glacier), var(--glacier)) top left / 1px 10px no-repeat,
    linear-gradient(var(--glacier), var(--glacier)) bottom right / 10px 1px no-repeat,
    linear-gradient(var(--glacier), var(--glacier)) bottom right / 1px 10px no-repeat;
  opacity: 0.5;
}
.hud-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist);
}
.hud-time { margin-left: auto; color: var(--glacier); }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hud-title {
  margin-top: 1rem;
  font-size: 2.1rem;
  font-weight: 700;
  text-transform: uppercase;
}
.hud-sub { margin: 0.4rem 0 1.2rem; font-size: 0.8rem; color: var(--mist); }
.readouts { margin: 0; display: grid; gap: 0.85rem; }
.readout { display: grid; gap: 0.3rem; }
.readout dt { font-size: 0.82rem; color: var(--mist); }
.readout dd { margin: 0; display: grid; gap: 0.35rem; }
.readout .val { font-family: var(--mono); font-size: 1rem; color: var(--lichen); }
.bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: rgba(233, 227, 210, 0.1);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--glacier);
  transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.loaded .bar i { width: var(--w); }
.readout.warn .val { color: var(--signal); }
.readout.warn .bar i { background: var(--signal); }
.hud-advice {
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(233, 227, 210, 0.18);
}
.hud-advice p { margin: 0.4rem 0 0; font-size: 0.98rem; }
.hud-advice strong { color: var(--signal); }
.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--night);
  background: var(--glacier);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--mist);
  text-decoration: none;
  padding-bottom: 2.6rem;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 2rem;
  background: linear-gradient(var(--mist), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Page-load reveal, staggered */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.14s + 0.1s);
}
.hud.reveal { animation-name: rise-tilt; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes rise-tilt {
  from { opacity: 0; transform: translateY(40px) rotate(4deg); }
  to { opacity: 1; transform: rotate(1.2deg); }
}
/* Once it has arrived, the pointer tilt takes over the transform */
.hud.reveal.arrived {
  animation: none;
  opacity: 1;
  transform: rotate(1.2deg) rotateX(calc(var(--tilt-x, 0) * 1deg)) rotateY(calc(var(--tilt-y, 0) * 1deg));
  transition: transform 0.25s ease-out;
}

/* ---------- Statement (paper section) ---------- */
.statement {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.statement-text {
  max-width: 56rem;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem);
  line-height: 1.08;
  text-wrap: balance;
}
.statement-text em {
  font-style: normal;
  background: linear-gradient(transparent 62%, rgba(255, 106, 26, 0.45) 62%);
}

/* ---------- Sections ---------- */
.what, .how, .principles {
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-weight: 700;
  font-size: clamp(2.4rem, 1.5rem + 3.5vw, 4.6rem);
  text-transform: uppercase;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1px;
  background: rgba(233, 227, 210, 0.12);
  border: 1px solid rgba(233, 227, 210, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.card {
  background: var(--night);
  padding: 2rem 1.6rem 2.2rem;
  transition: background 0.3s;
}
.card:hover { background: var(--spruce); }
.card-num {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--signal);
  color: var(--signal);
  border-radius: 50%;
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
}
.card h3 { font-size: 1.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.8rem; }
.card p { margin: 0; color: #c5ccc0; }

.how {
  max-width: none;
  background:
    linear-gradient(rgba(12, 24, 20, 0.86), rgba(12, 24, 20, 0.86)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(159, 212, 227, 0.07) 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(159, 212, 227, 0.07) 79px 80px),
    var(--spruce);
}
.how > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 2.2rem;
  border-top: 2px solid var(--moss);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: -0.8rem;
  right: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
  color: rgba(233, 227, 210, 0.06);
}
.step-k {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--signal);
  margin-bottom: 0.8rem;
}
.step p { margin: 0; font-size: 1.08rem; }

.principle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 0 3rem;
}
.principle-list li {
  padding: 1.4rem 0 1.4rem 2.4rem;
  border-bottom: 1px solid rgba(233, 227, 210, 0.12);
  position: relative;
  color: #c5ccc0;
}
.principle-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.85rem;
  width: 1.1rem;
  height: 1.1rem;
  /* a tiny summit marker */
  background: var(--signal);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.principle-list strong { color: var(--lichen); display: block; font-size: 1.12rem; margin-bottom: 0.2rem; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--signal);
  color: var(--night);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
}
.contact .topo path { stroke: rgba(12, 24, 20, 0.22); }
.contact .topo path.index { stroke: rgba(12, 24, 20, 0.35); }
.contact-inner { position: relative; max-width: var(--max); margin: 0 auto; }
.contact .eyebrow { color: var(--night); opacity: 0.75; }
.contact h2 {
  font-weight: 900;
  font-size: clamp(2.8rem, 1.5rem + 6vw, 7rem);
  text-transform: uppercase;
  max-width: 14ch;
}
.contact .lede { color: var(--night); }
.contact .btn-signal { background: var(--night); color: var(--lichen); }
.contact .btn-signal:hover { background: #000; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.6rem var(--gutter);
  font-size: 0.85rem;
  color: var(--mist);
}
.footer .mono { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.7rem; }

/* Scroll-in for sections below the fold */
.in-view-ready .card,
.in-view-ready .step,
.in-view-ready .principle-list li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.in-view-ready .shown { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .hud.reveal { transform: rotate(1.2deg); }
  .topo .drift, .dot, .scroll-cue::after, .brand-mark .ball { animation: none !important; }
  .bar i { transition: none; }
}

/* ---------- Short-copy emphasis ---------- */
.hl { color: var(--signal); }
.lede-short { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); line-height: 1.45; }
.lede-short em { font-style: normal; color: var(--signal); font-weight: 700; }
.lede-short strong { display: inline-block; margin-top: 0.4rem; color: var(--lichen); }

.statement-text { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 5.4rem); font-weight: 700; text-transform: uppercase; line-height: 0.98; }

.section-head h2 { font-size: clamp(2.8rem, 1.6rem + 5vw, 6rem); font-weight: 900; }

.card h3 { font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); font-weight: 900; margin-bottom: 0.6rem; }
.card p { font-size: 1.2rem; line-height: 1.35; color: var(--mist); }
.card p em, .step p em { font-style: normal; color: var(--lichen); font-weight: 700; }

.step p { font-family: var(--display); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; line-height: 1.05; text-transform: uppercase; color: var(--mist); }
.step p em { color: var(--lichen); }

.principle-list li {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  color: var(--mist);
  padding: 1.6rem 0 1.6rem 2.6rem;
}
.principle-list li::before { top: 2rem; }
.principle-list strong { display: inline; font-size: inherit; color: var(--lichen); margin: 0; }

.contact .lede { font-family: var(--mono); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.14em; }
.principle-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.card p { font-size: 1.35rem; }
