/* ==========================================================================
   CyberMattLee — site stylesheet
   Plain CSS, no framework, no build step. Brand: pink (#d9039c) on deep
   purple (#18033c). Body font: Open Sans (Google Fonts).
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --pink: #d9039c;
  --pink-bright: #f92c8b;
  --dark: #18033c;
  --dark-2: #220a4d;
  --dark-3: #2c1259;
  --ink: #f4f1fa;
  --muted: #b9aed4;
  --line: rgba(255, 255, 255, 0.12);
  --white: #ffffff;
  --maxw: 1100px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --font: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--dark);
  background-image:
    radial-gradient(circle at 85% -10%, rgba(217, 3, 156, 0.25), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(217, 3, 156, 0.12), transparent 40%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-bright); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p, ul, ol, blockquote, figure { margin: 0 0 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

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

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--pink); color: var(--white); padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--pink-bright); outline-offset: 2px; }

/* ---- Buttons ---- */
.btn-cta, .btn {
  display: inline-block; font-weight: 700; line-height: 1;
  padding: 12px 22px; border-radius: 999px;
  background: var(--pink); color: var(--white) !important;
  text-decoration: none !important; border: 2px solid var(--pink);
  transition: background .15s ease, transform .15s ease;
}
.btn-cta:hover, .btn:hover { background: var(--pink-bright); border-color: var(--pink-bright); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink) !important; border-color: var(--pink); }
.btn-outline:hover { background: var(--pink); color: var(--white) !important; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(24, 3, 60, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 8px; }
.brand-name { font-weight: 800; letter-spacing: .2px; font-size: 1.15rem; }

.primary-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-links, .social-links { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus { color: var(--white); background: rgba(255,255,255,.08); text-decoration: none; }
.social-links { gap: 6px; }
.social-links a { color: var(--muted); display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.social-links a:hover { color: var(--pink-bright); background: rgba(255,255,255,.08); }

.nav-toggle { display: none; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

/* ==========================================================================
   Main / sections
   ========================================================================== */
main { display: block; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.page-head { padding: 48px 0 8px; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* Hero (home + page intros) */
.hero { padding: 64px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .3em; }
.eyebrow { color: var(--pink-bright); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; margin-bottom: .25em; }
.text-center { text-align: center; }
.hero-media img { border-radius: var(--radius); }

/* Cards / content panels */
.card {
  background: var(--dark-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.prose { max-width: 760px; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose figure { margin: 1.8rem 0; }
.prose figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: .5rem; }
.prose blockquote {
  border-left: 4px solid var(--pink); margin: 1.5rem 0; padding: .5rem 0 .5rem 1.2rem;
  color: var(--muted); font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .4em 0; }
.prose a { text-decoration: underline; }

/* Meta line (blog dates etc.) */
.post-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.post-meta time { color: var(--pink-bright); font-weight: 600; }

/* Responsive video / iframe embeds (YouTube) */
.embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1.8rem 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
/* Tall embeds (forms) — natural height instead of 16:9 */
.embed--form { position: static; aspect-ratio: auto; min-height: 520px; margin: 1.8rem 0; }
.embed--form iframe { position: static; width: 100%; min-height: 520px; height: 100%; border: 0; border-radius: var(--radius); }

/* Inline image (e.g. license badge sitting in a line of text) */
.inline-img { display: inline-block; vertical-align: middle; }

/* Blog index list */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.post-list .card { display: block; }
.post-list h2 { font-size: 1.4rem; margin-bottom: .25em; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--pink-bright); }
.post-list .excerpt { color: var(--muted); margin-bottom: 0; }

/* Simple image grid (galleries) */
.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.img-grid img { border-radius: var(--radius); width: 100%; }

/* ==========================================================================
   Forms (contact)
   ========================================================================== */
.form { max-width: 620px; }
.form .field { margin-bottom: 18px; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--dark-2); border: 1px solid var(--line); border-radius: 8px;
}
.form input:focus, .form textarea:focus { border-color: var(--pink); outline: none; }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }  /* honeypot */
.form-note { color: var(--muted); font-size: .92rem; }
.form-status.ok { color: #7ee0a8; font-weight: 600; }
.form-status.err { color: var(--pink-bright); font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--dark-2); border-top: 1px solid var(--line); margin-top: 64px; }
.footer-inner { padding: 40px 0; text-align: center; }
.footer-brand { display: inline-block; margin-bottom: 16px; }
.footer-brand img { border-radius: 8px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 0; margin: 0 0 16px; }
.footer-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--pink-bright); }
.footer-legal { color: var(--muted); font-size: .85rem; max-width: 760px; margin: 0 auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 820px) {
  body { font-size: 17px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .primary-nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--dark); border-bottom: 1px solid var(--line);
    padding: 12px 20px 24px; box-shadow: var(--shadow);
    max-height: calc(100vh - 68px); overflow-y: auto;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .primary-nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .social-links { justify-content: center; padding: 14px 0; }
  .btn-cta { text-align: center; margin-top: 8px; }
}

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