/* EzyShield — Sentinel theme (dark / terminal aesthetic) */

:root {
  /* Background layers */
  --bg:        oklch(0.158 0.012 250);
  --bg2:       oklch(0.182 0.013 250);
  --panel:     oklch(0.205 0.013 250);
  --panel2:    oklch(0.235 0.014 250);

  /* Borders */
  --line:      oklch(0.295 0.014 250);
  --line-soft: oklch(0.245 0.013 250);

  /* Text */
  --text:      oklch(0.95 0.008 250);
  --dim:       oklch(0.70 0.012 250);
  --faint:     oklch(0.60 0.012 250); /* WCAG AA: ≥4.5:1 on bg/bg2/panel for small text */

  /* Accent palette */
  --green:     oklch(0.82 0.16 152);
  --green-ink: oklch(0.20 0.04 152);
  --amber:     oklch(0.83 0.15 78);
  --red:       oklch(0.71 0.17 22);
  --blue:      oklch(0.76 0.11 240);

  /* Typography */
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;

  /* Layout */
  --maxw:   1180px;
  --gutter: 28px;
  --radius: 10px;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: var(--green-ink); }

/* ===== Focus (keyboard) ===== */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--green);
  border-radius: 7px;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 13px;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ===== Layout helpers ===== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== Typography atoms ===== */
.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.section-num {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.08;
}

/* ===== Shield icon ===== */
.shield {
  width: 16px;
  height: 19px;
  background: var(--green);
  clip-path: polygon(50% 0, 100% 22%, 100% 60%, 50% 100%, 0 60%, 0 22%);
  flex-shrink: 0;
  display: inline-block;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: var(--green-ink);
  font-weight: 600;
}
.btn-primary:hover { background: oklch(0.86 0.16 152); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ===== Tags / badges ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--dim);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--green);
  flex-shrink: 0;
}
.dot.live {
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ===== Navigation ===== */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.158 0.012 250 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 8px;
}
.nav-links a {
  font-size: 14px;
  color: var(--dim);
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.lang-toggle button.active {
  background: var(--green);
  color: var(--green-ink);
}
.lang-toggle button:hover:not(.active) { color: var(--dim); }

/* GitHub button */
.ghub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.ghub:hover { color: var(--text); border-color: var(--line); }

/* Theme switcher link */
.theme-switch {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.theme-switch:hover { color: var(--dim); border-color: var(--line-soft); }

/* Intermediate widths: tighten the nav so the larger brand wordmark + links
   stay on one line; collapse the verbose GitHub label to just the star. */
@media (max-width: 1240px) {
  .nav-inner { gap: 18px; }
  .nav-links { gap: 16px; }
  .nav-links a { white-space: nowrap; }
  .ghub span:last-child { display: none; }
}

/* Mobile nav + hero stack */
@media (max-width: 768px) {
  .nav-inner { gap: 12px; }
  .nav-links {
    margin-left: 0;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    flex: 1;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  .ghub span:last-child { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1   { max-width: none; }
  .hero .sub { font-size: 16px; }
}

/* Hide the secondary nav links on very narrow screens where they'd crowd
   the theme/lang/GitHub controls — footer still provides full navigation. */
@media (max-width: 540px) {
  .nav-links { display: none; }
  /* Keep the header tight on phones so the larger logo never overflows */
  .nav-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-icon { height: 34px; width: 34px; }
  .brand-wordmark { font-size: 21px; }
  .theme-switch-label { display: none; }
  .theme-switch { padding: 6px 8px; }
}

/* Smallest phones (iPhone SE ~320px): shrink the wordmark a touch more */
@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .nav-inner { gap: 8px; }
  .brand { gap: 7px; }
  .brand-icon { height: 30px; width: 30px; }
  .brand-wordmark { font-size: 17px; }
}

/* ===== Sections ===== */
.band {
  padding: 96px 0;
  border-top: 1px solid var(--line-soft);
}

.sec-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.sec-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 12px 0; }
.lead { color: var(--dim); font-size: 17px; margin: 0; }

/* ===== Brand (header: shield icon + HTML wordmark) ===== */
/* Wordmark mirrors .foot-wordmark so the header matches the footer. */
.brand-icon {
  display: block;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}
.brand-wordmark {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 72px;
}
.hero .wrap { position: relative; z-index: 1; }

.gridbg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(oklch(0.30 0.014 250 / 0.35) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.30 0.014 250 / 0.35) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.7rem);
  margin: 20px 0 22px;
  max-width: 14ch;
}

.hero .sub {
  font-size: 18px;
  color: var(--dim);
  max-width: 52ch;
  margin: 0 0 30px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 16px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  margin: 0;
}

/* ===== Terminal window (Sentinel hero) ===== */
.term {
  background: oklch(0.135 0.012 250);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px oklch(0 0 0 / 0.7);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
  flex-wrap: nowrap;
}

