/* ============================================================
   Casava IT — single-page site
   Look & feel inspired by meltano.com, recolored to Casava's
   sky-blue brand. Whimsical illustrated hero, editorial italic
   emphasis, alternating feature sections, code-demo tabs,
   pipeline dividers, tech marquee. No top navigation.
   ============================================================ */

:root {
  --sky-50:  #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-800: #075985;
  --sky-900: #0c4a6e;

  --ink:   #0b1b2b;
  --ink-2: #22384d;
  --muted: #5a6b82;
  --muted-2: #8ea0b5;
  --line:  #e5eef6;
  --line-2:#cfe2f2;

  /* Highlighter ink — the one non-sky hue in the palette. Used only by the
     marker stroke on the NetRecon hero (css/netrecon.css). */
  --marker: #ffe14d;

  --bg:    #ffffff;
  --bg-2:  #f5fafe;
  --code:  #0b1220;
  --code-2:#0e1626;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --shadow:   0 1px 2px rgba(11,27,43,.05), 0 18px 40px -22px rgba(3,105,161,.28);
  --shadow-h: 0 30px 60px -26px rgba(3,105,161,.42);
  --maxw: 1160px;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--bg);
  line-height: 1.62; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Editorial italic emphasis (meltano-style) */
.em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--sky-600); letter-spacing: -.01em; }
h1 .em, h2 .em { font-weight: 300; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .16s, box-shadow .2s, background .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--sky-400), var(--sky-700)); box-shadow: 0 14px 30px -12px rgba(3,105,161,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -14px rgba(3,105,161,.7); }
.btn-ghost { color: var(--ink); background: #fff; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--sky-50); transform: translateY(-2px); }
.btn-light { color: var(--sky-800); background: #fff; }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }

/* ============================================================
   HERO — illustrated tech landscape with parallax
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: 40px 0 0;
  background:
    radial-gradient(120% 90% at 50% -20%, #ffffff 0%, var(--sky-50) 32%, var(--sky-100) 62%, var(--sky-200) 100%);
}
.hero-top { position: relative; z-index: 6; display: flex; justify-content: center; padding: 8px 0 4px; }
.hero-top img { height: 108px; }

.hero-copy { position: relative; z-index: 6; text-align: center; padding: 46px 0 30px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--sky-700); background: rgba(255,255,255,.7); border: 1px solid var(--line-2);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 24px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky-500); box-shadow: 0 0 10px 2px rgba(14,165,233,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero h1 { font-size: clamp(40px, 7vw, 82px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; color: var(--ink-2); }
.hero h1 .em { font-size: 1.02em; }
.hero p.lead { margin: 22px auto 0; max-width: 60ch; font-size: clamp(17px,2.1vw,21px); color: var(--sky-900); opacity: .82; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Scene */
.scene { position: relative; z-index: 4; height: clamp(300px, 42vw, 520px); margin-top: -6px; }
.scene .layer { position: absolute; left: 50%; transform: translateX(-50%); will-change: transform; }
.scene .sun { top: 6%; width: min(360px, 60%); opacity: .9; }
.scene .clouds-l { top: 12%; left: 14%; width: min(230px, 32%); }
.scene .clouds-r { top: 20%; left: auto; right: 10%; transform: none; width: min(210px, 30%); }
.scene .phone { top: 4%; width: min(210px, 30%); z-index: 5; filter: drop-shadow(0 40px 50px rgba(3,105,161,.35)); }
.scene .mtn-back { bottom: 0; width: 118%; }
.scene .mtn-front { bottom: 0; width: 122%; }
.scene .constellation { top: 8%; width: 100%; z-index: 3; opacity: .8; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; z-index: 5; background: linear-gradient(180deg, transparent, var(--bg)); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { position: relative; z-index: 2; padding: 40px 0; }
.pad { padding: 64px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--sky-700); display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--line-2); }
h2.sec-title { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -.03em; font-weight: 800; margin: 14px 0 14px; line-height: 1.08; }
.sec-lead { color: var(--muted); font-size: 18px; max-width: 640px; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .sec-lead { margin-left: auto; margin-right: auto; }

/* CASAVA wordmark eyebrow with highlighted letter */
.wm { font-family: var(--mono); font-weight: 600; letter-spacing: 3px; font-size: 14px; color: var(--muted-2); }
.wm b { color: var(--sky-600); font-weight: 700; }

/* Pipeline divider */
.divider { display: flex; align-items: center; justify-content: center; gap: 0; padding: 8px 0; }
.divider .rail { height: 0; border-top: 2px dashed var(--line-2); flex: 1; max-width: 240px; }
.divider .node { width: 12px; height: 12px; border-radius: 50%; background: var(--sky-400); box-shadow: 0 0 0 5px rgba(56,189,248,.16); margin: 0 6px; }
.divider .hex { color: var(--sky-500); margin: 0 10px; }
.divider .hex svg { width: 26px; height: 26px; display: block; }

/* Feature block */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; padding: 40px 0; }
.feature.rev .feat-copy { order: 2; }
.feature.rev .feat-demo { order: 1; }
.feat-copy h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.03em; font-weight: 800; margin: 14px 0 12px; line-height: 1.1; }
.feat-copy p.lead { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.feat-list { list-style: none; display: grid; gap: 12px; }
.feat-list li { position: relative; padding-left: 30px; color: var(--ink-2); font-size: 15.5px; }
.feat-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(14,165,233,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
  border: 1px solid var(--line-2);
}
.feat-more { margin-top: 22px; display: inline-flex; }

/* Code demo card with tabs */
.demo { border: 1px solid #1b2740; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, var(--code), var(--code-2)); box-shadow: 0 30px 66px -30px rgba(3,27,43,.55); }
.demo .bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #1b2740; }
.demo .bar i { width: 12px; height: 12px; border-radius: 50%; }
.demo .bar .r{background:#ff5f56}.demo .bar .y{background:#ffbd2e}.demo .bar .g{background:#27c93f}
.demo .tabs { display: flex; gap: 4px; margin-left: 10px; }
.demo .tabs button {
  font-family: var(--mono); font-size: 12px; color: #7c8aa0; background: transparent; border: 0; cursor: pointer;
  padding: 6px 12px; border-radius: 7px; transition: all .16s;
}
.demo .tabs button:hover { color: #cdd9ea; }
.demo .tabs button.active { color: #061018; background: var(--sky-300); }
.demo pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.85; color: #c3d2e6; }
.demo pre .c { color: #64748b; }
.demo pre .k { color: #7dd3fc; }
.demo pre .s { color: #86efac; }
.demo pre .p { color: #38bdf8; }
.demo pre .f { color: #fca5a5; }
.demo .pane { display: none; }
.demo .pane.active { display: block; }
.demo .cursor { display:inline-block; width:8px; height:15px; background:#38bdf8; vertical-align:-2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Tech marquee ---------- */
.marquee-wrap { padding: 30px 0 8px; }
.marquee-label { text-align: center; font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 22px; }
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.pill { font-family: var(--mono); font-size: 14px; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); padding: 11px 18px; border-radius: 12px; white-space: nowrap; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); border-color: var(--line-2); }
.card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--sky-50); border: 1px solid var(--line-2); color: var(--sky-700); margin-bottom: 16px; }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: 15px; }
.card .num { position: absolute; top: 20px; right: 22px; font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.card.dashed { border-style: dashed; text-align: center; }
.card.dashed .ico { margin: 0 auto 16px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Footer with illustrated landscape ---------- */
.footer { position: relative; margin-top: 70px; padding-top: 120px; background: linear-gradient(180deg, #fff 0%, var(--sky-50) 40%, var(--sky-100) 100%); }
.footer-scape { position: absolute; top: 0; left: 0; right: 0; width: 100%; z-index: 0; }
.footer .container { position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer .brand img { height: 44px; margin-bottom: 14px; }
.footer p { color: var(--muted); font-size: 14.5px; max-width: 32ch; }
/* h3 and h4 both match: index.html uses h4, netrecon.html uses h3 so its
   heading outline does not skip a level after the CTA's h2. Same styling. */
.footer h3, .footer h4 { font-family: var(--mono); font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 15px; }
.footer ul { list-style: none; display: grid; gap: 11px; }
.footer ul a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.footer ul a:hover { color: var(--sky-700); }
/* The contact address is a transparent PNG, not text — see the comment on the
   footer <li> in index.html. Sized to sit on the same baseline rhythm as the
   text links above it; the source is 3x for hi-dpi. It is not a link, so give
   it a text cursor to signal that it is there to be read and typed. */
.footer .email-img { height: 23px; width: auto; cursor: text; }
.footer-bottom { margin-top: 42px; padding: 22px 0 30px; border-top: 1px solid var(--line-2); display:flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; font-family: var(--mono); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature.rev .feat-copy { order: 1; } .feature.rev .feat-demo { order: 2; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  section, .pad { padding: 44px 0; }
  .hero h1 { font-size: clamp(34px, 10vw, 52px); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
