/* ============================================
   QR Forge — design tokens
   ============================================ */
:root{
  --ink:        #0B0E0F;
  --paper:      #F7F5F0;
  --surface:    #14171818;
  --surface-1:  #14171A;
  --surface-2:  #1C1F20;
  --line:       #2A2E2F;
  --muted:      #8B8F8C;
  --green:      #3CCB7F;
  --green-dim:  #1F4F38;
  --warn:       #E2A33D;

  --font-display: 'Space Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 10px;
  --container: 1080px;
}

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

html{ scroll-behavior:smooth; }

body{
  background:var(--ink);
  color:var(--paper);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  position:relative;
}

@media (prefers-reduced-motion:no-preference){
  body{ scroll-behavior:smooth; }
}

a{ color:inherit; text-decoration:none; }

.wrap{
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
}

/* subtle grain/scan texture overlay */
.grain{
  position:fixed; inset:0; pointer-events:none; z-index:1;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 3px);
  mix-blend-mode:overlay;
  opacity:0.5;
}

/* ============================================
   Topbar
   ============================================ */
.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(11,14,15,0.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  height:64px;
}
.brand{
  font-family:var(--font-display);
  font-weight:700;
  font-size:18px;
  letter-spacing:0.02em;
  display:flex; align-items:center; gap:10px;
}
.brand-accent{ color:var(--green); }
.brand-mark{
  display:inline-grid;
  grid-template-columns:6px 6px 6px;
  grid-template-rows:6px 6px 6px;
  gap:2px;
  width:20px; height:20px;
}
.brand-mark span{ background:var(--paper); }
.brand-mark span.dot{ background:var(--green); }
.brand-mark span:nth-child(1){ grid-area:1/1; }
.brand-mark span:nth-child(2){ grid-area:1/3; }
.brand-mark span:nth-child(3){ grid-area:3/1; }
.brand-mark span.dot{ grid-area:3/3; }

.topbar-link{
  font-size:13px;
  color:var(--muted);
  border:1px solid var(--line);
  padding:8px 14px;
  border-radius:999px;
  transition:border-color .15s, color .15s;
}
.topbar-link:hover{ border-color:var(--green); color:var(--paper); }

/* ============================================
   Hero
   ============================================ */
.hero{
  padding:72px 28px 56px;
  display:grid;
  gap:48px;
}
@media(min-width:980px){
  .hero{ grid-template-columns:1fr; }
}

.eyebrow{
  font-family:var(--font-display);
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--green);
  margin-bottom:18px;
}

.hero-copy h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(34px, 6vw, 60px);
  line-height:1.05;
  letter-spacing:-0.01em;
  max-width:14ch;
}
.ink-underline{
  position:relative;
  color:var(--green);
}

.hero-sub{
  margin-top:20px;
  font-size:17px;
  color:var(--muted);
  max-width:46ch;
}

/* ============================================
   Generator card
   ============================================ */
.generator-card{
  background:var(--surface-1);
  border:1px solid var(--line);
  border-radius:16px;
  padding:8px;
  margin-top:8px;
}

.tabs{
  display:flex;
  gap:4px;
  padding:8px;
}
.tab{
  font-family:var(--font-display);
  font-size:13px;
  letter-spacing:0.02em;
  color:var(--muted);
  background:transparent;
  border:none;
  padding:10px 18px;
  border-radius:8px;
  cursor:pointer;
  transition:background .15s, color .15s;
}
.tab:hover{ color:var(--paper); }
.tab.is-active{
  background:var(--surface-2);
  color:var(--green);
}
.tab:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible{
  outline:2px solid var(--green);
  outline-offset:2px;
}

.panel-grid{
  display:grid;
  gap:24px;
  padding:16px;
}
@media(min-width:820px){
  .panel-grid{
    grid-template-columns:1.15fr 1fr;
    align-items:start;
  }
}

.form-panel{ display:none; flex-direction:column; gap:16px; }
.form-panel.is-active{ display:flex; }