.term-bar .lights {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.term-bar .lights span {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--line);
}

.term-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.term-bar .tag { flex-shrink: 0; }

.term-body {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.95;
  min-height: 304px;
}

.tline {
  display: grid;
  grid-template-columns: 64px 52px 1fr;
  gap: 10px;
  animation: rowin .4s ease;
}

@keyframes rowin {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.tline .ts    { color: var(--faint); }
.tline .verb  { font-weight: 600; }
.tline .verb.ban   { color: var(--red); }
.tline .verb.warn  { color: var(--amber); }
.tline .verb.watch { color: var(--blue); }
.tline .rest  { color: var(--dim); }
.tline .rest b { color: var(--text); font-weight: 500; }

.tcursor {
  color: var(--green);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tline { animation: none; opacity: 1; }
  .dot.live { animation: none; }
  .tcursor  { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Copy command block ===== */
.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 13.5px;
  overflow: hidden;
}
.cmd .prompt { color: var(--green); flex-shrink: 0; }
.cmd code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  background: none;
  padding: 0;
  color: var(--text);
}
.cmd .copy {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.cmd .copy:hover { color: var(--green); border-color: var(--green); }
.cmd .copy.copied { color: var(--green); border-color: var(--green); background: oklch(0.20 0.04 152 / 0.4); }

/* ===== Scroll reveal ===== */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.js-anim .reveal.in { opacity: 1; transform: none; }

/* ===== How it works — steps ===== */
.steps {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.step {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.step-key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 12px;
}

.step p {
  color: var(--dim);
  font-size: 15px;
  margin: 0;
  line-height: 1.65;
  flex: 1;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 22px;
  flex-shrink: 0;
  user-select: none;
}

@media (max-width: 768px) {
  .steps {
    flex-direction: column;
  }
  .step-connector {
    padding: 8px 0;
    align-self: center;
    display: block;
    transform: rotate(90deg);
    font-size: 18px;
  }
}

/* ===== Features grid ===== */
.band.alt {
  background: var(--bg2);
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s ease;
}

.feat-card:hover { border-color: var(--green); }

.feat-ic {
  font-size: 24px;
  line-height: 1;
  color: var(--green);
}
.feat-ic svg {
  display: block;
  width: 26px;
  height: 26px;
}

.feat-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0;
}

.feat-card p {
  color: var(--dim);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .feat-grid { grid-template-columns: 1fr; }
}

/* ===== Integrations grid ===== */
.integ-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.integ-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: border-color .2s;
}

.integ-col:hover { border-color: var(--green); }

.integ-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.integ-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.integ-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  background: var(--panel2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 7px 10px;
  transition: border-color .15s, color .15s;
}

.integ-chip:hover { border-color: var(--green); color: var(--text); }

.integ-sq {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.integ-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--faint);
  margin-left: auto;
}

/* "soon" — secondary label on planned integrations */
.integ-soon {
  font-family: var(--mono);
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  background: var(--panel2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .integ-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .integ-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .integ-grid { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 40px;
  color: var(--faint);
  font-size: 13px;
  font-family: var(--mono);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.foot-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.foot-logo img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.foot-wordmark {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.foot-brand p {
  margin: 0;
  line-height: 1.65;
  max-width: 280px;
}
.foot-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot-col a {
  display: block;
  color: var(--faint);
  margin-bottom: 10px;
  transition: color .15s;
}
.foot-col a:hover { color: var(--green); }
.foot-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 768px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ===== Quick start steps ===== */
.qs-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qs-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s;
}

.qs-step:hover { border-color: var(--green); }

.qs-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--green);
  padding-top: 3px;
  flex-shrink: 0;
  min-width: 28px;
}

.qs-body { flex: 1; min-width: 0; }

.qs-body h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 8px;
}

.qs-body > p {
  color: var(--dim);
  font-size: 15px;
  margin: 0 0 16px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .qs-step { flex-direction: column; gap: 14px; }
}

/* ===== FAQ accordion ===== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item.open { border-color: var(--green); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: none;
  padding: 20px 24px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: color .15s;
}

.faq-q:hover { color: var(--green); }
.faq-item.open .faq-q { color: var(--green); }

.faq-q::after {
  content: '+';
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--green);
  flex-shrink: 0;
  transition: transform .3s ease;
  line-height: 1;
  display: inline-block;
}

.faq-item.open .faq-q::after { transform: rotate(45deg); }

/* No-JS fallback: answers visible */
.faq-a-inner p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.7;
}

/* JS-enhanced accordion */
.js-faq .faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s ease;
}

.js-faq .faq-item.open .faq-a { grid-template-rows: 1fr; }

.js-faq .faq-a-inner {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js-faq .faq-a { transition: none; }
  .faq-q::after { transition: none; }
}
