/* ============================================================
   Rugproof — landing CSS
   Aesthetic: Editorial brutalism with honey accent.
   Display: Fraunces (italic serif) — IBM Plex Mono / Manrope body.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..900;1,9..144,400..900&family=IBM+Plex+Mono:wght@300;400;500;700&family=Manrope:wght@300;400;500;700;800&display=swap");

:root {
  --bg:        #0a0904;
  --bg-2:      #0e0c06;
  --surface:   #14110b;
  --surface-2: #1c180f;
  --border:    #2a2317;
  --border-bright: #3d3422;
  --text:      #f5f0e6;
  --text-mid:  #c2b9a4;
  --text-dim:  #7a7264;

  --honey:        #f5a524;
  --honey-bright: #ffc24a;
  --honey-deep:   #c4811a;
  --mint:         #4cf0c4;
  --mint-deep:    #2bbf95;
  --critical:     #ff3358;
  --warn:         #ffb649;

  --display: "Fraunces", ui-serif, Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, "JetBrains Mono", monospace;
  --body:    "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  --rad-sm: 4px;
  --rad-md: 10px;
  --rad-lg: 18px;

  --shadow-honey: 0 0 60px rgba(245, 165, 36, 0.18);
  --shadow-mint:  0 0 80px rgba(76, 240, 196, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Animated honeycomb backdrop
   ============================================================ */
.bg-honeycomb {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 30% 0%, rgba(245, 165, 36, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(76, 240, 196, 0.06) 0%, transparent 50%);
}
.bg-honeycomb::before {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 52'><path d='M30 1 L58 17 L58 35 L30 51 L2 35 L2 17 Z' fill='none' stroke='rgba(245,165,36,0.06)' stroke-width='1'/></svg>");
  background-size: 60px 52px;
  animation: drift 120s linear infinite;
  opacity: 0.7;
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-60px, -52px); }
}

