/* ---------- Tokens ---------- */
:root {
  --bg: #0e1319;
  --bg-alt: #131b24;
  --surface: #1a232e;
  --surface-2: #212d3a;
  --dark: #0e1319;
  --dark-2: #1a232e;
  --accent: #f5b301;
  --accent-dark: #c98e00;
  --pink: #ff5c8a;
  --teal: #2fd4c4;
  --lime: #b8e62d;
  --purple: #a06cff;
  --blue: #1b6fd6;
  --text: #e9eef4;
  --text-muted: #94a3b4;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.025em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--accent);
  color: #10151c;
  box-shadow: 0 10px 24px -10px rgba(245, 179, 1, 0.7);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px) rotate(-1deg); }
.btn-ghost { color: var(--text); border-color: rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px) rotate(1deg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  background: rgba(14, 19, 25, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-bolt { width: 26px; height: 26px; fill: var(--accent); flex-shrink: 0; }
.logo-text { font-weight: 900; font-size: 1.4rem; letter-spacing: -0.03em; }
.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  display: none;
}
@media (min-width: 640px) { .logo-sub { display: inline; } }

.main-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: 8px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.main-nav.open { display: flex; }
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color .15s ease;
}
.main-nav a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .main-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 30px;
    background: transparent;
    padding: 0;
    border: none;
  }
  .main-nav a { padding: 0; border-bottom: none; }
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 86vh;
  padding: 90px 0 70px;
  overflow: hidden;
  background: radial-gradient(1100px 560px at 15% -10%, #1d2f4a 0%, transparent 60%), var(--bg);
}
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease;
  will-change: opacity, transform;
}
.hero-slide.active { opacity: 1; animation: kenburns 9s ease-out forwards; }
.hero-slide.is-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 46px 46px;
}
@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.2%, -1%, 0); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(14,19,25,0.96) 0%, rgba(14,19,25,0.9) 38%, rgba(14,19,25,0.64) 70%, rgba(14,19,25,0.5) 100%),
    linear-gradient(to top, rgba(14,19,25,0.9) 0%, transparent 45%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(80% 60% at 70% 20%, black, transparent 75%);
}
.hero-inner { position: relative; z-index: 3; }

.eyebrow, .section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px dashed rgba(245,179,1,0.45);
  border-radius: 999px;
  transform: rotate(-1.2deg);
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.1rem); font-weight: 900; max-width: 820px; }
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 62%, rgba(245,179,1,0.35) 62%);
  padding: 0 .08em;
}
.hero-lead { max-width: 560px; font-size: 1.08rem; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 44px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  border-top: 1px solid var(--border);
  padding-top: 26px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.75rem; font-weight: 900; color: var(--accent); line-height: 1.1; }
.hero-stats span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 900; }
.section-lead { max-width: 620px; color: var(--text-muted); font-size: 1.02rem; }

.grid { display: grid; gap: 22px; margin-top: 42px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* ---------- Avatars ---------- */
/* Sized with min-width + padding rather than a fixed width, so multi-letter
   initials ("HA", "G&J") widen into a pill instead of spilling out. */
.ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--c, var(--accent));
  color: #10151c;
  font-style: normal;
  font-weight: 900;
  font-size: 0.72rem;
  line-height: 1;
  flex-shrink: 0;
}
.ava-lg {
  min-width: 60px;
  height: 60px;
  padding: 0 12px;
  font-size: 1.5rem;
  margin-bottom: 16px;
  transform: rotate(-3deg);
}

/* ---------- Projects ---------- */
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.project-card { overflow: hidden; }
.project-card:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: var(--shadow);
  border-color: rgba(245,179,1,0.35);
}
.project-media {
  height: 172px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--from, var(--blue)), var(--to, var(--dark)));
  position: relative;
}
.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.project-media > svg { width: 40px; height: 40px; fill: rgba(255,255,255,0.92); position: relative; z-index: 1; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.sticker {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--accent);
  color: #10151c;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 4px;
  transform: rotate(3deg);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.6);
}
.project-body { padding: 20px 22px 22px; }
.project-card h3 { font-size: 1.1rem; }
.project-body > p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 16px; }
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.lead-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 700; }
.meta-date { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* ---------- Trips ---------- */
.trips-list { display: grid; gap: 14px; margin-top: 42px; }
.trip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: transform .18s ease, border-color .18s ease;
}
.trip:hover { transform: translateX(4px); border-color: rgba(245,179,1,0.35); }
.trip-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed rgba(245,179,1,0.4);
  flex-shrink: 0;
}
.trip-date b { font-size: 0.95rem; font-weight: 900; color: var(--accent); text-transform: uppercase; }
.trip-date i { font-style: normal; font-size: 0.72rem; color: var(--text-muted); }
.trip-body h3 { font-size: 1.08rem; margin-bottom: 4px; }
.trip-body p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.trip-count { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.trip-count b { font-size: 1.3rem; font-weight: 900; }
.trip-count i { font-style: normal; font-size: 0.72rem; color: var(--text-muted); }
@media (max-width: 640px) {
  .trip { grid-template-columns: auto 1fr; }
  .trip-count { grid-column: 2; flex-direction: row; gap: 6px; align-items: baseline; }
}

/* ---------- Crew ---------- */
.crew-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.crew-card { padding: 26px 24px; }
.crew-card:hover { transform: translateY(-5px) rotate(0.5deg); box-shadow: var(--shadow); }
.crew-card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.crew-role {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}
.crew-line { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- Fails ---------- */
.fails-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.fail-card {
  padding: 26px 24px;
  border-style: dashed;
  border-color: rgba(255, 92, 138, 0.4);
  background: linear-gradient(180deg, rgba(255,92,138,0.06), transparent 60%), var(--surface);
}
.fail-card:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: var(--shadow); }
.fail-level { font-size: 1.05rem; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.fail-card h3 { font-size: 1.08rem; }
.fail-card > p { color: var(--text-muted); font-size: 0.92rem; }
.fail-blame {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fail-blame b { color: var(--pink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 40px 0 30px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand { display: flex; align-items: baseline; gap: 10px; }
.footer-brand .logo-sub { display: inline; border: none; padding: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { font-size: 0.9rem; color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); margin: 0; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-slide.active { animation: none; transform: scale(1.04); }
  .card:hover, .trip:hover, .btn:hover { transform: none; }
}
