/* ShadowAccess — design system
   Colours, type and spacing used across every page. */

:root {
  /* Palette */
  --ink:            #08090A;   /* neutral dark / page background */
  --surface:        #0C0E10;   /* cards */
  --surface-2:      #0B0D0F;   /* panels */
  --line:           #1C2024;   /* hairline rules */
  --line-soft:      #15181B;
  --paper:          #E8EAEC;   /* neutral light / primary text */
  --muted:          #9AA3AB;   /* secondary text */
  --muted-2:        #AEB6BE;
  --dim:            #5F686F;
  --steel:          #C4CCD3;   /* primary, metallic */
  --signal:         #4FA3C7;   /* secondary accent */
  --signal-bright:  #8FD0E6;

  /* Type */
  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  /* Spacing scale (8px base) */
  --s1: 8px;  --s2: 16px;  --s3: 24px;  --s4: 32px;
  --s5: 48px; --s6: 64px;  --s7: 96px;  --s8: 128px;

  --gutter: clamp(20px, 5vw, 64px);
  --radius: 0px;              /* square corners throughout */
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--signal); text-decoration: none; }
a:hover { color: var(--signal-bright); }
::selection { background: var(--signal); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(36px, 6vw, 72px); line-height: 1.02; }
h2 { font-weight: 700; font-size: clamp(28px, 4.2vw, 48px); line-height: 1.06; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.3; }
p  { text-wrap: pretty; }

.wrap { max-width: var(--maxw); margin: 0 auto; }
.wrap--narrow { max-width: 860px; }
.wrap--prose  { max-width: 760px; }

