/* =====================================================================
   JARVIS OS — public shell stylesheet
   Self-contained. No external fonts, no CDNs, no remote assets.
   ===================================================================== */

:root {
  /* palette — deep space blue base, cyan→violet HUD, gold "armed" accent */
  --bg:        #05070d;
  --bg-2:      #080b14;
  --panel:     rgba(14, 20, 34, 0.55);
  --panel-line:rgba(120, 170, 255, 0.14);
  --cyan:      #38e1ff;
  --cyan-dim:  #1d6f86;
  --violet:    #9a6bff;
  --violet-dim:#5a3fa8;
  --gold:      #ffb23e;
  --green:     #3df5a0;
  --amber:     #ffb23e;
  --text:      #cdd8ee;
  --text-dim:  #7d8aa6;
  --text-faint:#54607a;

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(56, 225, 255, 0.28); color: #fff; }

/* =====================================================================
   BOOT SEQUENCE
   ===================================================================== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(120% 120% at 50% 40%, #070b16 0%, #03050a 70%, #000 100%);
  display: grid;
  place-items: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__inner { width: min(540px, 86vw); padding: 0 4vw; }

.boot__brand {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  font-family: var(--sans);
  text-align: center;
  margin-bottom: 1.4rem;
  text-shadow: 0 0 22px rgba(56, 225, 255, 0.5);
}
.boot__os { color: var(--cyan); margin-left: 0.12em; }

.boot__log {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cyan);
  min-height: 8.2em;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(56, 225, 255, 0.35);
}
.boot__log .ok   { color: var(--green); }
.boot__log .off  { color: var(--gold); }
.boot__log .cur  { color: var(--cyan); animation: blink 1s steps(1) infinite; }

.boot__bar {
  margin-top: 1.2rem;
  height: 2px;
  background: rgba(120, 170, 255, 0.12);
  overflow: hidden;
}
.boot__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px var(--cyan);
}

@keyframes blink { 50% { opacity: 0; } }

/* =====================================================================
   AMBIENT BACKGROUND
   ===================================================================== */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }

.bg__grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(rgba(56, 225, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 225, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(600px) rotateX(60deg) translateY(-8%);
  transform-origin: center top;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
  animation: gridDrift 18s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 46px, 46px 0; }
}

.bg__particles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; }

.bg__scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(56,225,255,0.10), transparent);
  filter: blur(2px);
  animation: scan 7.5s linear infinite;
}
@keyframes scan {
  0%   { transform: translateY(-200px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.bg__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0,0,0,0.55) 100%),
    radial-gradient(100% 100% at 50% 100%, rgba(90, 63, 168, 0.10), transparent 60%);
}

/* =====================================================================
   VIEWFINDER FRAME
   ===================================================================== */
.frame { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.frame__corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid rgba(56, 225, 255, 0.55);
  filter: drop-shadow(0 0 6px rgba(56,225,255,0.4));
}
.frame__corner--tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.frame__corner--tr { top: 16px; right: 16px; border-left: 0;  border-bottom: 0; }
.frame__corner--bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.frame__corner--br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }

/* =====================================================================
   LAYOUT SHELL
   ===================================================================== */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4.5rem) clamp(1.4rem, 5vw, 3rem) 2rem;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  min-height: 64vh;
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
}
.hero__title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3.2rem, 13vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  margin: 0.7rem 0 0.5rem;
  color: #fff;
  text-shadow: 0 0 40px rgba(56, 225, 255, 0.25);
}
.hero__title-os {
  color: var(--cyan);
  -webkit-text-stroke: 1px var(--cyan);
  text-stroke: 1px var(--cyan);
  color: transparent;
  margin-left: 0.14em;
  text-shadow: 0 0 24px rgba(56, 225, 255, 0.5);
}
.hero__subtitle {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  color: var(--violet);
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}
.hero__desc {
  color: var(--text-dim);
  font-size: clamp(0.9rem, 2vw, 1rem);
  max-width: 46ch;
  margin-bottom: 1.6rem;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--panel-line);
  color: var(--text-dim);
  background: var(--panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tag--core { border-color: rgba(61,245,160,0.4); color: var(--green); }
.tag--cloud { border-color: rgba(255,178,62,0.4); color: var(--gold); }
.tag--tele { border-color: rgba(154,107,255,0.4); color: var(--violet); }

/* signature reticle */
.reticle {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.reticle__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(56, 225, 255, 0.25);
}
.reticle__ring--outer { inset: 0; border-style: dashed; animation: spin 30s linear infinite; }
.reticle__ring--mid   { inset: 16%; border-color: rgba(154,107,255,0.35); animation: spin 22s linear infinite reverse; }
.reticle__ring--inner { inset: 32%; border-color: rgba(56,225,255,0.45); box-shadow: inset 0 0 30px rgba(56,225,255,0.15); }
@keyframes spin { to { transform: rotate(360deg); } }

.reticle__sweep {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(56,225,255,0.45) 40deg, transparent 80deg);
  animation: spin 4s linear infinite;
  mask: radial-gradient(circle, transparent 52%, #000 53%);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%);
}
.reticle__core {
  position: relative;
  z-index: 2;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(circle, rgba(56,225,255,0.18), rgba(5,7,13,0.9));
  border: 1px solid rgba(56,225,255,0.5);
  box-shadow: 0 0 30px rgba(56,225,255,0.3), inset 0 0 20px rgba(56,225,255,0.2);
}
.reticle__core-label { font-size: 0.52rem; letter-spacing: 0.22em; color: var(--text-dim); }
.reticle__core-state { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--gold); font-weight: 700; text-shadow: 0 0 10px rgba(255,178,62,0.6); }

