/* ==========================================================================
   FileToHash — Design tokens
   ========================================================================== */
:root{
  --bg:            #090d0e;
  --bg-alt:        #0d1315;
  --panel:         #101819;
  --panel-raised:  #131d1f;
  --border:        #1c2828;
  --border-bright: #24413b;

  --primary:       #00997c;
  --primary-bright:#1fd6ac;
  --primary-dim:   #04473b;
  --primary-wash:  rgba(0,153,124,0.10);

  --amber:         #c98a3e;
  --amber-wash:    rgba(201,138,62,0.12);
  --red:           #c15454;
  --red-wash:      rgba(193,84,84,0.12);

  --text:          #e7efec;
  --text-muted:    #93a6a1;
  --text-faint:    #5d6e6a;

  --font-display:  'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:     'Inter', 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Consolas', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-panel: 0 1px 0 rgba(255,255,255,0.02) inset, 0 20px 40px -20px rgba(0,0,0,0.6);
  --container: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{ font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
p{ margin: 0 0 1em; color: var(--text-muted); }
code, .mono{ font-family: var(--font-mono); }
button{ font-family: inherit; }

::selection{ background: var(--primary); color: #05100d; }

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

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Background texture — hexagon / circuit lattice
   ========================================================================== */
.hex-field{
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(0,153,124,0.05) 0%, rgba(9,13,14,0) 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cg fill='none' stroke='%2300997c' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M42 0 L84 24 L84 72 L42 96 L0 72 L0 24 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 84px 96px;
}
.circuit-fade{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(600px 420px at 82% -5%, rgba(0,153,124,0.16), transparent 60%),
              radial-gradient(500px 400px at 5% 110%, rgba(0,153,124,0.08), transparent 60%);
}

/* Slow diagonal "verification scan" sweep — a quiet nod to a hash/integrity
   check passing over the page. Kept faint and slow on purpose (brief calls
   for "not too flashy"); prefers-reduced-motion freezes it via the global
   rule further down. */
.scan-sweep{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.scan-sweep::after{
  content: "";
  position: absolute;
  top: -60%;
  left: -25%;
  width: 45%;
  height: 220%;
  background: linear-gradient(100deg, transparent 42%, rgba(31,214,172,0.05) 50%, transparent 58%);
  animation: scan-move 11s ease-in-out infinite;
  will-change: transform;
}
@keyframes scan-move{
  0%   { transform: translateX(-10vw) rotate(0deg); }
  50%  { transform: translateX(120vw) rotate(0deg); }
  100% { transform: translateX(-10vw) rotate(0deg); }
}

/* ==========================================================================
   Scroll-reveal — applied by JS only (assets/js/main.js), so content stays
   fully visible if JavaScript never runs. Elements start hidden only once
   main.js adds the .reveal class right before observing them.
   ========================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.16,.8,.3,1), transform .6s cubic-bezier(.16,.8,.3,1);
}
.reveal.in-view{
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Utility layout
   ========================================================================== */
.wrap{ max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.section{ padding: 96px 0; border-top: 1px solid var(--border); }
.section:first-of-type{ border-top: none; }
.section-head{ max-width: 640px; margin-bottom: 48px; }
.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary-bright); margin-bottom: 14px;
}
.eyebrow::before{ content:""; width: 7px; height: 7px; background: var(--primary); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.section-head h2{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.section-head p{ font-size: 1.02rem; }

.grid{ display: grid; gap: 24px; }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr); } .grid-2{ grid-template-columns: 1fr; } }
@media (max-width: 620px){ .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--primary); color: #04140f;
  box-shadow: 0 0 0 1px var(--primary-dim), 0 10px 24px -10px rgba(0,153,124,0.55);
}
.btn-primary:hover{ background: var(--primary-bright); box-shadow: 0 0 0 1px var(--primary-bright), 0 14px 30px -12px rgba(31,214,172,0.6); }
.btn-ghost{
  background: transparent; color: var(--text); border-color: var(--border-bright);
}
.btn-ghost:hover{ border-color: var(--primary); color: var(--primary-bright); background: var(--primary-wash); }
.btn-sm{ padding: 9px 16px; font-size: 0.85rem; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,13,14,0.82);
  backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid var(--border);
}
.nav{ display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; max-width: var(--container); margin: 0 auto; }
.brand{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand-mark{ width: 30px; height: 30px; flex-shrink: 0; }
.brand small{ display:block; font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .1em; color: var(--text-faint); text-transform: uppercase; }

.nav-links{ display: flex; align-items: center; gap: 2px; }
.nav-links a{
  padding: 9px 14px; font-size: 0.92rem; color: var(--text-muted); border-radius: var(--radius-sm);
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover{ color: var(--text); background: var(--panel-raised); }
.nav-links a.active{ color: var(--primary-bright); }
.nav-cta{ display: flex; align-items: center; gap: 10px; }

.nav-toggle{ display:none; background:none; border:1px solid var(--border-bright); border-radius: var(--radius-sm); width:40px;height:40px; color:var(--text); }
@media (max-width: 980px){
  .nav-links{ position:absolute; top:100%; left:0; right:0; flex-direction:column; align-items:stretch; background: var(--bg-alt); border-bottom:1px solid var(--border); padding: 8px; display:none; }
  .nav-links.open{ display:flex; }
  .nav-links a{ padding:12px 14px; }
  .nav-toggle{ display:block; }
  .nav-cta .btn-ghost{ display:none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{ padding: 84px 0 70px; position: relative; }
.hero-grid{ display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 980px){ .hero-grid{ grid-template-columns: 1fr; } }

.hero h1{ font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin-bottom: 20px; }
.hero h1 .accent{ color: var(--primary-bright); }
.hero .lead{ font-size: 1.12rem; max-width: 540px; margin-bottom: 32px; }
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta{ display:flex; gap: 22px; flex-wrap:wrap; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.hero-meta span{ display:flex; align-items:center; gap:7px; }
.hero-meta .dot{ width:6px;height:6px;border-radius:50%; background: var(--primary); }

/* Signature element: hash console */
.hash-console{
  background: linear-gradient(180deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.hash-console-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.015);
}
.hash-console-bar .dots{ display:flex; gap:6px; }
.hash-console-bar .dots span{ width:9px;height:9px;border-radius:50%; background: var(--border-bright); }
.hash-console-bar .label{ font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing:.06em; }
.hash-console-body{ padding: 22px 20px 26px; }
.hc-row{ margin-bottom: 16px; }
.hc-row:last-child{ margin-bottom: 0; }
.hc-row .k{ font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.hc-row .v{ font-family: var(--font-mono); font-size: 13px; color: var(--primary-bright); word-break: break-all; line-height:1.5; }
.hc-row .v.file{ color: var(--text); font-size: 13.5px; }
.hc-status{
  display:inline-flex; align-items:center; gap:8px; margin-top: 4px;
  font-family: var(--font-mono); font-size: 12px; color: var(--primary-bright);
  background: var(--primary-wash); border: 1px solid var(--primary-dim);
  padding: 6px 10px; border-radius: 999px;
}
.hc-status .pip{ width:7px;height:7px;border-radius:50%; background: var(--primary-bright); box-shadow: 0 0 8px var(--primary-bright); }
.hc-progress{ height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 14px; }
.hc-progress i{ display:block; height:100%; width:38%; background: linear-gradient(90deg, var(--primary-dim), var(--primary-bright)); animation: hcbar 2.6s ease-in-out infinite; }
@keyframes hcbar{ 0%{ width: 10%;} 50%{ width: 92%;} 100%{ width: 10%;} }

/* ==========================================================================
   Cards
   ========================================================================== */
.card{
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 26px; transition: border-color .18s ease, transform .18s ease, background-color .18s ease;
}
.card:hover{ border-color: var(--border-bright); background: var(--panel-raised); transform: translateY(-2px); }
.card .icon{
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--primary-wash); border: 1px solid var(--primary-dim);
  display:flex; align-items:center; justify-content:center; margin-bottom: 18px; color: var(--primary-bright);
}
.card h3{ font-size: 1.05rem; margin-bottom: 8px; }
.card p{ font-size: 0.92rem; margin-bottom: 0; }

.card-flat{
  background: var(--bg-alt); border:1px solid var(--border); border-radius: var(--radius-md); padding: 22px;
}

/* Doc cards */
.doc-card{ display:flex; gap:16px; align-items:flex-start; }
.doc-card .icon{ margin-bottom:0; }
.doc-card h3{ margin-bottom:4px; font-size:1rem; }
.doc-card p{ font-size: .87rem; margin-bottom: 10px; }
.doc-card a.link{ font-size: .84rem; color: var(--primary-bright); font-family: var(--font-mono); }
.doc-card a.link:hover{ text-decoration: underline; }

/* ==========================================================================
   Tables
   ========================================================================== */
table{ width:100%; border-collapse: collapse; font-size: 0.92rem; }
th, td{ text-align:left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th{ color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight:500; }
td{ color: var(--text-muted); }
tr:last-child td{ border-bottom: none; }

/* ==========================================================================
   Badges / labels
   ========================================================================== */
.badge{
  display:inline-flex; align-items:center; gap:6px; font-family: var(--font-mono); font-size: 11px;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-bright); color: var(--text-muted);
}
.badge-primary{ color: var(--primary-bright); border-color: var(--primary-dim); background: var(--primary-wash); }
.badge-amber{ color: var(--amber); border-color: rgba(201,138,62,0.35); background: var(--amber-wash); }

/* Callouts */
.callout{ border-radius: var(--radius-md); border: 1px solid var(--border-bright); padding: 18px 20px; display:flex; gap:14px; background: var(--panel); }
.callout.warn{ border-color: rgba(201,138,62,0.35); background: var(--amber-wash); }
.callout.info{ border-color: var(--primary-dim); background: var(--primary-wash); }
.callout .icon{ flex-shrink:0; color: var(--amber); margin-top:2px; }
.callout.info .icon{ color: var(--primary-bright); }
.callout h4{ margin: 0 0 4px; font-size: .95rem; }
.callout p{ margin:0; font-size: .88rem; }

/* ==========================================================================
   Steps
   ========================================================================== */
.steps{ counter-reset: step; display:grid; gap: 18px; }
.step{ display:flex; gap:16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step:last-child{ border-bottom:none; }
.step .num{
  counter-increment: step; flex-shrink:0; width:34px;height:34px; border-radius:50%;
  border:1px solid var(--primary-dim); color: var(--primary-bright); font-family: var(--font-mono); font-size:13px;
  display:flex; align-items:center; justify-content:center;
}
.step .num::before{ content: counter(step, decimal-leading-zero); }
.step h4{ margin:0 0 4px; font-size: .98rem; }
.step p{ margin:0; font-size:.9rem; }

/* ==========================================================================
   Screenshots
   ========================================================================== */
.shot{
  border-radius: var(--radius-lg); border:1px solid var(--border-bright); overflow:hidden;
  background: linear-gradient(160deg, var(--panel-raised), var(--panel));
  box-shadow: var(--shadow-panel);
}
.shot-frame{
  aspect-ratio: 16/10; display:flex; align-items:center; justify-content:center; position: relative;
  background:
    linear-gradient(135deg, rgba(0,153,124,0.08), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 14px);
}
.shot-frame .ph{
  display:flex; flex-direction:column; align-items:center; gap:10px; color: var(--text-faint);
  font-family: var(--font-mono); font-size: 12px; text-align:center; letter-spacing: .04em;
}
.shot-frame svg{ opacity:.55; }
.shot-caption{ padding: 14px 18px; border-top:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.shot-caption h4{ margin:0; font-size:.92rem; }
.shot-caption span{ font-family: var(--font-mono); font-size:11px; color: var(--text-faint); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid{ display:grid; gap:18px; }
.field label{ display:block; font-size:.85rem; color: var(--text-muted); margin-bottom:7px; font-weight:500; }
.field input, .field select, .field textarea{
  width:100%; background: var(--bg-alt); border:1px solid var(--border-bright); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .92rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash);
}
.field textarea{ resize: vertical; min-height: 130px; }
.field .hint{ font-size: .78rem; color: var(--text-faint); margin-top: 6px; }
.honeypot{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.form-msg{ font-size:.86rem; padding:12px 14px; border-radius: var(--radius-sm); display:none; margin-bottom:16px; }
.form-msg.show{ display:block; }
.form-msg.ok{ background: var(--primary-wash); border:1px solid var(--primary-dim); color: var(--primary-bright); }
.form-msg.err{ background: var(--red-wash); border:1px solid rgba(193,84,84,0.4); color: #e79a9a; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-item{ border-bottom:1px solid var(--border); }
.faq-item:first-child{ border-top:1px solid var(--border); }
.faq-q{
  width:100%; display:flex; justify-content:space-between; align-items:center; gap:16px;
  background:none; border:none; color: var(--text); text-align:left; padding: 20px 4px;
  font-family: var(--font-display); font-size: 1rem; cursor:pointer;
}
.faq-q .plus{ flex-shrink:0; width:22px; height:22px; position:relative; }
.faq-q .plus::before, .faq-q .plus::after{ content:""; position:absolute; background: var(--primary-bright); border-radius:2px; }
.faq-q .plus::before{ top:50%; left:0; width:100%; height:2px; margin-top:-1px; }
.faq-q .plus::after{ left:50%; top:0; height:100%; width:2px; margin-left:-1px; transition: transform .2s ease; }
.faq-item.open .plus::after{ transform: rotate(90deg) scale(0); }
.faq-a{ max-height:0; overflow:hidden; transition: max-height .25s ease; }
.faq-a p{ padding: 0 4px 20px; font-size: .93rem; }
.faq-item.open .faq-a{ max-height: 320px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--bg-alt); }
.footer-grid{ display:grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; margin-bottom: 44px; }
@media (max-width: 800px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-brand{ display:flex; gap:10px; align-items:center; margin-bottom: 14px; }
.footer-tagline{ font-size:.88rem; max-width: 280px; }
.footer-col h5{ font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing:.08em; color: var(--text-faint); margin: 0 0 14px; }
.footer-col a{ display:block; font-size:.88rem; color: var(--text-muted); padding: 6px 0; }
.footer-col a:hover{ color: var(--primary-bright); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; border-top:1px solid var(--border); padding-top: 24px; font-size:.8rem; color: var(--text-faint); }
.footer-bottom .legal-links{ display:flex; gap:16px; flex-wrap:wrap; }
.footer-bottom .legal-links a:hover{ color: var(--primary-bright); }

/* ==========================================================================
   Page header (inner pages)
   ========================================================================== */
.page-hero{ padding: 64px 0 48px; }
.page-hero .eyebrow{ margin-bottom: 14px; }
.page-hero h1{ font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.page-hero p{ max-width: 620px; font-size: 1.02rem; }
.breadcrumb{ font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 18px; }
.breadcrumb a:hover{ color: var(--primary-bright); }

/* Legal content */
.legal-body h2{ font-size: 1.2rem; margin-top: 40px; }
.legal-body h2:first-child{ margin-top: 0; }
.legal-body h3{ font-size: 1rem; margin-top: 24px; color: var(--text); }
.legal-body p, .legal-body li{ color: var(--text-muted); font-size: .95rem; }
.legal-body ul{ margin: 0 0 1em; padding-left: 20px; list-style: disc; }
.legal-body li{ margin-bottom: 6px; }
.legal-meta{ font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-toc{ background: var(--panel); border:1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 40px; }
.legal-toc h5{ font-family: var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color: var(--text-faint); margin:0 0 12px; }
.legal-toc ol{ list-style: decimal; padding-left: 18px; display:grid; gap:6px; }
.legal-toc a{ font-size: .89rem; color: var(--text-muted); }
.legal-toc a:hover{ color: var(--primary-bright); }

.two-col-legal{ display:grid; grid-template-columns: 220px 1fr; gap: 48px; align-items:start; }
@media (max-width: 900px){ .two-col-legal{ grid-template-columns: 1fr; } }
.legal-nav{ position: sticky; top: 96px; display:grid; gap:4px; }
.legal-nav a{ font-size:.86rem; padding:8px 10px; border-radius: var(--radius-sm); color: var(--text-muted); }
.legal-nav a:hover, .legal-nav a.active{ background: var(--panel-raised); color: var(--primary-bright); }

/* CTA band */
.cta-band{
  border-radius: var(--radius-lg); padding: 52px 44px; text-align:center;
  background: radial-gradient(600px 260px at 50% 0%, rgba(0,153,124,0.16), transparent 70%), var(--panel);
  border: 1px solid var(--border-bright);
}
.cta-band h2{ font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px; }
.cta-band p{ max-width: 520px; margin: 0 auto 26px; }
.cta-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* Misc */
.mt-0{ margin-top:0; }
.text-center{ text-align:center; }
.divider{ height:1px; background: var(--border); border:none; margin: 40px 0; }
.small{ font-size:.85rem; color: var(--text-faint); }
