/*
Theme Name: evrtng functions
Theme URI: https://functions.evrtng.cloud
Author: evrtng
Author URI: https://evrtng.cloud
Description: Developer-focused WordPress theme for evrtng functions – a serverless computing platform powered by Apache OpenWhisk. Terminal-dark aesthetic with green syntax-highlight accents, full pages for Home, Features, Languages, Pricing, Quick Start, and Comparison.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: evrtng-functions
Tags: dark, developer, code, monospace, custom-menu, featured-images
*/

/* =============================================
   DESIGN TOKENS
   Terminal / code-editor palette
   ============================================= */
:root {
  /* Backgrounds – deep editor darks */
  --fn-bg:         #0b0e14;
  --fn-surface:    #111620;
  --fn-card:       #161c2a;
  --fn-card-2:     #1c2336;
  --fn-border:     #232e45;
  --fn-border-2:   #2e3d5c;

  /* Terminal Green (primary) */
  --fn-green:      #39d353;
  --fn-green-dim:  #1a6628;
  --fn-green-glow: rgba(57,211,83,0.12);

  /* Accent: electric blue */
  --fn-blue:       #4dabf7;
  --fn-blue-dim:   rgba(77,171,247,0.12);

  /* Syntax colors */
  --fn-yellow:     #e8c547;
  --fn-orange:     #ff9f43;
  --fn-purple:     #b39ddb;
  --fn-red:        #ff6b6b;
  --fn-cyan:       #80deea;

  /* Text */
  --fn-white:      #e8edf5;
  --fn-text:       #b0bcd0;
  --fn-muted:      #5a6a80;
  --fn-ghost:      #2e3d5c;

  /* Fonts */
  --fn-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Source Code Pro', monospace;
  --fn-sans:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --fn-max:        1160px;
  --fn-hh:         68px;
  --fn-radius:     6px;
  --fn-radius-lg:  10px;
  --fn-radius-xl:  14px;
  --fn-shadow:     0 4px 24px rgba(0,0,0,0.5);
  --fn-glow:       0 0 40px rgba(57,211,83,0.08);
  --fn-trans:      0.2s ease;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--fn-bg);
  color: var(--fn-text);
  font-family: var(--fn-sans);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--fn-green); text-decoration: none; transition: color var(--fn-trans); }
a:hover { color: var(--fn-blue); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fn-sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fn-white);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }

/* Monospace for code-flavoured text */
.mono { font-family: var(--fn-mono); }
.text-green  { color: var(--fn-green); }
.text-blue   { color: var(--fn-blue); }
.text-yellow { color: var(--fn-yellow); }
.text-muted  { color: var(--fn-muted); }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: var(--fn-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--fn-hh);
  background: rgba(11,14,20,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--fn-border);
  transition: box-shadow var(--fn-trans);
}
.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(57,211,83,0.08);
  border-bottom-color: var(--fn-green-dim);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--fn-max);
  margin: 0 auto;
  padding: 0 24px;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 36px;
  width: auto;
  border-radius: var(--fn-radius);
}
.logo-name {
  font-family: var(--fn-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fn-white);
  letter-spacing: 0.02em;
}
.logo-name .logo-fn {
  color: var(--fn-green);
}
.logo-sub {
  font-family: var(--fn-mono);
  font-size: 0.6rem;
  color: var(--fn-muted);
  letter-spacing: 0.08em;
  display: block;
  margin-top: 1px;
}

/* Nav */
.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-nav a {
  display: block;
  padding: 7px 13px;
  font-family: var(--fn-mono);
  font-size: 0.82rem;
  color: var(--fn-muted);
  border-radius: var(--fn-radius);
  transition: all var(--fn-trans);
  letter-spacing: 0.03em;
}
.primary-nav a:hover { color: var(--fn-white); background: rgba(57,211,83,0.08); }
.primary-nav .current-menu-item a { color: var(--fn-green); background: rgba(57,211,83,0.06); }

