@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ===== Tokens ===== */
:root {
  --brand: #4f46e5;
  --accent: #10B981;
  --ink: #0F172A;
  --muted: #475569;
  --bg1: #F8FAFC;
  --bg2: #EEF2FF;
  --card: #FFFFFF;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --max-width: 1120px;
  --ring: rgba(79,70,229,.25);
}

/* ===== Base ===== */
html, body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, var(--bg1), var(--bg2)), url('assets/your-light-image.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  body {
    background: var(--bg1);
  }
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Header / Nav ===== */
header {
  background: #ffffffcc;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
}

.brand img.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  object-fit: cover;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: 2px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.drawer.open {
  display: block;
}

.drawer .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.35);
}

.drawer .panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(88vw, 360px);
  background: var(--card);
  box-shadow: -10px 0 30px rgba(2,6,23,.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}

.drawer.open .panel {
  transform: translateX(0);
}

.drawer a {
  padding: 12px 8px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
}

.drawer a:hover {
  background: #f1f5f9;
  text-decoration: none;
}

.menu-open {
  overflow: hidden;
}

/* ===== Hero & Sections ===== */
.section {
  padding: 40px 0; /* was 60px 0 */
}

.section h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.section p,
.section ul,
.section ol {
  margin-top: 0;
  margin-bottom: 16px;
}

/* Optional denser variant you can apply per block: class="section compact" */
.section.compact {
  padding: 32px 0;
}

.hero {
  padding: 64px 0 32px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }
}

.eyebrow {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
}

.headline {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.15;
  margin: 8px 0 12px;
}

.lead {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
  max-width: 720px;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 520px;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background: no-repeat center / contain url('data:image/svg+xml;utf8,<svg ... >');
  filter: drop-shadow(0 10px 30px rgba(2,6,23,.08));
}

/* ===== AIPostie Additions (safe to append) ===== */

/* 1) Mobile / Desktop visibility helpers */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 1024px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
}

/* 2) Improve sticky header layering + subtle shadow */
header {
  z-index: 1000; /* ensure over content */
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.04);
}

/* 3) Make brand (HAL image / AIPostie text) feel link-like and tappable */
.brand a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand a:hover { text-decoration: none; opacity: .9; }

/* 4) Drawer (hamburger) — tighter spacing + clearer separators */
.drawer .panel {
  gap: 8px; /* was 12px */
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.drawer a {
  display: block;
  padding: 10px 12px;            /* tighter, but still >44px tap height with line-height */
  line-height: 1.4;
  font-size: 17px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent; /* for focus ring alignment */
}

.drawer a + a {
  margin-top: 2px;
}

.drawer a:hover {
  background: #f1f5f9;
  text-decoration: none;
}

/* 5) Clear, accessible focus styles */
.drawer a:focus-visible,
.hamburger:focus-visible,
.brand a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--ring);
}

/* 6) Hamburger button tap target + alignment */
.hamburger {
  padding: 10px;   /* slightly larger tap area */
  margin-right: -6px; /* optical balance with brand spacing */
}
.hamburger span { height: 2px; }

/* 7) Backdrop cursor & iOS safe area */
.drawer .backdrop { cursor: pointer; }

/* 8) Lock scroll when menu is open (use body.menu-open on toggle) */
body.menu-open { overflow: hidden; }

/* 9) Optional: light dividers in the drawer for clarity */
.drawer .panel .menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
  border-radius: 1px;
}

/* 10) Base link hover polish (keeps brand color but less “shouty”) */
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* 11) Optional: subtle page background variant (apply to <body class="bg--plain"> if desired) */
.bg--plain {
  background: var(--bg1) !important;
  background-image: none !important;
}

/* 12) Nav list inside drawer (if you wrap links in a <nav>) */
.drawer .panel nav a {
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
}
.drawer .panel nav a:last-child {
  border-bottom: 0;
}
/* ===== AIParcelBox: tighter text rhythm ===== */
.page--aiparcelbox .section { padding: 24px 0; }
.page--aiparcelbox p        { margin: 6px 0 8px; line-height: 1.55; }
.page--aiparcelbox .lead    { margin: 6px 0 10px; }
.page--aiparcelbox h2,
.page--aiparcelbox h3       { margin: 12px 0 6px; line-height: 1.2; }
.page--aiparcelbox ul,
.page--aiparcelbox ol       { margin: 8px 0 8px 18px; }
.page--aiparcelbox li       { margin: 3px 0; }
.nav-inline { display: flex; align-items: center; gap: 14px; }

@media (max-width: 1024px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: block !important; }
  header .hamburger { display: inline-flex !important; align-items: center; justify-content: center; }
  header .hamburger span { background: var(--ink) !important; }
}
