/* ─────────────────────────────────────────
   IT Estimation Risk Defense — styles.css
   No framework. No external fonts.
   ───────────────────────────────────────── */

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

/* ── TOKENS ── */
:root {
  --bg:          #0f0f0f;
  --surface:     #161616;
  --surface-hi:  #1e1e1e;
  --border:      #252525;
  --text:        #d8d8d8;
  --text-strong: #f0f0f0;
  --muted:       #707070;
  --accent:      #c8a96e;
  --accent-dim:  #a88a50;
  --danger:      #b03030;
  --max:         1000px;
  --pad-x:       clamp(20px, 5vw, 40px);
  --section-gap: clamp(56px, 8vw, 96px);
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
               sans-serif;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.7;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  color: var(--text-strong);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 20px;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 16px;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

p { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── LABEL / EYEBROW ── */
.label,
.section-label {
  display: block;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── HERO ── */
#hero {
  padding: clamp(72px, 10vw, 120px) 0 clamp(64px, 9vw, 104px);
  border-bottom: 1px solid var(--border);
}

#hero .label { margin-bottom: 32px; }

#hero .sub {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 44px;
  line-height: 1.65;
}

/* ── CTA ── */
.cta-primary {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.cta-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.18);
  text-decoration: none;
}

/* ── SECTIONS ── */
section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

/* ── BULLET LIST ── */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bullet-list li {
  padding-left: 24px;
  position: relative;
  color: var(--text);
  font-size: 1rem;
}

.bullet-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85em;
  top: 1px;
}

/* ── DELIVERABLE LIST ── */
.deliverable-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.deliverable-item {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.deliverable-item:last-child { border-bottom: none; }

.deliverable-item:hover { background: var(--surface); }

.deliverable-item .title {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.9rem;
  color: var(--text-strong);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.deliverable-item .desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── SCREENSHOTS ── */
#samples {
  display: block !important;
  visibility: visible !important;
}

.screenshot-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.screenshot-grid figure {
  display: flex !important;
  flex-direction: column;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  background: var(--surface-hi);
  transition: box-shadow 0.2s ease;
}

.screenshot-grid figure:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.75);
}

.screenshot-grid figure img {
  order: 0;
  display: block;
  width: 100%;
  height: auto;
}

/* fallback: always visible below the image */
.screenshot-grid figure .img-fallback {
  order: 1;
  display: block !important;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-hi);
  color: var(--muted);
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  user-select: none;
}

.screenshot-grid figcaption {
  order: 2;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 10px;
  color: var(--muted);
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  letter-spacing: 0.08em;
}

/* ── NOT LIST ── */
.not-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.not-list li {
  padding-left: 26px;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
}

.not-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--danger);
  font-size: 0.7rem;
  top: 5px;
}

.not-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ── PRICING ── */
#pricing .price-block {
  display: inline-block;
  border: 1px solid var(--accent);
  padding: 36px 40px;
  margin-bottom: 20px;
  background: var(--surface);
}

.price-amount {
  display: block;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text-strong);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.price-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.price-note {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 18px;
  letter-spacing: 0.01em;
}

/* ── CTA MICRO / SECONDARY ── */
.cta-micro {
  display: block;
  margin-top: 12px;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cta-secondary {
  display: inline-block;
  margin-top: 16px;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: underline;
}

.cta-secondary:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

/* ── LICENSE ── */
#license .policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#license .policy-list li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

#license .policy-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ── SAMPLE TABS ── */
.sample-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.sample-tab {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}

.sample-tab:hover { color: var(--text); }

.sample-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── SAMPLE OUTPUTS ── */
.sample-boxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .sample-boxes {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.sample-box {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 24px;
  border-radius: 2px;
}

.sample-box h3 {
  font-size: 0.9rem;
  font-family: 'Courier New', 'Courier', monospace;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  font-weight: 600;
}

.sample-box pre {
  margin: 0;
  max-height: 240px;
  overflow-x: auto;
  overflow-y: auto;
}

.sample-box pre code {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  #hero { padding: 60px 0 52px; }

  section { padding: clamp(40px, 8vw, 60px) 0; }

  #pricing .price-block {
    display: block;
    padding: 28px 24px;
  }

  .screenshot-grid figure {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  }

  footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ── IMG FALLBACK (overlay layout) ── */
/* img-fallback: always in DOM; img stacks on top and covers it when loaded */
.screenshot-grid figure { display: grid; grid-template-columns: 1fr; }
.screenshot-grid figure .img-fallback,
.screenshot-grid figure img { grid-row: 1; grid-column: 1; }
.screenshot-grid figure img { position: relative; z-index: 1; }
.screenshot-grid figure figcaption { grid-row: 2; grid-column: 1; }
.screenshot-grid figure .img-fallback {
  background: var(--surface-hi, #1a1a1a);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border, #3a3a3a);
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  user-select: none;
  padding: 16px;
  text-align: center;
}

.samples-intro { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
