/*
Theme Name: AeroInsta Flight
Theme URI: https://aeroinsta.org
Author: AeroInsta
Description: A dark, aviation-inspired custom theme for AeroInsta.org. Styles existing content automatically — no need to edit pages.
Version: 1.2
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: aeroinsta-flight
*/

/* ---------- Tokens ---------- */
:root{
  --bg: #0E1013;
  --bg-elevated: #171A1F;
  --bg-panel: #1D2127;
  --border: #262B31;
  --text: #EDEFF2;
  --text-muted: #9AA3AD;
  --accent: #2FE38A;
  --accent-dim: #1C8E58;
  --gold: #E8B24D;
  --max-width: 760px;
  --wide-width: 1100px;
  --font-head: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

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

img{ max-width: 100%; height: auto; display: block; }

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

/* ---------- Site header / nav ---------- */
.site-header{
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,16,19,0.9);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
  min-height: 72px;
}
.site-branding{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.site-branding span{ color: var(--accent); }
.site-branding a{
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-logo{
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
}

.primary-menu{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}
.primary-menu a{
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.primary-menu a:hover{ color: var(--text); text-decoration: none; }

.menu-toggle{ display: none; }

@media (max-width: 900px){
  .primary-menu{
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .primary-menu.is-open{ display: flex; }
  .primary-menu li{ border-top: 1px solid var(--border); }
  .primary-menu a{ display: block; padding: 16px 24px; }
  .menu-toggle{
    display: block;
    background: none; border: 1px solid var(--border); color: var(--text);
    border-radius: 6px; padding: 8px 12px; font-size: 20px; cursor: pointer;
  }
}

/* ---------- Decorative hero (auto-generated, no content edits needed) ---------- */
.hero{
  position: relative;
  padding: 96px 24px 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before{
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(47,227,138,0.14), transparent 70%);
  pointer-events: none;
}
.hero-inner{
  max-width: var(--wide-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.7fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
@media (max-width: 860px){
  .hero-inner{ grid-template-columns: 1fr; text-align: center; }
  .hero-gauge{ margin: 0 auto; }
}

.hero-eyebrow-line{
  width: 40px; height: 2px; background: var(--accent);
  margin-bottom: 20px;
}
@media (max-width: 860px){ .hero-eyebrow-line{ margin: 0 auto 20px; } }

.hero h1{
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero .tagline{
  color: var(--text-muted);
  font-size: 18px;
  max-width: 46ch;
}
@media (max-width: 860px){ .hero .tagline{ margin: 0 auto; } }

.hero-icon-wrap{
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-icon-wrap::before{
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(closest-side, rgba(232,178,77,0.16), rgba(47,227,138,0.10) 60%, transparent 75%);
  border-radius: 50%;
  filter: blur(6px);
}
.hero-icon{
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 46px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  object-fit: cover;
}
@media (max-width: 860px){
  .hero-icon-wrap{ width: 200px; height: 200px; }
  .hero-icon{ width: 160px; height: 160px; border-radius: 38px; }
}

/* ---------- Content styling (targets existing WP content, unchanged) ---------- */
.content-area{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.entry-content > * + *{ margin-top: 26px; }

.entry-content h1,
.entry-content h2,
.entry-content h3{
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  padding-left: 18px;
  border-left: 3px solid var(--accent);
}
.entry-content h1{ font-size: 30px; margin-top: 56px; }
.entry-content h2{ font-size: 25px; margin-top: 56px; }
.entry-content h3{ font-size: 20px; border-left-color: var(--gold); }

.entry-content > h1:first-child,
.entry-content > h2:first-child{ margin-top: 0; }

.entry-content p{
  color: var(--text-muted);
  font-size: 17px;
}

/* Lead paragraph: the first paragraph in the content reads larger */
.entry-content > p:first-of-type{
  font-size: 19px;
  color: var(--text);
  max-width: 62ch;
}

/* Standalone links (a link alone in its own paragraph) become buttons.
   This is how "Download AeroInsta" / "View our features" get styled
   without touching the underlying content. */
.entry-content > p > a:only-child{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #08110C;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.entry-content > p > a:only-child:hover{
  background: #45f0a1;
  transform: translateY(-1px);
  text-decoration: none;
}
.entry-content > p:has(> a:only-child){
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Images inside content get a framed panel treatment */
.entry-content img{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-panel);
}

.entry-content ul, .entry-content ol{
  color: var(--text-muted);
  padding-left: 22px;
}
.entry-content li{ margin-top: 10px; }
.entry-content li::marker{ color: var(--accent); }

.entry-content strong{ color: var(--text); }

.entry-content blockquote{
  border-left: 3px solid var(--gold);
  margin: 32px 0;
  padding: 4px 0 4px 20px;
  color: var(--text);
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.site-footer .wrap{ padding-top: 40px; padding-bottom: 24px; }

.footer-top{
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-logo{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.footer-title{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin: 0;
}
.footer-tagline{
  color: var(--text-muted);
  font-size: 14px;
  margin: 2px 0 0;
}
.footer-download-btn{
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #08110C;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.footer-download-btn:hover{
  background: #45f0a1;
  text-decoration: none;
}

.footer-bottom{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}
.site-footer p{
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}
.footer-menu{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.footer-menu a{ color: var(--text-muted); font-size: 14px; }
.footer-menu a:hover{ color: var(--text); }

/* Accessibility */
a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; animation: none !important; }
}