.reticle__tick { position: absolute; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.reticle__tick--n, .reticle__tick--s { width: 2px; height: 12px; left: 50%; transform: translateX(-50%); }
.reticle__tick--e, .reticle__tick--w { height: 2px; width: 12px; top: 50%; transform: translateY(-50%); }
.reticle__tick--n { top: -2px; } .reticle__tick--s { bottom: -2px; }
.reticle__tick--e { right: -2px; } .reticle__tick--w { left: -2px; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: clamp(2.2rem, 6vw, 4rem) 0; }
.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--panel-line);
  padding-bottom: 0.8rem;
}
.section__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  letter-spacing: 0.04em;
  color: #fff;
}
.section__index {
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

/* =====================================================================
   STATUS PANEL
   ===================================================================== */
.status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
}
.stat {
  position: relative;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent, var(--cyan));
  opacity: 0.7;
}
.stat__led {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent, var(--cyan));
  box-shadow: 0 0 10px var(--accent, var(--cyan));
  margin-bottom: 0.4rem;
  animation: pulse 2.6s var(--ease) infinite;
}
.stat__label { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); }
.stat__value { font-size: 1.05rem; color: var(--accent, var(--cyan)); letter-spacing: 0.02em; }

.stat[data-state="online"]   { --accent: var(--green); }
.stat[data-state="private"]  { --accent: var(--violet); }
.stat[data-state="armed"]    { --accent: var(--gold); }
.stat[data-state="sealed"]   { --accent: var(--cyan); }
.stat[data-state="disabled"] { --accent: var(--text-dim); }
.stat[data-state="zero"]     { --accent: var(--green); }

/* =====================================================================
   FEATURE GRID
   ===================================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.card {
  position: relative;
  padding: 1.4rem 1.3rem;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
  cursor: default;
}
/* mouse-follow glow driven by JS custom props --mx / --my */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(56,225,255,0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.card:hover, .card:focus-visible {
  border-color: rgba(56,225,255,0.5);
  transform: translateY(-3px);
  outline: none;
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card__id {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  border: 1px solid var(--panel-line);
  padding: 0.15rem 0.45rem;
  display: inline-block;
  margin-bottom: 0.9rem;
}
.card__title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.card__body { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }

/* =====================================================================
   TERMINAL / CONSOLE
   ===================================================================== */
.terminal {
  background: rgba(4, 6, 12, 0.85);
  border: 1px solid var(--panel-line);
  box-shadow: 0 0 40px rgba(0,0,0,0.5), inset 0 0 60px rgba(56,225,255,0.03);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--panel-line);
}
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); }
.terminal__dot:nth-child(1) { background: var(--gold); }
.terminal__dot:nth-child(2) { background: var(--cyan); }
.terminal__dot:nth-child(3) { background: var(--violet); }
.terminal__name { margin-left: 0.6rem; font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.08em; }
.terminal__body {
  padding: 1.2rem 1.2rem;
  font-size: clamp(0.7rem, 2.3vw, 0.86rem);
  color: var(--text);
  overflow-x: auto;
  line-height: 1.8;
}
.t-ok { color: var(--green); } .t-warn { color: var(--gold); } .t-dim { color: var(--text-faint); }
.terminal__note {
  padding: 0.7rem 1.2rem 1rem;
  font-size: 0.7rem;
  color: var(--text-faint);
  border-top: 1px solid var(--panel-line);
  letter-spacing: 0.04em;
}

/* =====================================================================
   PRIVACY
   ===================================================================== */
.privacy {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.privacy__lead { font-size: clamp(1rem, 2.6vw, 1.25rem); color: #fff; margin-bottom: 1.2rem; }
.privacy__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem 1.4rem;
  margin-bottom: 1.4rem;
}
.privacy__list li { font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.6em; }
.check { color: var(--green); font-weight: 700; text-shadow: 0 0 8px rgba(61,245,160,0.5); }
.privacy__core {
  font-size: 0.9rem;
  color: var(--text-dim);
  border-left: 2px solid var(--violet);
  padding-left: 1rem;
}
.privacy__core strong { color: var(--violet); }

/* =====================================================================
   SECURITY (security.txt)
   ===================================================================== */
.security {
  background: rgba(4, 6, 12, 0.85);
  border: 1px solid var(--panel-line);
  overflow-x: auto;
}
.security__txt {
  padding: 1.4rem;
  font-size: clamp(0.7rem, 2.2vw, 0.84rem);
  line-height: 1.85;
  color: var(--text);
}
.security__txt a { color: var(--cyan); text-decoration: none; }
.security__txt a:hover { text-decoration: underline; }

/* =====================================================================
   IDENTITY
   ===================================================================== */
.identity {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.identity__line { font-size: clamp(0.95rem, 2.4vw, 1.1rem); color: var(--text-dim); margin-bottom: 1rem; }
.identity__domain { color: #fff; letter-spacing: 0.03em; }
.identity__mail {
  display: inline-block;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.identity__mail:hover { border-color: var(--cyan); text-shadow: 0 0 14px rgba(56,225,255,0.5); }
.identity__note { margin-top: 0.9rem; font-size: 0.74rem; color: var(--text-faint); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  border-top: 1px solid var(--panel-line);
  text-align: center;
  padding: 2.4rem 1.4rem 3rem;
  margin-top: 2rem;
}
.footer__brand {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 1.1rem;
  color: #fff;
}
.footer__line { margin-top: 0.7rem; font-size: 0.76rem; color: var(--text-faint); letter-spacing: 0.06em; }

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: center; padding-top: 1rem; }
  .hero__text { order: 2; }
  .reticle { order: 1; width: min(260px, 64vw); margin-bottom: 1.5rem; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__meta { justify-content: center; }
  .eyebrow { justify-content: center; }
  .frame__corner { width: 18px; height: 18px; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .bg__scan, .reticle__sweep { display: none; }
}