/* Subtle grain overlay */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   Typography helpers
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.display-italic {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
}
.mono { font-family: var(--mono); }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--honey);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--honey);
  display: inline-block;
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 4, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}
.logo .logo-mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--honey-bright), var(--honey-deep));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  position: relative;
  box-shadow: var(--shadow-honey);
}
.logo .logo-mark::after {
  content: "R";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  color: var(--bg);
  font-size: 14px;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover { color: var(--honey); }
.nav-links .cta {
  background: var(--honey);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--rad-sm);
  font-weight: 600;
  transition: all 0.18s ease;
}
.nav-links .cta:hover {
  background: var(--honey-bright);
  transform: translateY(-1px);
  box-shadow: var(--shadow-honey);
}
@media (max-width: 720px) {
  .nav-links { gap: 16px; font-size: 12px; }
  .nav-links a:not(.cta) { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 100px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.hero h1 .it {
  font-style: italic;
  font-weight: 300;
  color: var(--honey);
  position: relative;
  display: inline-block;
}
.hero h1 .it::after {
  content: "";
  position: absolute;
  left: 0; right: -8px; bottom: 6%;
  height: 18%;
  background: var(--honey);
  opacity: 0.12;
  transform: skew(-6deg);
  z-index: -1;
}
.hero .lede {
  font-size: 19px;
  color: var(--text-mid);
  max-width: 32em;
  margin-bottom: 36px;
  line-height: 1.5;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: var(--rad-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.18s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--honey);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--honey-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-honey);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  border-color: var(--honey);
  color: var(--honey);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.hero-meta b { color: var(--mint); font-weight: 500; }

/* Hero terminal panel */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--rad-md);
  overflow: hidden;
  font-family: var(--mono);
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.03);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 12px;
  color: var(--text-dim);
}
.terminal-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--border-bright);
}
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #febc2e; }
.terminal-dot.g { background: #28c840; }
.terminal-title {
  margin-left: auto;
  letter-spacing: 0.08em;
}
.terminal-body {
  padding: 22px 24px 26px;
  font-size: 13.5px;
  line-height: 1.7;
  min-height: 290px;
}
.term-line { white-space: pre; }
.term-prompt { color: var(--honey); }
.term-cmd    { color: var(--text); }
.term-out    { color: var(--text-mid); }
.term-out .ok    { color: var(--mint); }
.term-out .crit  { color: var(--critical); }
.term-out .warn  { color: var(--warn); }
.term-out .dim   { color: var(--text-dim); }
.term-out .accent { color: var(--honey); }
.cursor {
  display: inline-block;
  width: 9px;
  height: 16px;
  background: var(--honey);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ============================================================
   Marquee chains
   ============================================================ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 100px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(to right, var(--bg-2), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left,  var(--bg-2), transparent); }
.marquee-track {
  display: flex;
  gap: 64px;
  width: fit-content;
  animation: marquee 28s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-mid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.marquee-track span::before {
  content: "◇";
  color: var(--honey);
  font-size: 10px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================================
   Stats strip
   ============================================================ */
.stats {
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  background: var(--surface);
  overflow: hidden;
}
@media (max-width: 880px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:nth-child(odd) { border-right: 1px solid var(--border); }
  .stats-grid > div { border-bottom: 1px solid var(--border); }
}
.stat-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 64px;
  line-height: 1;
  color: var(--honey);
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

/* ============================================================
   Generic section
   ============================================================ */
section.block {
  padding: 100px 0;
  position: relative;
}
section.block + section.block { padding-top: 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  max-width: 16em;
}
.section-head h2 .it { font-style: italic; color: var(--honey); }
.section-head .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  max-width: 28em;
  text-align: right;
}

/* ============================================================
   Feature grid (brutalist panels)
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  overflow: hidden;
}
@media (max-width: 980px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  padding: 36px 30px;
  position: relative;
  transition: background 0.2s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature:hover {
  background: var(--surface-2);
}
.feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--honey);
  transition: width 0.3s ease;
}
.feature:hover::before { width: 100%; }
.feature-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--honey);
  letter-spacing: 0.15em;
}
.feature h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.feature h3 .it { font-style: italic; color: var(--text-mid); }
.feature p {
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.55;
}
.feature p code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--honey);
}

/* ============================================================
   Sample reports cards
   ============================================================ */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .sample-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sample-grid { grid-template-columns: 1fr; } }
.sample-card {
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  display: block;
}
.sample-card:hover {
  border-color: var(--honey);
  transform: translateY(-4px);
  box-shadow: var(--shadow-honey);
}
.sample-card img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.sample-card-meta {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}
.sample-card-meta .name { color: var(--text); font-weight: 500; }
.sample-card-meta .grade {
  color: var(--critical);
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
}

/* ============================================================
   Install section (code block)
   ============================================================ */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) { .install-grid { grid-template-columns: 1fr; } }
.install-card {
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  background: var(--surface);
  padding: 28px 28px 32px;
}
.install-card h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 18px;
}
.install-card .step {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--text);
}
.code-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--rad-sm);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text);
  overflow-x: auto;
  position: relative;
  line-height: 1.6;
}
.code-block .k { color: var(--honey); }     /* keyword */
.code-block .c { color: var(--text-dim); }  /* comment */
.code-block .s { color: var(--mint); }      /* string */
.code-block .copy {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.code-block .copy:hover {
  border-color: var(--honey);
  color: var(--honey);
}
.code-block .copy.copied {
  border-color: var(--mint);
  color: var(--mint);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  background: var(--bg-2);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .display-italic {
  font-size: 38px;
  margin-bottom: 8px;
  color: var(--honey);
}
.footer-brand p {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 13px;
  max-width: 22em;
  line-height: 1.55;
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--honey); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.20s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.30s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.40s; }

/* Floating shield decoration in hero */
.hero-deco {
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}
.hero-deco svg { width: 100%; height: 100%; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-18px) rotate(-6deg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