label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:7px;
}
.optional{ font-weight:400; color:var(--muted); opacity:0.7; text-transform:none; }

input[type="text"], input[type="tel"], input[type="email"], textarea, select{
  width:100%;
  background:var(--surface-2);
  border:1px solid var(--line);
  color:var(--paper);
  font-family:var(--font-body);
  font-size:15px;
  padding:12px 14px;
  border-radius:8px;
  transition:border-color .15s;
}
input::placeholder, textarea::placeholder{ color:#5b5f5d; }
input:focus, textarea:focus, select:focus{ border-color:var(--green); }
textarea{ resize:vertical; font-family:var(--font-body); }

select{ appearance:none; cursor:pointer; }

.field-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
@media(max-width:480px){
  .field-row{ grid-template-columns:1fr; }
}

.checkbox-row{
  display:flex; align-items:center; gap:8px;
  font-size:14px; color:var(--paper);
  cursor:pointer;
}
.checkbox-row input{ width:16px; height:16px; accent-color:var(--green); }

.customize{
  margin-top:8px;
  padding-top:20px;
  border-top:1px solid var(--line);
}
.customize-label{
  font-family:var(--font-display);
  font-size:12px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:14px;
}
.customize .field-row{ margin-bottom:14px; }

.value-pill{
  font-family:var(--font-display);
  font-size:11px;
  color:var(--green);
  background:var(--green-dim);
  padding:2px 7px;
  border-radius:4px;
  margin-left:6px;
}

input[type="range"]{
  width:100%;
  accent-color:var(--green);
  height:30px;
}

.swatch-input{
  display:flex; align-items:center; gap:10px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px 12px;
}
input[type="color"]{
  width:32px; height:32px;
  border:none; border-radius:6px;
  background:none;
  cursor:pointer;
  padding:0;
}
.swatch-hex{
  font-family:var(--font-display);
  font-size:13px;
  color:var(--muted);
}

.hint{
  font-size:13px;
  color:var(--warn);
  margin-top:6px;
  line-height:1.4;
}

/* ============================================
   Preview pane
   ============================================ */
.preview{
  display:flex; flex-direction:column; align-items:center;
  gap:16px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px 20px;
}
.preview-frame{
  background:#fff;
  border-radius:8px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 0 1px var(--line), 0 18px 40px -16px rgba(0,0,0,0.55);
}
#qr-canvas-holder img, #qr-canvas-holder canvas{
  display:block;
  max-width:100%;
  height:auto;
  image-rendering:pixelated;
}
.preview-caption{
  font-size:13px;
  color:var(--muted);
  text-align:center;
}

.preview-actions{
  display:flex; gap:10px; width:100%;
}
.btn{
  flex:1;
  font-family:var(--font-body);
  font-weight:600;
  font-size:14px;
  padding:12px 16px;
  border-radius:8px;
  border:1px solid var(--line);
  cursor:pointer;
  transition:transform .1s, background .15s, border-color .15s;
}
.btn:active{ transform:scale(0.98); }
.btn-primary{
  background:var(--green);
  color:#0B1410;
  border-color:var(--green);
}
.btn-primary:hover{ background:#34b873; }
.btn-ghost{
  background:transparent;
  color:var(--paper);
}
.btn-ghost:hover{ border-color:var(--green); }

.copy-feedback{
  font-size:12px;
  color:var(--green);
  min-height:14px;
}

/* ============================================
   Section shared
   ============================================ */
.section-title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(24px, 3.2vw, 32px);
  letter-spacing:-0.01em;
  margin-bottom:36px;
}

section{ padding:72px 28px; }

/* ============================================
   Features
   ============================================ */