/* Nav CTA */
.nav-cta-link {
  background: rgba(57,211,83,0.12);
  border: 1px solid rgba(57,211,83,0.25);
  color: var(--fn-green) !important;
  border-radius: var(--fn-radius) !important;
}
.nav-cta-link:hover {
  background: rgba(57,211,83,0.2) !important;
  border-color: var(--fn-green) !important;
  color: var(--fn-green) !important;
}

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  background: none;
}
.mobile-menu-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--fn-text); border-radius: 1px;
  transition: all var(--fn-trans);
}
@media (max-width: 880px) {
  .mobile-menu-toggle { display: flex; }
  .primary-nav {
    position: fixed; top: var(--fn-hh); left: 0; right: 0;
    background: var(--fn-surface);
    border-bottom: 1px solid var(--fn-border);
    padding: 20px 24px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--fn-trans);
  }
  .primary-nav.open {
    transform: translateY(0); opacity: 1; pointer-events: all;
  }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .primary-nav a { padding: 12px 16px; font-size: 0.95rem; }
}

/* =============================================
   SKIP LINK
   ============================================= */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--fn-green); color: var(--fn-bg);
  padding: 10px 20px; z-index: 9999; font-weight: 700; border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; }

/* =============================================
   CODE BLOCKS & TERMINAL
   ============================================= */
