/* cobol2cloud.com - shared styles */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-alt: #eef2f5;
  --text: #1d2125;
  --muted: #56606a;
  --border: #dde2e6;
  --accent: #1f5f8b;
  --accent-strong: #174a6d;
  --accent-text: #ffffff;
  --accent-soft: #e3eef6;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.06), 0 4px 16px rgba(20, 30, 40, 0.05);
  --radius: 10px;
  --max: 1080px;
  --hero-glow: rgba(125, 184, 224, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121518;
    --surface: #1a1e22;
    --surface-alt: #161a1e;
    --text: #e8eaec;
    --muted: #a2aab2;
    --border: #2c3238;
    --accent: #7db8e0;
    --accent-strong: #a3cdea;
    --accent-text: #0f1a22;
    --accent-soft: #1d2b36;
    --shadow: none;
    --hero-glow: rgba(125, 184, 224, 0.16);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta {
  color: var(--accent);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  line-height: 1.2;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-text);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--surface-alt); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; margin-bottom: 8px; }
p { margin: 0 0 16px; }
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 680px;
}
.section-intro {
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 32px;
}

/* Hero */
.hero {
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero h1 { max-width: 820px; }
.hero > .wrap { position: relative; z-index: 2; }
/* Animated mainframe-source columns (hero-bg.js) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* Soft "cloud" glow the source rises into, top right */
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: -35%;
  right: -10%;
  width: 70%;
  height: 90%;
  background:
    radial-gradient(closest-side, var(--hero-glow) 0%, transparent 100%);
  opacity: 0.9;
}
/* Keep the headline side calm so the text stays easy to read */
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 25%, transparent 70%);
  opacity: 0.85;
}

/* Grids and cards */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card.wide {
  grid-column: 1 / -1;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.card.wide p { color: var(--text); }

/* Sample report snapshot */
.snapshot-job { margin-bottom: 16px; }
.stats {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .stats { grid-template-columns: repeat(6, 1fr); }
}
.stats li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}
.chart-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.chart-figure figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.chart-figure { margin-bottom: 16px; }
.flow-scroll { overflow-x: auto; }
.swipe-hint { display: none; font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 700px) {
  .swipe-hint { display: block; }
}
svg.flow { width: 100%; min-width: 620px; height: auto; display: block; font-size: 11px; }
svg.flow .colhead { fill: var(--muted); font-size: 11px; font-weight: 600; }
svg.flow rect { fill: var(--surface-alt); stroke: var(--border); }
svg.flow .run rect { stroke: var(--accent); stroke-width: 1.5; }
svg.flow text { fill: var(--text); }
svg.flow .link { fill: none; stroke: var(--muted); stroke-width: 1.2; }
svg.flow .arrowhead { fill: var(--muted); }
svg.flow .linklabel { fill: var(--muted); font-size: 10px; }
.card.wide .snapshot-source {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.card p { color: var(--muted); }

.problem-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 960px) {
  .problem-list { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .problem-list { grid-template-columns: 1fr; }
}
.problem-list li {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 12px;
}
.steps p { color: var(--muted); margin: 0; }

.note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.note p:last-child { margin-bottom: 0; }

/* Two-column */
.split {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

.price-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.price-box .price-line {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Samples page */
.page-intro { padding: 64px 0 24px; }
.samples { padding-top: 24px; }
.sample-list {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.sample { display: flex; flex-direction: column; }
.sample h2 { font-size: 1.35rem; }
.sample .checklist { margin: 8px 0 0; }
.sample .actions { margin-top: auto; padding-top: 16px; }
.sample-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.sample .card p, .sample > p { color: var(--muted); }
.snapshot-link { margin: 0 0 12px; font-weight: 600; }

/* About page */
.about-intro {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 720px) {
  .about-intro { grid-template-columns: 180px 1fr; }
}
.portrait {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  border: 3px solid var(--accent);
  display: grid;
  place-items: center;
}
.portrait span {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.contact {
  text-align: center;
}
.contact .lead { margin-left: auto; margin-right: auto; }
.contact .actions { justify-content: center; }
.email-link {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .hero { padding: 56px 0 48px; }
  .site-nav .hide-sm { display: none; }
  .site-nav { gap: 14px; }
}