.feature-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
@media(max-width:720px){
  .feature-grid{ grid-template-columns:1fr; }
}
.feature-card{
  background:var(--surface-1);
  padding:32px;
}
.feature-card h3{
  font-size:17px;
  font-weight:700;
  margin-bottom:10px;
}
.feature-card p{
  font-size:14.5px;
  color:var(--muted);
}
.feature-icon{
  width:34px; height:34px;
  margin-bottom:18px;
  border-radius:8px;
  background:var(--surface-2);
  border:1px solid var(--line);
  position:relative;
}
.feature-icon::before{
  content:"";
  position:absolute; inset:9px;
  background:var(--green);
}
.feature-icon[data-icon="link"]::before{ border-radius:50% 50% 0 0; clip-path:polygon(0 0,100% 0,100% 60%,0 60%); }
.feature-icon[data-icon="wifi"]::before{ border-radius:50% 50% 0 0; clip-path:polygon(20% 100%, 80% 100%, 100% 40%, 50% 0%, 0% 40%); }
.feature-icon[data-icon="card"]::before{ border-radius:2px; inset:10px 6px; }
.feature-icon[data-icon="palette"]::before{ border-radius:50%; }

/* ============================================
   How it works
   ============================================ */
.how-steps{
  list-style:none;
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:24px;
}
@media(max-width:820px){
  .how-steps{ grid-template-columns:1fr 1fr; }
}
@media(max-width:480px){
  .how-steps{ grid-template-columns:1fr; }
}
.how-steps li{ display:flex; flex-direction:column; gap:10px; }
.step-no{
  font-family:var(--font-display);
  color:var(--green);
  font-size:13px;
  letter-spacing:0.1em;
}
.how-steps h4{ font-size:16px; font-weight:700; }
.how-steps p{ font-size:14px; color:var(--muted); }

/* ============================================
   Deploy
   ============================================ */
.deploy-intro{
  color:var(--muted);
  max-width:64ch;
  margin-bottom:32px;
  font-size:15.5px;
}
.deploy-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
@media(max-width:780px){
  .deploy-grid{ grid-template-columns:1fr; }
}
.deploy-card{
  background:var(--surface-1);
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px;
}
.deploy-card h3{
  font-size:18px;
  font-weight:700;
  display:flex; align-items:center; gap:10px;
  margin-bottom:12px;
}
.tag{
  font-family:var(--font-display);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--green);
  border:1px solid var(--green-dim);
  background:var(--green-dim);
  padding:3px 8px;
  border-radius:999px;
}
.deploy-card p{ color:var(--muted); font-size:14.5px; margin-bottom:14px; }
.deploy-card ol{
  list-style:none;
  counter-reset:step;
  display:flex; flex-direction:column; gap:12px;
}
.deploy-card ol li{
  counter-increment:step;
  font-size:14.5px;
  padding-left:30px;
  position:relative;
  color:var(--paper);
}
.deploy-card ol li::before{
  content:counter(step);
  position:absolute; left:0; top:0;
  font-family:var(--font-display);
  font-size:12px;
  color:var(--green);
  background:var(--surface-2);
  border:1px solid var(--line);
  width:20px; height:20px;
  border-radius:5px;
  display:flex; align-items:center; justify-content:center;
}
code{
  font-family:var(--font-display);
  font-size:13px;
  background:var(--surface-2);
  border:1px solid var(--line);
  padding:2px 6px;
  border-radius:4px;
  color:var(--green);
}
.deploy-note{
  margin-top:24px;
  font-size:13.5px;
  color:var(--muted);
}

/* ============================================
   FAQ
   ============================================ */
.faq-list{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
details{
  background:var(--surface-1);
  padding:20px 24px;
}
summary{
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
summary::after{
  content:"+";
  font-family:var(--font-display);
  color:var(--green);
  font-size:18px;
  margin-left:16px;
}
details[open] summary::after{ content:"–"; }
details p{
  margin-top:14px;
  color:var(--muted);
  font-size:14.5px;
  max-width:68ch;
}

/* ============================================
   Footer
   ============================================ */
.site-footer{
  border-top:1px solid var(--line);
  padding:32px 28px 48px;
}
.footer-inner{ text-align:center; }
.footer-inner a{ color:var(--green); }
.footer-inner a:hover{ text-decoration:underline; }
.footer-sub{ color:var(--muted); font-size:13px; margin-top:6px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; }
}