.code-block {
  background: #070a10;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-lg);
  padding: 24px;
  font-family: var(--fn-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--fn-text);
  overflow-x: auto;
  position: relative;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fn-border);
}
.td { width: 10px; height: 10px; border-radius: 50%; }
.td-red    { background: #ff5f57; }
.td-yellow { background: #febc2e; }
.td-green  { background: #28c840; }
.terminal-title {
  font-family: var(--fn-mono);
  font-size: 0.72rem;
  color: var(--fn-muted);
  margin-left: 8px;
  letter-spacing: 0.04em;
}

/* Syntax tokens */
.t-kw      { color: #c792ea; }  /* keyword */
.t-fn      { color: #82aaff; }  /* function */
.t-str     { color: #c3e88d; }  /* string */
.t-num     { color: var(--fn-orange); } /* number */
.t-cmt     { color: #4a5568; font-style: italic; }  /* comment */
.t-var     { color: var(--fn-cyan); }  /* variable */
.t-op      { color: var(--fn-green); } /* operator / prompt */
.t-param   { color: var(--fn-yellow); } /* param */
.t-out     { color: var(--fn-green); } /* output */

/* Inline code */
code {
  font-family: var(--fn-mono);
  font-size: 0.85em;
  background: rgba(57,211,83,0.08);
  color: var(--fn-green);
  border-radius: 3px;
  padding: 2px 6px;
  border: 1px solid rgba(57,211,83,0.15);
}

pre code { background: none; color: inherit; border: none; padding: 0; }

/* =============================================
   HERO
   ============================================= */
.fn-hero {
  padding-top: calc(var(--fn-hh) + 72px);
  padding-bottom: 72px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.fn-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fn-mono);
  font-size: 0.72rem;
  color: var(--fn-green);
  background: rgba(57,211,83,0.06);
  border: 1px solid rgba(57,211,83,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.hero-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fn-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.75); }
}

.fn-hero h1 { margin-bottom: 16px; }
.fn-hero h1 .hl { color: var(--fn-green); }
.fn-hero .hero-sub {
  color: var(--fn-muted);
  font-size: 1.02rem;
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-stat-item {}
.hero-stat-num {
  font-family: var(--fn-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fn-green);
  display: block;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--fn-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .fn-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .fn-hero { padding-top: calc(var(--fn-hh) + 48px); }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--fn-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  border-radius: var(--fn-radius);
  transition: all var(--fn-trans);
  text-decoration: none;
}

.btn-green {
  background: rgba(57,211,83,0.12);
  color: var(--fn-green);
  border: 1px solid rgba(57,211,83,0.3);
}
.btn-green:hover {
  background: rgba(57,211,83,0.2);
  border-color: var(--fn-green);
  color: var(--fn-green);
  box-shadow: 0 0 24px rgba(57,211,83,0.15);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--fn-green);
  color: var(--fn-bg);
  border: 1px solid var(--fn-green);
  font-weight: 700;
}
.btn-solid:hover {
  background: #4de869;
  color: var(--fn-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(57,211,83,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--fn-text);
  border: 1px solid var(--fn-border);
}
.btn-ghost:hover {
  border-color: var(--fn-blue);
  color: var(--fn-blue);
  background: var(--fn-blue-dim);
}

/* =============================================
   SECTION HEADER
   ============================================= */
.section-label {
  font-family: var(--fn-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fn-green);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-label::before { content: '//'; color: var(--fn-green-dim); }

.section-header { margin-bottom: 52px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-label { justify-content: center; }
.section-divider { width: 48px; height: 2px; background: var(--fn-green); border-radius: 1px; margin-top: 12px; opacity: 0.6; }
.section-header.centered .section-divider { margin: 12px auto 0; }

/* =============================================
   FEATURE CARDS
   ============================================= */
.fn-card {
  background: var(--fn-card);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-xl);
  padding: 28px;
  transition: all var(--fn-trans);
  position: relative;
  overflow: hidden;
}
.fn-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,211,83,0.4), transparent);
  opacity: 0;
  transition: opacity var(--fn-trans);
}
.fn-card:hover {
  border-color: rgba(57,211,83,0.3);
  transform: translateY(-3px);
  box-shadow: var(--fn-glow), var(--fn-shadow);
}
.fn-card:hover::after { opacity: 1; }

.fn-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--fn-radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: rgba(57,211,83,0.08);
  border: 1px solid rgba(57,211,83,0.12);
}
.fn-card-icon.blue { background: rgba(77,171,247,0.08); border-color: rgba(77,171,247,0.12); }
.fn-card-icon.yellow { background: rgba(232,197,71,0.08); border-color: rgba(232,197,71,0.12); }

.fn-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.fn-card p { color: var(--fn-muted); font-size: 0.88rem; margin: 0; line-height: 1.7; }

/* =============================================
   LANGUAGE PILLS / TAGS
   ============================================= */
.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--fn-card);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  font-family: var(--fn-mono);
  font-size: 0.82rem;
  color: var(--fn-text);
  transition: all var(--fn-trans);
  cursor: default;
}
.lang-tag:hover {
  border-color: rgba(57,211,83,0.35);
  color: var(--fn-green);
  background: rgba(57,211,83,0.05);
}
.lang-tag .lang-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Language colors */
.lang-js      .lang-dot { background: #f7df1e; }
.lang-python  .lang-dot { background: #3776ab; }
.lang-java    .lang-dot { background: #f89820; }
.lang-go      .lang-dot { background: #00add8; }
.lang-php     .lang-dot { background: #8892be; }
.lang-ruby    .lang-dot { background: #cc342d; }
.lang-swift   .lang-dot { background: #f05138; }
.lang-net     .lang-dot { background: #512bd4; }
.lang-scala   .lang-dot { background: #dc322f; }
.lang-rust    .lang-dot { background: #ce412b; }
.lang-docker  .lang-dot { background: #0db7ed; }
.lang-c       .lang-dot { background: #a8b9cc; }

/* =============================================
   PRICING TABLE
   ============================================= */
.pricing-table {
  background: var(--fn-card);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-xl);
  overflow: hidden;
}

.pricing-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--fn-mono);
  font-size: 0.88rem;
}

.pricing-table th {
  background: var(--fn-card-2);
  color: var(--fn-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--fn-border);
  font-weight: 600;
}

.pricing-table td {
  padding: 14px 20px;
  color: var(--fn-text);
  border-bottom: 1px solid var(--fn-border);
  vertical-align: middle;
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tr:hover td { background: rgba(57,211,83,0.03); }

.pricing-table .val { color: var(--fn-green); font-weight: 600; }
.pricing-table .formula { color: var(--fn-muted); font-size: 0.78rem; }

/* Pricing calculator display */
.calc-box {
  background: var(--fn-card-2);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-xl);
  padding: 32px;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--fn-border);
  font-family: var(--fn-mono);
  font-size: 0.88rem;
}
.calc-row:last-child { border-bottom: none; }
.calc-row .label { color: var(--fn-muted); }
.calc-row .value { color: var(--fn-green); font-weight: 600; }
.calc-row .value.total { color: var(--fn-yellow); font-size: 1.1rem; }

/* =============================================
   QUICK START STEPS
   ============================================= */
.qs-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.qs-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  position: relative;
}
.qs-step + .qs-step { margin-top: 32px; }
.qs-step-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.qs-step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(57,211,83,0.1);
  border: 1px solid rgba(57,211,83,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fn-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fn-green);
  flex-shrink: 0;
}
.qs-step-line {
  width: 1px;
  flex: 1;
  background: rgba(57,211,83,0.15);
  margin-top: 6px;
}
.qs-step:last-child .qs-step-line { display: none; }
.qs-step-content { padding-top: 8px; padding-bottom: 32px; }
.qs-step-content h3 { font-size: 1.05rem; margin-bottom: 8px; }
.qs-step-content p { font-size: 0.88rem; color: var(--fn-muted); margin-bottom: 16px; }

/* =============================================
   COMPARISON TABLE
   ============================================= */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  border: 1px solid var(--fn-border);
  text-align: center;
  vertical-align: middle;
}
.comparison-table th {
  background: var(--fn-card);
  font-family: var(--fn-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fn-muted);
}
.comparison-table th.highlight { color: var(--fn-green); background: rgba(57,211,83,0.06); }
.comparison-table td { background: var(--fn-surface); color: var(--fn-text); }
.comparison-table td.highlight { background: rgba(57,211,83,0.04); }
.comparison-table .check { color: var(--fn-green); font-weight: 700; font-size: 1rem; }
.comparison-table .cross { color: var(--fn-red); }
.comparison-table .feature-col { text-align: left; color: var(--fn-text); font-weight: 500; }
.comparison-table tr:hover td { background: rgba(57,211,83,0.03); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--fn-surface);
  border-top: 1px solid var(--fn-border);
  padding: 56px 0 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--fn-muted);
  font-size: 0.85rem;
  max-width: 280px;
  margin: 14px 0 20px;
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--fn-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fn-muted);
  margin-bottom: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--fn-muted); font-size: 0.85rem; transition: color var(--fn-trans); font-family: var(--fn-mono); }
.footer-links a:hover { color: var(--fn-green); }
.footer-bottom {
  border-top: 1px solid var(--fn-border);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-family: var(--fn-mono); font-size: 0.75rem; color: var(--fn-muted); margin: 0; }
.footer-bottom .cursor { display: inline-block; width: 8px; height: 14px; background: var(--fn-green); margin-left: 2px; animation: blink 1.2s step-end infinite; vertical-align: middle; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

/* =============================================
   UTILITIES
   ============================================= */
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--fn-bg); }
::-webkit-scrollbar-thumb { background: var(--fn-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fn-green); }

/* Animate in */
@keyframes fadeIn {
  from { opacity:0; transform: translateY(16px); }
  to   { opacity:1; transform: translateY(0); }
}
.anim { animation: fadeIn 0.5s ease forwards; }
.d1 { animation-delay:.1s } .d2 { animation-delay:.2s } .d3 { animation-delay:.3s }


/* =============================================
   HEADER OFFSET FIX
   
   Because the header is position:fixed, all
   page content needs top padding equal to the
   header height. This patch adds a universal
   .page-hero block and fixes .site-main.
   ============================================= */

/* Every page's main content area gets top
   padding so it never slides under the header */
.site-main {
  padding-top: var(--fn-hh);
}

/* =============================================
   PAGE HERO — reusable hero block
   Used on: comparison, languages, features,
   pricing, quick-start, ansi-c-example
   ============================================= */
.page-hero {
  background: var(--fn-surface);
  border-bottom: 1px solid var(--fn-border);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

/* Subtle background grid */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57,211,83,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,211,83,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Bottom fade so grid blends into content */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--fn-surface));
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.page-hero-content h1 {
  margin: 8px 0 16px;
}

.page-hero-content p {
  color: var(--fn-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* =============================================
   FIX: front-page hero (fn-hero)
   Already has its own padding-top but uses
   the old calc() that may be too small.
   ============================================= */
.fn-hero {
  /* Override: site-main now adds fn-hh,
     so fn-hero only needs extra breathing room */
  padding-top: 72px !important;
  padding-bottom: 72px;
  /* Remove the old calc() that double-counted */
  min-height: calc(100vh - var(--fn-hh));
}
