/* ==========================================================
   Birdsy — global styles
   Background #0E1B33 · Accent #FFFFFF
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ---------- Tokens ---------- */
:root {
  --bg: #0E1B33;
  --surface: #14233F;
  --raised: #1A2B4B;
  --border: #26395E;
  --text: #EEF2F9;
  --muted: #8C9AB6;
  --accent: #FFFFFF;
  --head-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); }

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }

/* ---------- Wrapper ---------- */
.perch {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s ease, transform .2s ease;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.btn-sm { padding: 9px 16px; font-size: 13px; gap: 7px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.top-in {
  position: relative;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 38px; width: auto; }
.top-right { display: flex; align-items: center; gap: 10px; }

.nav {
  display: none;
  position: absolute;
  top: var(--head-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
}
.nav.open { display: block; }
.nav-in { display: flex; flex-direction: column; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 12px 20px;
}
.nav a:hover, .nav a.on { color: var(--accent); }

.burger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.burger span { display: block; height: 1.5px; background: var(--text); border-radius: 2px; }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.sec-title {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 12px;
}
.sec-lead { color: var(--muted); margin-top: 12px; max-width: 560px; }

/* ---------- Hero (typographic opener) ---------- */
.opener { padding-top: 72px; padding-bottom: 56px; text-align: left; }
.opener h1 {
  font-size: clamp(2.3rem, 7vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -1.8px;
  line-height: 1.04;
  margin-top: 20px;
  max-width: 820px;
}
.opener h1 em { font-style: normal; font-weight: 300; color: var(--muted); }
.opener .lead {
  margin-top: 24px;
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  font-weight: 300;
}
.opener-cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.opener-note { font-size: 13px; color: var(--muted); letter-spacing: .3px; }

/* ---------- Log line (species · place · date · count) ---------- */
.logline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logline div { padding: 18px 0; }
.logline div:nth-child(odd) { padding-right: 12px; }
.logline div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.logline b { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.logline span { display: block; margin-top: 4px; font-size: 17px; font-weight: 500; }

/* ---------- Image band ---------- */
.lens { padding-top: 64px; padding-bottom: 64px; }
.lens-frame {
  background: #0A1629;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.lens-frame img { width: 100%; height: auto; }
.lens-cap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}
.lens-cap strong { color: var(--text); font-weight: 500; }

/* ---------- Entry mock ---------- */
.entry-sec { padding-top: 24px; padding-bottom: 64px; }
.entry-grid { display: grid; gap: 32px; margin-top: 32px; }
.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.entry-head h3 { font-size: 20px; font-weight: 600; }
.entry-head small { color: var(--muted); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.entry dl { margin: 18px 0 0; }
.entry dl div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border); font-size: 15px; }
.entry dt { color: var(--muted); }
.entry dd { margin: 0; font-weight: 500; }
.entry-tag {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 20px; }
.bars i { flex: 1; background: var(--raised); border-radius: 6px 6px 2px 2px; }
.bars i.hi { background: var(--accent); }
.bars-x { display: flex; gap: 8px; margin-top: 8px; }
.bars-x span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------- Features (definition list) ---------- */
.field { padding-top: 64px; padding-bottom: 64px; }
.defs { margin: 36px 0 0; }
.defs div { padding: 22px 0; border-top: 1px solid var(--border); }
.defs div:last-child { border-bottom: 1px solid var(--border); }
.defs dt { color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: .2px; }
.defs dd { margin: 6px 0 0; font-size: 17px; font-weight: 400; }

/* ---------- Trust (check list) ---------- */
.quiet { padding-top: 64px; padding-bottom: 64px; }
.quiet-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
}
.ticks { list-style: none; margin: 24px 0 0; padding: 0; }
.ticks li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* ---------- Closing CTA ---------- */
.flyout { padding-top: 40px; padding-bottom: 88px; text-align: center; }
.flyout img { width: 96px; height: 96px; border-radius: 18px; margin: 0 auto; border: 1px solid var(--border); }
.flyout h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.8px; margin-top: 24px; }
.flyout p { color: var(--muted); margin: 12px auto 0; max-width: 460px; }
.flyout .btn { margin-top: 28px; }

/* ---------- Inner pages ---------- */
.ph { padding-top: 56px; padding-bottom: 32px; }
.ph h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; letter-spacing: -1px; margin-top: 14px; }
.ph p { color: var(--muted); margin-top: 12px; max-width: 600px; }
.ph .upd { font-size: 13px; }

.sheets { display: grid; gap: 16px; padding-bottom: 32px; }
.sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.sheet h2 { font-size: 18px; font-weight: 600; }
.sheet h2 .n { color: var(--muted); font-weight: 400; margin-right: 8px; }
.sheet p { color: var(--muted); margin-top: 10px; }
.sheet p + p { margin-top: 8px; }
.sheet a { font-weight: 500; }
.sheet .big { color: var(--text); font-size: 20px; font-weight: 600; margin-top: 12px; }

.pair { display: grid; gap: 16px; padding-bottom: 72px; }
.pair .sheet { background: var(--raised); }

.legal-note { color: var(--muted); font-size: 14px; padding-bottom: 72px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); padding-top: 32px; padding-bottom: 40px; }
.foot-in { display: flex; flex-direction: column; gap: 20px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { height: 34px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--accent); }
.foot small { color: var(--muted); font-size: 13px; }

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  .perch { padding-left: 32px; padding-right: 32px; }

  .burger { display: none; }
  .nav { display: block; position: static; border: none; background: transparent; padding: 0; }
  .nav-in { flex-direction: row; gap: 4px; }
  .nav a { padding: 8px 14px; font-size: 14px; }

  .opener { padding-top: 112px; padding-bottom: 72px; }
  .opener .lead { font-size: 20px; }

  .logline { grid-template-columns: repeat(4, 1fr); }
  .logline div { padding: 22px 0; }
  .logline div:nth-child(-n+2) { border-bottom: none; }
  .logline div + div { border-left: 1px solid var(--border); padding-left: 20px; }

  .lens { padding-top: 88px; padding-bottom: 88px; }
  .lens-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: center 50%; }
  .lens-cap { flex-direction: row; justify-content: space-between; }

  .entry-grid { grid-template-columns: 1fr 1fr; }
  .entry { padding: 28px; }

  .field { padding-top: 96px; padding-bottom: 96px; }
  .defs div { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 26px 0; }
  .defs dd { margin: 0; }

  .quiet { padding-top: 32px; padding-bottom: 96px; }
  .quiet-box { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px; }
  .ticks { margin: 0; }

  .flyout { padding-bottom: 120px; }

  .ph { padding-top: 80px; padding-bottom: 40px; }
  .sheets.two { grid-template-columns: 1fr 1fr; }
  .sheet { padding: 30px; }
  .pair { grid-template-columns: 1fr 1fr; }

  .foot-in { flex-direction: row; align-items: center; justify-content: space-between; }
}
