/* =====================================================================
   SkyHub — style.css
   Aviation-Theme · Navy · Sky · Runway-Amber
   Moderne, responsive Oberfläche (öffentliche Seite + interner Bereich)
   ===================================================================== */

/* --------------------------------------------------------------------
   1. TOKENS  (hier zentral alles anpassen)
   -------------------------------------------------------------------- */
:root {
  /* Navy-Stufen */
  --navy-900: #071429;
  --navy-800: #0a1834;
  --navy-700: #122a4f;
  --navy-600: #1b3a66;

  /* Sky-Stufen */
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;

  /* Akzent (Runway / Approach Light) */
  --amber:   #f5a524;
  --amber-d: #d98a12;

  /* Neutral / Text */
  --cloud:    #eef5ff;   /* heller Seitenhintergrund */
  --paper:    #ffffff;   /* Karten */
  --ink:      #0f2745;   /* Fließtext dunkel */
  --ink-soft: #5b7290;   /* Sekundärtext */
  --invert:   #eaf4ff;   /* Text auf dunklem Grund */
  --line:     #d7e3f2;   /* Rahmen/Trenner */

  /* Typo */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Radius / Schatten */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(10, 24, 52, .07);
  --shadow-md: 0 10px 30px rgba(10, 24, 52, .10);
  --shadow-sky: 0 14px 36px rgba(14, 165, 233, .28);

  /* Layout */
  --maxw: 1160px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cloud);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy-800);
}

/* --------------------------------------------------------------------
   3. BAUSTEINE  (Container, Eyebrow, Buttons)
   -------------------------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

/* Mono-„Flugdaten"-Label — das wiederkehrende Signature-Element */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sky-600);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--sky-500);
}
.eyebrow--light { color: var(--sky-300); }
.eyebrow--light::before { background: var(--sky-400); }

.btn {
  --bg: var(--sky-500);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sky); background: var(--sky-600); }
.btn:active { transform: translateY(0); }

.btn--amber { --bg: var(--amber); --fg: var(--navy-900); }
.btn--amber:hover { background: var(--amber-d); box-shadow: 0 14px 34px rgba(245,165,36,.34); }

.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--line);
}
.btn--ghost:hover { background: #fff; border-color: var(--sky-400); box-shadow: var(--shadow-sm); color: var(--navy-800); }

.btn--ghost-light {
  background: rgba(255,255,255,.06);
  color: var(--invert);
  border-color: rgba(255,255,255,.28);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.55); box-shadow: none; color: #fff; }

.btn .ico { width: 18px; height: 18px; }

/* --------------------------------------------------------------------
   4. SITE-HEADER / NAVIGATION  (öffentlich)
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 24, 52, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7, 20, 41, .96);
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
}
.site-header .wrap {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--invert);
  letter-spacing: -.01em;
}
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--sky-400); font-weight: 700; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}
.nav a {
  color: rgba(234,244,255,.82);
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding: .25rem 0;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--sky-400);
  transition: width .25s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: .75rem; }

/* Mobile-Toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--invert); border-radius: 2px; position: relative;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

/* --------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--invert);
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(56,189,248,.28), transparent 60%),
    linear-gradient(178deg, var(--navy-900) 0%, var(--navy-700) 52%, #16406f 100%);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}
/* Horizont-Schein */
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: radial-gradient(ellipse 70% 100% at 50% 130%, rgba(125,211,252,.35), transparent 72%);
  z-index: -1; pointer-events: none;
}
/* dünne Flugbahn-Kurve */
.hero-path {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1; opacity: .5; pointer-events: none;
}
.hero-path path {
  stroke-dasharray: 6 8;
  stroke-dashoffset: 1200;
  animation: dash 6s var(--ease) forwards;
}
@keyframes dash { to { stroke-dashoffset: 0; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  margin: 1.1rem 0 1.1rem;
}
.hero h1 em { font-style: normal; color: var(--sky-400); }
.hero .lead {
  color: rgba(234,244,255,.86);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  max-width: 34rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.8rem; }

/* schwebende Logbuch-Karte (Mock) */
.cockpit {
  background: linear-gradient(180deg, rgba(18,42,79,.9), rgba(10,24,52,.9));
  border: 1px solid rgba(125,211,252,.28);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 1.25rem;
  backdrop-filter: blur(6px);
}
.cockpit-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .85rem; margin-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.cockpit-top strong { font-family: var(--font-display); color: #fff; font-size: .98rem; }
.pill {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
  color: var(--navy-900); background: var(--sky-400);
  padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase;
}
.logrow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .6rem 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: rgba(234,244,255,.9);
  padding: .55rem 0;
  border-bottom: 1px dashed rgba(255,255,255,.09);
}
.logrow:last-child { border-bottom: 0; }
.logrow .cs { color: #fff; font-weight: 700; }
.logrow .tm { color: var(--sky-300); }
.logrow .tag { color: var(--amber); font-size: .7rem; letter-spacing: .08em; }

/* --------------------------------------------------------------------
   6. SECTION-BASIS
   -------------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 42rem; margin-bottom: 2.6rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: .8rem 0 .6rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* --------------------------------------------------------------------
   7. FEATURE-KACHELN
   -------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky-300);
}
.feature .ico-box {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--sky-500), var(--sky-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(14,165,233,.32);
  margin-bottom: 1.1rem;
}
.feature .ico-box svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .45rem; color: var(--navy-800); }
.feature p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* --------------------------------------------------------------------
   8. „SO LÄUFT'S" — 3 Schritte (echte Reihenfolge → Nummern erlaubt)
   -------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: .9rem; font-weight: 700;
  color: var(--sky-600);
  letter-spacing: .05em;
}
.step h3 { font-size: 1.12rem; margin: .5rem 0 .4rem; }
.step p { color: var(--ink-soft); font-size: .94rem; margin: 0; }

/* --------------------------------------------------------------------
   9. CTA-BAND
   -------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
  color: var(--invert);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(56,189,248,.32), transparent 55%),
    linear-gradient(160deg, var(--navy-800), var(--navy-700));
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: .7rem; }
.cta-band p { color: rgba(234,244,255,.82); max-width: 34rem; margin: 0 auto 1.6rem; }

/* --------------------------------------------------------------------
   10. FOOTER
   -------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(234,244,255,.66);
  padding: 3rem 0 2rem;
  margin-top: 1rem;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 2rem;
  justify-content: space-between; align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer .brand { font-size: 1.15rem; margin-bottom: .6rem; }
.site-footer .footer-desc { max-width: 22rem; font-size: .9rem; }
.footer-nav { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-nav h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; font-family: var(--font-mono); font-weight: 700; }
.footer-nav a { display: block; color: rgba(234,244,255,.66); font-size: .92rem; padding: .28rem 0; transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--sky-400); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: space-between; align-items: center;
  padding-top: 1.5rem; font-size: .82rem;
  font-family: var(--font-mono);
  color: rgba(234,244,255,.5);
}

/* =====================================================================
   11. LOGIN-SEITE
   ===================================================================== */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(56,189,248,.3), transparent 55%),
    linear-gradient(175deg, var(--navy-900), var(--navy-700) 60%, #16406f);
}
.auth-card {
  width: min(100%, 400px);
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
  padding: 2.4rem 2.1rem;
}
.auth-card .brand { color: var(--navy-800); justify-content: center; margin-bottom: .4rem; }
.auth-card .brand b { color: var(--sky-500); }
.auth-sub { text-align: center; color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.7rem; }
.field { margin-bottom: 1.05rem; }
.field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--navy-700); margin-bottom: .4rem; letter-spacing: .01em;
}
.field input {
  width: 100%;
  padding: .78rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit; font-size: .95rem; color: var(--ink);
  background: #fbfdff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus {
  outline: none;
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(56,189,248,.2);
  background: #fff;
}
.auth .btn { width: 100%; justify-content: center; margin-top: .4rem; }
.auth-error {
  background: #fff2f2; border: 1px solid #f6c9c9; color: #b42318;
  font-size: .88rem; padding: .7rem .9rem; border-radius: var(--r-sm);
  margin-bottom: 1.1rem; text-align: center;
}
.auth-back { display: block; text-align: center; margin-top: 1.4rem; font-size: .86rem; color: var(--ink-soft); }
.auth-back:hover { color: var(--sky-600); }

