/* ==========================================================================
   buddycobb.com — design system
   Aesthetic: dark, high-contrast, a little punk, a little cockpit-instrument.
   ========================================================================== */

:root {
  /* Palette */
  --bg: #0c0d10;
  --bg-elev: #141519;
  --bg-card: #16181d;
  --border: #262a31;
  --text: #e9ecf1;
  --text-dim: #a2a9b6;
  --text-faint: #6b7280;

  /* Accents: punk magenta + aviation amber/cyan */
  --accent: #ff2e63;        /* punk magenta/red */
  --accent-2: #ffb302;      /* runway amber */
  --accent-3: #2ec5ff;      /* HUD cyan */

  /* Type */
  --font-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grid / radar backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% -10%, rgba(46, 197, 255, 0.08), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(255, 46, 99, 0.08), transparent 40%),
    linear-gradient(transparent 95%, rgba(255, 255, 255, 0.03) 95%) 0 0 / 100% 28px,
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.03) 95%) 0 0 / 28px 100%;
  pointer-events: none;
}

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  color: var(--accent-2);
  margin: 0 0 0.75rem;
}

.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 60ch; }

mark { background: linear-gradient(transparent 60%, rgba(255, 179, 2, 0.35) 60%); color: inherit; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand .dot { color: var(--accent); }
.nav__links { display: flex; gap: 1.5rem; align-items: center; }
.nav__links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--accent);
}
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: #ff1452; }
.btn--ghost:hover { border-color: var(--accent-3); color: var(--accent-3); }

/* ---------- Form ---------- */
.form-wrap { margin-top: 3rem; max-width: 640px; }
.form-wrap h2 { margin-bottom: 1.25rem; }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form__field { display: flex; flex-direction: column; gap: 0.4rem; }
.form__field > span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.form input,
.form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 46, 99, 0.15);
}
.form textarea { resize: vertical; }
.form button { align-self: flex-start; cursor: pointer; }
.form__hp { display: none; }
.form__success {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--accent-3);
  border-radius: 10px;
  background: rgba(46, 197, 255, 0.08);
  color: var(--text);
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0; }
.section__head { margin-bottom: 2.5rem; }

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 3.5rem; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__photo {
  border-radius: 50%;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 46, 99, 0.12), var(--shadow);
}
.hero__cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero h1 .flash { color: var(--accent); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Centered flow: incomplete last row stays centered */
.grid--center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.grid--center > .card {
  flex: 1 1 240px;
  max-width: calc((100% - 3rem) / 3);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.card p { color: var(--text-dim); margin: 0; }
.card--link { display: block; color: inherit; text-decoration: none; }
.card--link:hover { text-decoration: none; }
.card--clickable { position: relative; cursor: pointer; }
.card__overlay { position: absolute; inset: 0; z-index: 1; text-indent: -9999px; overflow: hidden; }
.card--clickable .card__links a.site { position: relative; z-index: 2; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card__links a { text-decoration: none; }
.card__links a:hover { text-decoration: underline; }
.card__links .site { color: var(--accent-2); }

/* Tag chips */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-elev);
}
.tag--accent { border-color: var(--accent); color: var(--accent); }
.tag--amber { border-color: var(--accent-2); color: var(--accent-2); }
.tag--cyan { border-color: var(--accent-3); color: var(--accent-3); }

/* ---------- Blog list ---------- */
.post {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: baseline;
}
.post:last-child { border-bottom: 1px solid var(--border); }
.post__date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); }
.post__title { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 0.4rem; }
.post__title a { color: var(--text); }
.post__title a:hover { color: var(--accent); text-decoration: none; }
.post__cat { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Callout ---------- */
.callout {
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.callout strong { color: var(--text); }

/* ---------- Article / prose ---------- */
.article { max-width: 72ch; margin: 0 auto; }
.article__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.article h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.article p { color: var(--text-dim); margin: 0 0 1.25rem; font-size: 1.08rem; }
.article h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article strong { color: var(--text); }
.article a { color: var(--accent-3); }
.article .lead { color: var(--text); font-size: 1.2rem; }
.article ul, .article ol { color: var(--text-dim); margin: 0 0 1.25rem; padding-left: 1.4rem; }
.article li { margin-bottom: 0.6rem; font-size: 1.05rem; }
.article li::marker { color: var(--accent); }
.article__note {
  font-size: 0.92rem !important;
  color: var(--text-faint) !important;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 2rem !important;
  font-style: italic;
}
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 2rem 0 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: var(--text-dim);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--text-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__photo { margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .grid--center > .card { max-width: 100%; flex-basis: 100%; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 1rem;
  }
  .nav__links.open { display: flex; }
  .nav__links a.active::after { display: none; }
  .nav__toggle { display: inline-block; }
  .post { grid-template-columns: 1fr; gap: 0.4rem; }
}
