/*
Theme Name: The Sky Machine
Theme URI: https://theskymachine.com
Author: theskymachine
Description: Custom theme for theskymachine — everything that flies. Drones, airliners, choppers, rockets, and the business behind them. Includes a live air-traffic widget powered by adsb.fi open data.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theskymachine
*/

:root{
  --ink:#0f1c22;
  --navy:#182930;
  --slate:#3d5058;
  --fog:#66808a;
  --chalk:#ffffff;
  --mist:#f0f5f4;
  --hairline:#e4eae8;
  --clay:#d9835f;
  --sand:#e8b98a;
  --sage:#7eae58;
  --sage2:#6f9f8f;
  --dusk:#8fa9c9;
  --lav:#a99bc9;
  --max: 1280px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:'Inter', ui-sans-serif, system-ui, sans-serif;
  color:var(--ink);
  background:var(--chalk);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
.display{ font-family:'Space Grotesk', 'Inter', sans-serif; }
.mono{ font-family:'Space Mono', monospace; letter-spacing:0.02em; }
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
.wrap{ max-width:var(--max); margin:0 auto; padding:0 32px; }
section{ position:relative; }
.grad-text{
  background:linear-gradient(100deg, var(--clay), var(--sand));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

@keyframes floatUp{ from{ opacity:0; transform:translateY(14px);} to{ opacity:1; transform:translateY(0);} }
@keyframes softPulse{ 0%,100%{ opacity:0.9;} 50%{ opacity:0.45;} }
@keyframes spin-slow{ from{ transform:rotate(0deg);} to{ transform:rotate(360deg);} }
@keyframes fadeDot{ from{ opacity:0; transform:scale(0.4);} to{ opacity:1; transform:scale(1);} }

.fade-in{ animation:floatUp .8s ease both; }
.fade-in.d1{ animation-delay:.06s; }
.fade-in.d2{ animation-delay:.14s; }

/* ---------- Announcement bar ---------- */
.announce{ background:var(--ink); color:var(--chalk); font-size:13px; padding:9px 32px; text-align:center; letter-spacing:0.01em; opacity:0.94; }
.announce b{ color:var(--sand); font-weight:500; }

/* ---------- Nav ---------- */
header.site-header{ position:sticky; top:0; z-index:50; background:rgba(255,255,255,0.92); backdrop-filter:blur(10px); border-bottom:1px solid var(--hairline); }
nav.wrap{ display:flex; align-items:center; justify-content:space-between; height:74px; }
.logo{ display:flex; align-items:center; gap:11px; font-size:19px; font-weight:600; letter-spacing:-0.02em; font-family:'Space Grotesk', sans-serif; }
.logo .mark{ width:38px; height:38px; border-radius:11px; background:linear-gradient(160deg, #2c4048 0%, var(--ink) 100%); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.navlinks{ display:flex; align-items:center; gap:4px; background:var(--mist); border-radius:100px; padding:6px; list-style:none; }
.navlinks li{ list-style:none; }
.navlinks a{ font-size:14px; font-weight:500; color:var(--slate); padding:9px 16px; border-radius:100px; transition:all .15s ease; white-space:nowrap; display:inline-block; }
.navlinks a:hover{ color:var(--ink); background:var(--chalk); }
.navlinks li.current-menu-item a,
.navlinks a.active{ color:var(--chalk); background:var(--ink); }
.navcta{ display:flex; align-items:center; gap:10px; }
.btn{ font-size:14px; font-weight:600; padding:11px 22px; border-radius:100px; display:inline-flex; align-items:center; gap:8px; cursor:pointer; border:1px solid transparent; transition:all .18s ease; font-family:'Space Grotesk', sans-serif; }
.btn-primary{ background:var(--ink); color:var(--chalk); }
.btn-primary:hover{ background:#0f1b21; transform:translateY(-1px); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:rgba(27,43,51,0.18); }
.btn-ghost:hover{ background:var(--mist); border-color:transparent; }
.btn-sm{ padding:8px 16px; font-size:13px; }
@media (max-width:920px){ .navlinks{ display:none; } }

/* ---------- Hero ---------- */
.hero{ padding:80px 0 0; }
.hero-inner{ display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center; padding-bottom:64px; }
.eyebrow{ font-size:13px; font-weight:600; color:var(--clay); text-transform:uppercase; letter-spacing:0.08em; display:flex; align-items:center; gap:8px; margin-bottom:20px; font-family:'Space Grotesk', sans-serif; }
.eyebrow::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--clay); animation:softPulse 2.6s ease-in-out infinite; }
h1.hero-title{ font-family:'Space Grotesk', sans-serif; font-size:clamp(40px,5.2vw,66px); font-weight:600; line-height:1.02; letter-spacing:-0.02em; margin-bottom:22px; }
.hero-sub{ font-size:18px; color:var(--slate); max-width:480px; margin-bottom:32px; }
.hero-actions{ display:flex; gap:12px; margin-bottom:44px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:32px; flex-wrap:wrap; }
.hstat b{ display:block; font-size:27px; font-weight:600; letter-spacing:-0.02em; font-family:'Space Grotesk', sans-serif; }
.hstat span{ font-size:13px; color:var(--fog); }

/* Sky visual — soft dawn palette, real live overlay */
.skyvisual{ background:linear-gradient(160deg, #eef2f6 0%, #e7ecf3 30%, #f3e9e4 70%, #f7ede4 100%); border-radius:20px; position:relative; overflow:hidden; aspect-ratio:1/0.95; box-shadow:0 16px 44px rgba(27,43,51,0.10); border:1px solid rgba(27,43,51,0.06); transition:border-radius .25s ease; }
.skyvisual.fs-active{ position:fixed; inset:0; width:100vw; height:100vh; aspect-ratio:unset; border-radius:0; border:none; box-shadow:none; z-index:999; }
body.fs-open{ overflow:hidden; }
.expand-btn{ position:absolute; top:20px; right:20px; z-index:5; width:36px; height:36px; border-radius:10px; background:rgba(255,255,255,0.75); backdrop-filter:blur(6px); border:1px solid rgba(27,43,51,0.12); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s ease; }
.expand-btn:hover{ background:rgba(255,255,255,0.95); }
.expand-btn svg{ width:16px; height:16px; }
.skyvisual.fs-active .liveLayer{ width:100%; height:100%; }
.skyvisual.fs-active .bp-tag, .skyvisual.fs-active .liveflight, .skyvisual.fs-active .liveSource{ font-size:13px; }
.cloudwash{ position:absolute; inset:0; background: radial-gradient(50% 40% at 15% 15%, rgba(255,255,255,0.55), transparent 70%), radial-gradient(45% 35% at 85% 75%, rgba(217,131,95,0.10), transparent 70%); }
.ring{ position:absolute; border:1px solid rgba(87,112,123,0.14); border-radius:50%; }
.ring.r1{ width:340px; height:340px; top:-90px; right:-90px; animation:spin-slow 70s linear infinite; }
.ring.r2{ width:240px; height:240px; top:-40px; right:-40px; border-style:dashed; border-color:rgba(217,131,95,0.18); animation:spin-slow 50s linear infinite reverse; }
.liveLayer{ position:absolute; inset:0; width:100%; height:100%; }
.liveDotEl{ animation:fadeDot .5s ease both; }
.bp-tag{ position:absolute; top:22px; left:24px; z-index:2; font-size:11px; color:rgba(27,43,51,0.55); font-family:'Space Mono', monospace; display:flex; align-items:center; gap:4px; flex-wrap:wrap; max-width:75%; }
.bp-tag b{ color:var(--clay); }
.region-select{ background:rgba(255,255,255,0.6); border:1px solid rgba(27,43,51,0.12); border-radius:6px; color:var(--ink); font:inherit; font-family:'Space Mono', monospace; font-weight:500; font-size:11px; cursor:pointer; padding:2px 6px; -webkit-appearance:none; appearance:none; }
.region-select option{ color:#0f1c22; }
.bp-corner{ position:absolute; top:64px; right:26px; z-index:2; font-size:11px; color:rgba(27,43,51,0.42); text-align:right; font-family:'Space Mono', monospace; line-height:1.6; }
.liveflight{ position:absolute; bottom:24px; left:24px; z-index:2; display:flex; align-items:center; gap:8px; background:rgba(255,255,255,0.72); backdrop-filter:blur(6px); border:1px solid rgba(27,43,51,0.1); border-radius:100px; padding:8px 14px; font-size:11.5px; color:var(--ink); font-family:'Space Mono', monospace; }
.liveflight .liveDot{ width:6px; height:6px; border-radius:50%; background:var(--sage2); animation:softPulse 1.8s infinite; }
.liveSource{ position:absolute; bottom:24px; right:26px; z-index:2; font-size:10.5px; color:rgba(27,43,51,0.4); font-family:'Space Mono', monospace; }

/* ---------- Section headers ---------- */
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:36px; gap:20px; flex-wrap:wrap; }
.section-label{ font-size:13px; color:var(--clay); font-weight:600; text-transform:uppercase; letter-spacing:0.08em; margin-bottom:8px; font-family:'Space Grotesk', sans-serif; }
.section-title{ font-size:31px; font-weight:600; letter-spacing:-0.02em; font-family:'Space Grotesk', sans-serif; }
.see-all{ font-size:14px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:6px; }

/* ---------- Category grid ---------- */
.categories{ padding:96px 0 88px; }
.cat-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.cat-card{ background:var(--chalk); padding:26px 20px; text-align:left; display:flex; flex-direction:column; gap:16px; border:1px solid var(--hairline); border-radius:16px; transition:transform .2s ease, box-shadow .2s ease; min-height:158px; justify-content:space-between; }
.cat-card:hover{ transform:translateY(-3px); box-shadow:0 12px 26px rgba(27,43,51,0.08); }
.cat-icon-badge{ width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.cat-name{ font-size:15px; font-weight:600; font-family:'Space Grotesk', sans-serif; }
.cat-count{ font-size:12px; color:var(--fog); margin-top:2px; }
@media (max-width:920px){ .cat-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:560px){ .cat-grid{ grid-template-columns:repeat(2,1fr); } }

/* ---------- Featured articles ---------- */
.featured{ padding:0 0 96px; }
.feat-grid{ display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:24px; }
.card{ border:1px solid var(--hairline); border-radius:16px; overflow:hidden; display:flex; flex-direction:column; transition:transform .2s ease, box-shadow .2s ease; background:var(--chalk); }
.card:hover{ transform:translateY(-3px); box-shadow:0 14px 30px rgba(27,43,51,0.09); }
.card-media{ aspect-ratio:16/10; position:relative; overflow:hidden; background:var(--ink); }
.card-media img{ width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.card.lead .card-media{ aspect-ratio:16/11; }
.card-media svg{ position:absolute; inset:0; width:100%; height:100%; }
.tag{ display:inline-flex; align-items:center; gap:6px; width:fit-content; font-size:11.5px; font-weight:600; padding:5px 12px; border-radius:20px; text-transform:uppercase; letter-spacing:0.04em; font-family:'Space Grotesk', sans-serif; background:var(--mist); color:var(--slate); }
.tag.reviews{ background:#f7ece6; color:#a85832; }
.tag.business{ background:#e9eef5; color:#3f5f8a; }
.tag.history{ background:#efeaf5; color:#6f5a94; }
.card-body{ padding:22px; display:flex; flex-direction:column; gap:12px; flex:1; }
.card-title{ font-size:19px; font-weight:600; line-height:1.28; letter-spacing:-0.01em; font-family:'Space Grotesk', sans-serif; }
.card.lead .card-title{ font-size:24px; }
.card-excerpt{ font-size:14px; color:var(--slate); line-height:1.55; }
.card-meta{ margin-top:auto; padding-top:14px; border-top:1px solid var(--hairline); display:flex; justify-content:space-between; font-size:12.5px; color:var(--fog); }
@media (max-width:920px){ .feat-grid{ grid-template-columns:1fr; } }

/* ---------- Data widget ---------- */
.databand{ background:var(--mist); padding:96px 0; }
.data-grid{ display:grid; grid-template-columns:1fr 1.15fr; gap:48px; align-items:center; }
.data-copy h2{ font-size:33px; font-weight:600; letter-spacing:-0.02em; margin-bottom:16px; line-height:1.14; font-family:'Space Grotesk', sans-serif; }
.data-copy p{ color:var(--slate); font-size:15.5px; margin-bottom:24px; max-width:420px; }
.data-features{ display:flex; flex-direction:column; gap:16px; }
.data-feat{ display:flex; gap:12px; align-items:flex-start; }
.data-feat .dot{ width:24px; height:24px; border-radius:7px; background:var(--ink); display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }
.data-feat .dot svg{ width:12px; height:12px; }
.data-feat b{ font-size:14.5px; font-weight:600; display:block; font-family:'Space Grotesk', sans-serif; }
.data-feat span{ font-size:13.5px; color:var(--fog); }

.compare-card{ background:var(--chalk); border-radius:18px; border:1px solid var(--hairline); padding:28px; box-shadow:0 8px 30px rgba(27,43,51,0.05); }
.compare-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.compare-head b{ font-size:14px; font-weight:600; font-family:'Space Grotesk', sans-serif; }
.compare-head span{ font-size:12px; color:var(--fog); }
table.compare{ width:100%; border-collapse:collapse; }
table.compare th{ text-align:left; font-size:11.5px; color:var(--fog); font-weight:600; text-transform:uppercase; letter-spacing:0.04em; padding-bottom:12px; border-bottom:1px solid var(--hairline); }
table.compare td{ padding:14px 0; border-bottom:1px solid var(--hairline); font-size:13.5px; vertical-align:middle; }
table.compare tr:last-child td{ border-bottom:none; }
.model-cell{ display:flex; align-items:center; gap:10px; font-weight:600; }
.swatch{ width:8px; height:8px; border-radius:2px; }
.bar-wrap{ background:var(--mist); border-radius:4px; height:6px; width:90px; overflow:hidden; }
.bar{ height:100%; border-radius:4px; }

/* ---------- Newsletter ---------- */
.newsletter{ padding:96px 0; }
.news-inner{ background:linear-gradient(150deg, #2c4048 0%, var(--ink) 100%); border-radius:24px; padding:64px 56px; display:grid; grid-template-columns:1.2fr 1fr; gap:40px; align-items:center; position:relative; overflow:hidden; color:var(--chalk); }
.news-inner .ring{ border-color:rgba(255,255,255,0.10); }
.news-inner .r1{ width:320px; height:320px; top:-100px; right:-100px; }
.news-inner .r2{ width:220px; height:220px; top:-50px; right:-50px; border-color:rgba(232,185,138,0.18); }
.news-inner h2{ font-size:31px; font-weight:600; letter-spacing:-0.02em; margin-bottom:12px; font-family:'Space Grotesk', sans-serif; }
.news-inner p{ color:rgba(255,255,255,0.65); font-size:15px; max-width:400px; }
.news-form{ display:flex; gap:10px; position:relative; z-index:1; }
.news-form input{ flex:1; background:rgba(255,255,255,0.09); border:1px solid rgba(255,255,255,0.16); border-radius:100px; padding:13px 20px; color:var(--chalk); font-size:14px; font-family:inherit; }
.news-form input::placeholder{ color:rgba(255,255,255,0.42); }
.news-form button{ background:var(--sand); color:var(--ink); border:none; border-radius:100px; padding:13px 24px; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; font-family:'Space Grotesk', sans-serif; }
.news-fine{ font-size:12px; color:rgba(255,255,255,0.42); margin-top:12px; }
@media (max-width:820px){ .news-inner{ grid-template-columns:1fr; padding:44px 28px; } }

/* ---------- Footer ---------- */
footer.site-footer{ border-top:1px solid var(--hairline); padding:64px 0 32px; }
.foot-grid{ display:grid; grid-template-columns:1.6fr repeat(4,1fr); gap:32px; margin-bottom:56px; }
.foot-brand p{ font-size:13.5px; color:var(--fog); margin-top:14px; max-width:240px; line-height:1.6; }
.foot-col h4{ font-size:12.5px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; color:var(--fog); margin-bottom:16px; font-family:'Space Grotesk', sans-serif; }
.foot-col ul{ list-style:none; }
.foot-col a{ display:block; font-size:13.5px; color:var(--slate); margin-bottom:11px; }
.foot-col a:hover{ color:var(--ink); }
.foot-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:28px; border-top:1px solid var(--hairline); font-size:12.5px; color:var(--fog); flex-wrap:wrap; gap:12px; }
@media (max-width:820px){ .foot-grid{ grid-template-columns:1fr 1fr; } }

/* ---------- Inner pages (single / archive / index fallback) ---------- */
.page-hero{ padding:56px 0 40px; border-bottom:1px solid var(--hairline); }
.page-hero h1{ font-family:'Space Grotesk', sans-serif; font-size:38px; font-weight:600; letter-spacing:-0.02em; }
.page-hero p{ color:var(--slate); margin-top:10px; }
.content-wrap{ padding:56px 0 96px; }
.post-list{ display:grid; grid-template-columns:1fr; gap:20px; max-width:760px; }
.single-article{ max-width:760px; margin:0 auto; }
.single-article .entry-content{ font-size:16px; color:var(--navy); line-height:1.75; }
.single-article .entry-content p{ margin-bottom:1.2em; }
.single-article .entry-content h2{ font-family:'Space Grotesk', sans-serif; margin:1.6em 0 .6em; font-size:26px; }
.single-article .entry-content img{ border-radius:12px; margin:1.4em 0; }
.entry-meta{ font-size:13px; color:var(--fog); margin-bottom:18px; }