/* =====================================================================
   12. INTERNER BEREICH — App-Layout (Sidebar + Topbar)
   ===================================================================== */
.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

.app-side {
  background: var(--navy-800);
  color: var(--invert);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.app-side .brand {
  padding: 1.3rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 1.2rem;
}
.app-nav { padding: 1rem .8rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.app-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .85rem; border-radius: 10px;
  color: rgba(234,244,255,.72);
  font-size: .95rem; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.app-nav a svg { width: 19px; height: 19px; opacity: .85; }
.app-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav a.active {
  background: linear-gradient(120deg, var(--sky-500), var(--sky-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(14,165,233,.32);
}
.app-nav a.active svg { opacity: 1; }
.app-side-foot {
  padding: 1rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-mono); font-size: .72rem;
  color: rgba(234,244,255,.45);
}

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-top {
  height: 66px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.6rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.app-top .page-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy-800); }
.app-user { display: flex; align-items: center; gap: .7rem; }
.app-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(140deg, var(--sky-400), var(--navy-600));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem;
  font-family: var(--font-display);
}
.app-user .logout { font-size: .85rem; color: var(--ink-soft); }
.app-user .logout:hover { color: #b42318; }

.app-content { padding: 1.8rem 1.6rem 3rem; }

/* Dashboard-Statistik-Kacheln */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; margin-bottom: 1.6rem; }
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm);
}
.stat .label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.stat .value { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--navy-800); margin-top: .3rem; }
.stat .value span { font-size: .95rem; color: var(--sky-600); }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: 1.5rem; margin-bottom: 1.4rem;
}
.panel h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.placeholder {
  border: 1.5px dashed var(--line); border-radius: var(--r-sm);
  padding: 2.4rem 1.5rem; text-align: center; color: var(--ink-soft); font-size: .95rem;
}

/* Tabelle (Flugbuch) */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th {
  text-align: left; font-family: var(--font-mono); font-weight: 700;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  padding: .6rem .8rem; border-bottom: 2px solid var(--line);
}
.tbl td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .mono { font-family: var(--font-mono); }
.tbl .cs { font-weight: 700; color: var(--navy-800); }

/* =====================================================================
   13. RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cockpit { max-width: 460px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }

  .nav, .nav-cta .btn--ghost-light { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--navy-900); padding: .5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .site-header.open .nav a { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.07); width: 100%; }
  .site-header.open .nav a::after { display: none; }

  /* App: Sidebar wird zur oberen Leiste */
  .app { grid-template-columns: 1fr; }
  .app-side {
    position: static; height: auto; flex-direction: row;
    align-items: center; overflow-x: auto; gap: .5rem;
  }
  .app-side .brand { border-bottom: 0; padding: 1rem 1.2rem; }
  .app-nav { flex-direction: row; padding: .5rem; gap: .3rem; }
  .app-nav a span { display: none; }
  .app-side-foot { display: none; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}

/* Motion-Reduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