.section { padding: clamp(60px, 9vw, 120px) var(--gutter); border-bottom: 1px solid var(--line-soft); }
.section--tint { background: linear-gradient(180deg, #0A0C0E, var(--ink)); }
.section--hero { background: radial-gradient(120% 90% at 78% 8%, #191D21 0%, #0A0B0C 46%, var(--ink) 100%); }
.section--cta  { background: radial-gradient(90% 100% at 20% 0%, #14181B 0%, var(--ink) 60%); border-bottom: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 14px;
}
.lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--muted-2); max-width: 56ch; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 14px var(--gutter);
  background: rgba(8, 9, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #1C1F22;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand img { width: 52px; height: 34px; object-fit: contain; }
.brand span {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.34em; text-transform: uppercase; padding-left: 6px;
}
.brand span em { font-style: normal; color: var(--muted); }

.nav-toggle {
  display: none; background: none; border: 1px solid #333B42; color: var(--paper);
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 10px 14px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--signal); }

.site-nav {
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px);
  font-family: var(--font-display); font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.site-nav a { color: #B7BFC7; }
.site-nav a:hover { color: #FFFFFF; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn--primary { background: linear-gradient(180deg, #F2F5F7, var(--steel)); color: var(--ink); }
.btn--primary:hover { background: linear-gradient(180deg, #FFFFFF, #DCE3E8); color: var(--ink); }
.btn--ghost { border-color: #333B42; color: var(--paper); font-weight: 500; }
.btn--ghost:hover { border-color: var(--signal); color: #FFFFFF; }
.btn--sm { padding: 10px 18px; font-size: 13px; letter-spacing: 0.12em; }
.btn--nav { border-color: #3F4952; background: linear-gradient(180deg, #1A1D20, #0D0F11); color: var(--paper); font-weight: 500; }
.btn--nav:hover { border-color: var(--signal); color: #FFFFFF; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.tag {
  padding: 7px 13px; border: 1px solid #262B30;
  font-family: var(--font-display); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Layout helpers ---------- */

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(32px, 6vw, 72px); align-items: center; }
.split--top { align-items: start; }
.split > * { min-width: 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { max-width: 18ch; }
.section-head p { color: var(--muted); max-width: 38ch; margin: 0; }

/* Hairline grid of cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); padding: clamp(26px, 3.2vw, 40px); min-width: 0; overflow-wrap: anywhere; }
.card:hover { background: #111417; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.68; margin: 0; }
.card ul { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; padding-left: 18px; }
.card li + li { margin-top: 8px; }
.card__num { font-family: var(--font-display); font-size: 12px; color: var(--signal); letter-spacing: 0.2em; margin-bottom: 22px; }
.card__label { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #6C757E; margin-bottom: 10px; }
.card--cta { background: #0A0C0E; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s2); }
.card--cta:hover { background: #0A0C0E; }
.card--stat strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 36px; margin-bottom: 8px; }
.card--stat span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.feature-title { font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; }

/* App cards */
.app-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(16px, 2vw, 24px); }
.app-card { display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 2.6vw, 32px); border: 1px solid var(--line); background: var(--surface); color: var(--paper); }
.app-card:hover { border-color: #3F4952; background: #111417; color: var(--paper); }
.app-card__head { display: flex; align-items: center; gap: 16px; }
.app-card__head img { width: 58px; height: 58px; flex: none; border-radius: 13px; }
.app-card__head h3 { margin-bottom: 6px; }
.app-card__meta { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #6C757E; }
.app-card p { color: var(--muted); font-size: 15px; margin: 0; }
.app-card__go { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--signal); margin-top: auto; }

/* Screenshots */
.shot { border: 1px solid var(--line); background: #0B0E10; padding: 8px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(16px, 2vw, 24px); }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shots figcaption { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #6C757E; }

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

.hero { position: relative; overflow: hidden; }

/* Slowly drifting technical grid behind everything */
.hero__grid {
  position: absolute; inset: -40% -10%;
  background-image:
    linear-gradient(to right, rgba(79, 163, 199, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 163, 199, 0.09) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 78%);
  animation: gridDrift 26s linear infinite;
  pointer-events: none;
}
@keyframes gridDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-74px, -74px, 0); }
}

/* A single slow beam that sweeps the hero */
.hero__beam {
  position: absolute; top: -20%; bottom: -20%; left: -30%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(232, 234, 236, 0.055), transparent);
  transform: skewX(-14deg);
  animation: beamSweep 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes beamSweep {
  0%        { transform: translateX(0) skewX(-14deg); opacity: 0; }
  12%       { opacity: 1; }
  60%, 100% { transform: translateX(340%) skewX(-14deg); opacity: 0; }
}

.hero > .wrap { position: relative; z-index: 1; }

/* Hero mark: metallic sheen + slow orbit ring */
.hero__mark { position: relative; display: flex; justify-content: center; align-items: center; }
.hero__mark img { width: min(100%, 460px); filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.8)); position: relative; z-index: 1; }
.hero__mark::before {
  content: ""; position: absolute; z-index: 2; inset: 12%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.5) 50%, transparent 62%);
  mix-blend-mode: overlay;
  animation: sheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 18%  { transform: translateX(-140%); }
  55%,100% { transform: translateX(140%); }
}
.hero__ring {
  position: absolute; width: min(76%, 380px); aspect-ratio: 1;
  border: 1px solid rgba(154, 163, 171, 0.18);
  border-radius: 50%;
  border-top-color: rgba(79, 163, 199, 0.55);
  animation: orbit 18s linear infinite;
  pointer-events: none;
}
.hero__ring--inner {
  width: min(58%, 290px);
  border-color: rgba(154, 163, 171, 0.12);
  border-bottom-color: rgba(196, 204, 211, 0.4);
  animation-duration: 28s;
  animation-direction: reverse;
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* Hero copy rises in on load */
.hero__copy > * { animation: riseIn 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__copy > *:nth-child(1) { animation-delay: 60ms; }
.hero__copy > *:nth-child(2) { animation-delay: 160ms; }
.hero__copy > *:nth-child(3) { animation-delay: 260ms; }
.hero__copy > *:nth-child(4) { animation-delay: 360ms; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero__status { display: inline-flex; align-items: center; gap: 10px; }
.hero__status .dot {
  width: 6px; height: 6px; background: var(--signal); display: block;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(79, 163, 199, 0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(79, 163, 199, 0); }
}

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: var(--s2); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); background: var(--surface-2); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s2); }
.form label { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; background: #0F1214; border: 1px solid #242A2F;
  color: var(--paper); font-family: var(--font-body); font-size: 15px; line-height: 1.6;
  letter-spacing: normal; text-transform: none; border-radius: var(--radius);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--signal); }
.form .btn { justify-content: center; margin-top: 4px; }
.form-status { font-size: 14px; color: var(--signal); }
.form-status[hidden] { display: none; }

/* ---------- Document pages ---------- */

.doc { max-width: 760px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(64px, 8vw, 110px); }
.doc__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.doc__brand img { width: 56px; height: 56px; border-radius: 12px; }
.doc__brand span { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.doc__date { color: #6C757E; font-size: 14px; font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 clamp(32px, 4vw, 48px); }
.doc__lede { font-size: 19px; line-height: 1.7; color: #D6DBE0; margin: 0 0 clamp(36px, 4vw, 52px); }
.doc section { margin-bottom: 40px; }
.doc h2 { display: flex; align-items: baseline; gap: 12px; font-size: 20px; font-weight: 600; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.doc h2 .num { color: var(--signal); font-size: 13px; letter-spacing: 0.1em; }
.doc p { color: var(--muted-2); font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.doc p:last-child { margin-bottom: 0; }
.callout { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.callout strong { color: var(--paper); }

.faq { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.faq > div { background: var(--surface); padding: 26px clamp(22px, 3vw, 32px); }
.faq h3 { font-size: 17px; margin-bottom: 10px; }
.faq p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }

.panel { border: 1px solid var(--line); background: var(--surface-2); padding: clamp(26px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }

/* ---------- Footer ---------- */

.site-footer { padding: clamp(40px, 6vw, 72px) var(--gutter) 40px; border-top: 1px solid var(--line-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s3); font-size: 14px; }
.site-footer nav a, .site-footer .brand span { color: var(--muted); }
.site-footer .brand img { width: 46px; height: 30px; }
.site-footer small { font-size: 13px; color: var(--dim); }

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-header { flex-wrap: wrap; }
  .site-nav {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: var(--s2); padding: var(--s2) 0 var(--s1); border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero__grid, .hero__beam, .hero__mark::before, .hero__ring, .hero__copy > *, .hero__status .dot { animation: none !important; }
  .hero__beam, .hero__mark::before { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
