/* Razorfin — razorfin.org
   Palette: abyss #060a10 · trench #0c1520 · steel #22384a · foam #e8f2f8 ·
   mist #93a9ba · razor #46d7ef
   Type: Chakra Petch (display) · IBM Plex Sans (body) · IBM Plex Mono (utility)
*/

:root {
  --abyss: #060a10;
  --trench: #0c1520;
  --steel: #22384a;
  --foam: #e8f2f8;
  --mist: #93a9ba;
  --razor: #46d7ef;
  --razor-ink: #06232c;
  --cut: 16px;
  --display: "Chakra Petch", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--abyss);
  color: var(--mist);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--razor); color: var(--razor-ink); }

a { color: var(--razor); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--foam);
  background: rgba(70, 215, 239, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--foam);
  line-height: 1.15;
  text-wrap: balance;
}

h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; margin-bottom: 1.6rem; }
h3 { font-size: 1.15rem; font-weight: 600; }

/* ---------- depth rail (signature) ---------- */

.depth-rail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: none;
}
@media (min-width: 1280px) { .depth-rail { display: block; } }

.depth-rail ol { list-style: none; display: grid; gap: 42px; position: relative; }
.depth-rail .rail-line {
  position: absolute;
  left: 5px; top: -14px; bottom: -14px;
  width: 1px;
  background: linear-gradient(var(--steel), rgba(34, 56, 74, 0.15));
}
.depth-rail li { display: flex; align-items: center; gap: 10px; position: relative; }
.depth-rail .tick {
  width: 11px; height: 1px;
  background: var(--steel);
  transition: background 0.3s, width 0.3s;
}
.depth-rail .depth-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  transition: color 0.3s;
}
.depth-rail li.active .tick { background: var(--razor); width: 18px; }
.depth-rail li.active .depth-label { color: var(--razor); }

/* ---------- fin-cut chamfer ---------- */

.card, .btn, .shot-frame {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

/* ---------- hero ---------- */

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 96px 0 48px;
  background:
    radial-gradient(1100px 520px at 78% 30%, rgba(70, 215, 239, 0.07), transparent 65%),
    var(--abyss);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px;
}

.eyebrow, .section-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--razor);
  margin-bottom: 1.1rem;
}

.wordmark {
  position: relative;
  font-size: clamp(3rem, 9vw, 5.8rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: inline-block;
}

.slash {
  position: absolute;
  inset: 0;
  width: 104%;
  height: 100%;
  left: -2%;
  pointer-events: none;
}
.slash line {
  stroke: var(--razor);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: slash-draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.35s forwards;
}
@keyframes slash-draw { to { stroke-dashoffset: 0; } }

.tagline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  color: var(--foam);
  margin: 0.9rem 0 0.8rem;
}

.lede { max-width: 46ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.85em 1.7em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-solid { background: var(--razor); color: var(--razor-ink); }
.btn-solid:hover { box-shadow: 0 4px 24px rgba(70, 215, 239, 0.35); }

.btn-line {
  color: var(--razor);
  border: 1px solid var(--steel);
  background: rgba(70, 215, 239, 0.04);
}
.btn-line:hover { border-color: var(--razor); }

.fineprint { font-size: 0.8rem; margin-top: 1.2rem; font-family: var(--mono); color: var(--mist); opacity: 0.75; }

.hero-art { min-width: 0; }
.hero-art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 44px rgba(70, 215, 239, 0.22));
  animation: drift 7s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(6px); } to { transform: translateY(-8px); } }

/* ---------- sections ---------- */

.section { padding: 108px 0; border-top: 1px solid rgba(34, 56, 74, 0.4); }

.card {
  background: var(--trench);
  border: 1px solid rgba(34, 56, 74, 0.6);
  padding: 26px 24px;
}
.card h3, .card h4 { margin-bottom: 0.6rem; }
.card p { font-size: 0.98rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* gallery */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.shot-frame {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(145deg, rgba(70, 215, 239, 0.05), transparent 55%),
    var(--trench);
  border: 1px dashed var(--steel);
  display: grid;
  place-items: center;
}
.shot-frame span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  opacity: 0.7;
  padding: 0 1.5em;
  text-align: center;
}
.shot img { width: 100%; height: auto; display: block; }
figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mist);
  margin-top: 0.6rem;
}

/* install */

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

.install-col > h3 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--steel);
}
.install-col > p { margin-bottom: 1.1rem; }

.dl-cards { display: grid; gap: 16px; margin-bottom: 1.2rem; }
.dl-card { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.dl-card h4 { grid-column: 1; font-size: 1.05rem; margin: 0; }
.dl-card .dl-hw { grid-column: 1; font-size: 0.85rem; margin: 0.15rem 0 0; }
.dl-card .btn { grid-column: 2; grid-row: 1 / span 2; }
.dl-card .checksum-link {
  grid-column: 2; grid-row: 3;
  justify-self: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-top: 0.4rem;
}
.variant-mod { color: var(--razor); }

.verify summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mist);
}
.verify[open] summary { color: var(--razor); }

pre {
  background: #04070c;
  border: 1px solid rgba(34, 56, 74, 0.6);
  border-left: 2px solid var(--razor);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0.9rem 0 1.2rem;
  position: relative;
}
pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--foam);
}

.cmd { padding-right: 5em; }

.cmd .copy {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  background: var(--trench);
  border: 1px solid var(--steel);
  padding: 0.35em 0.8em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cmd .copy:hover, .cmd .copy:focus-visible { color: var(--razor); border-color: var(--razor); }
.cmd .copy.done { color: var(--razor-ink); background: var(--razor); border-color: var(--razor); }

.table-scroll { overflow-x: auto; margin: 0.4rem 0 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  text-align: left;
  padding: 0.5em 1em 0.5em 0;
}
td { padding: 0.55em 1em 0.55em 0; border-top: 1px solid rgba(34, 56, 74, 0.5); }
td:first-child { color: var(--foam); }

.side-note { font-size: 0.85rem; }

/* channels */

.channel-lede { max-width: 58ch; margin-bottom: 1.6rem; }

.channel-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
  counter-reset: none;
  margin-bottom: 1.2rem;
  position: relative;
}
.channel { position: relative; }
.channel-flow .channel:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -26px;
  width: 22px;
  height: 1px;
  background: var(--razor);
  opacity: 0.6;
}
@media (max-width: 830px) { .channel-flow .channel:not(:last-child)::after { display: none; } }
.cadence {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--razor);
  margin: 0.2rem 0 0.7rem;
}

/* footer */

.seafloor {
  border-top: 1px solid var(--steel);
  background: linear-gradient(rgba(12, 21, 32, 0.4), #030509);
  padding: 64px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-mark { opacity: 0.8; margin-bottom: 0.8rem; height: auto; }
.seafloor p { font-size: 0.9rem; max-width: 38ch; }
.seafloor nav { display: grid; gap: 0.45rem; font-family: var(--mono); font-size: 0.85rem; }
.license { font-family: var(--mono); color: var(--steel); grid-column: 1 / -1; margin-top: 0.5rem; }

/* ---------- reveals & motion ---------- */

.reveal-group > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-group.in > * { opacity: 1; transform: none; }
.reveal-group.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group.in > *:nth-child(4) { transition-delay: 0.24s; }

.hero-copy > * {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s ease forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.38s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.5s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .reveal-group > * { opacity: 1; transform: none; animation: none; transition: none; }
  .hero-art img { animation: none; }
  .slash line { animation: none; stroke-dashoffset: 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero { min-height: 0; padding-top: 72px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 380px; margin: 0 auto; }
  .section { padding: 72px 0; }
}
