/* MMAEP — Mahaney's Marketing, Advertising & Event Planning
   Dark neutral theme, red accent family */
:root {
  --bg: #151517;
  --surface: #1c1c1f;
  --card: #222226;
  --text: #eceae6;
  --muted: #a6a29b;
  --red: #d2402f;        /* primary accent */
  --red-deep: #a12a1f;   /* third strand */
  --ember: #f26b52;      /* lightest strand */
  --line: rgba(236, 234, 230, 0.12);
  --radius: 10px;
  --display: "Space Grotesk", sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

a { color: var(--ember); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

h1, h2, h3, .brand { font-family: var(--display); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

/* --- signature: tri-band (one strand per service) --- */
.triband { display: flex; height: 5px; }
.triband i { flex: 1; }
.triband i:nth-child(1) { background: var(--ember); }
.triband i:nth-child(2) { background: var(--red); }
.triband i:nth-child(3) { background: var(--red-deep); }

.brand-mark { display: inline-flex; gap: 3px; margin-right: 0.5rem; }
.brand-mark i { width: 5px; height: 1.1em; border-radius: 2px; display: inline-block; transform: skewX(-12deg); }
.brand-mark i:nth-child(1) { background: var(--ember); }
.brand-mark i:nth-child(2) { background: var(--red); }
.brand-mark i:nth-child(3) { background: var(--red-deep); }

/* --- nav --- */
.nav, .admin-nav {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(21, 21, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  display: inline-flex; align-items: center;
  font-weight: 700; font-size: 1.3rem; text-decoration: none; color: var(--text);
}
.nav nav, .admin-nav nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav nav a, .admin-nav nav a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem;
  padding: 0.2rem 0; border-bottom: 2px solid transparent;
}
.nav nav a[aria-current], .admin-nav nav a[aria-current] { color: var(--text); border-bottom-color: var(--red); }
.nav nav a:hover, .admin-nav nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--red); color: #fff !important; padding: 0.45rem 1rem !important;
  border-radius: 999px; border: none !important;
}
.nav-cta:hover { background: var(--ember); }

/* --- hero --- */
.hero {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center; padding: clamp(2.5rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px; margin: 0 auto;
}
.hero-acronym { font-family: var(--display); user-select: none; }
.hero-acronym .row { display: flex; align-items: baseline; gap: 0.45rem; line-height: 0.95; }
.hero-acronym .lt {
  font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 700; color: var(--text);
}
.hero-acronym .a-name { color: var(--text); }
.hero-acronym .a-marketing { color: var(--ember); }
.hero-acronym .a-advertising { color: var(--red); }
.hero-acronym .a-event { color: var(--red-deep); }
.hero-acronym em {
  font-style: normal; font-family: var(--body); font-size: 0.9rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-copy h1 { margin-top: 0; }
.hero-copy p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
}

/* --- buttons --- */
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
  font-family: var(--body); font-size: 1rem; cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--ember); }
.btn-ghost { border-color: var(--muted); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; }

/* --- sections --- */
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-block; padding-bottom: 0.3rem; border-bottom: 3px solid;
}
.eyebrow.violet { color: var(--ember); border-color: var(--ember); }
.eyebrow.tangerine { color: var(--red); border-color: var(--red); }
.eyebrow.gold { color: var(--red-deep); border-color: var(--red-deep); }

.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px; margin: 0 auto;
}
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.service p { color: var(--muted); margin-bottom: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem);
}
.home-events { padding-bottom: clamp(2rem, 6vw, 4rem); }

.event-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 3rem);
}
.event-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.event-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.event-card-body { padding: 1.2rem; }
.event-card h3 { margin: 0 0 0.3rem; }
.event-card p { color: var(--muted); }
.event-meta { color: var(--red); font-size: 0.9rem; margin: 0 0 0.5rem; }

.cta-band {
  background: var(--surface); color: var(--text); text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 7vw, 5rem) 1rem; margin-top: 2rem;
  position: relative;
}
.cta-band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--red), var(--red-deep));
}
.cta-band h2 { margin-top: 0; }

.page-head { max-width: 800px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem) 0; }
.lede { font-size: 1.15rem; color: var(--muted); }
.prose { max-width: 800px; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; }
.prose p { font-size: 1.05rem; color: var(--text); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.step b { font-family: var(--display); font-size: 1.6rem; color: var(--red); }
.step h3 { margin: 0.3rem 0; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* --- forms --- */
.contact-wrap {
  display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem;
  max-width: 1000px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 4rem;
}
@media (max-width: 760px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-aside { color: var(--muted); }
.contact-aside b { color: var(--text); }

.form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 1.1rem; }
.form input, .form textarea, .form select {
  display: block; width: 100%; margin-top: 0.35rem;
  padding: 0.65rem 0.8rem; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus {
  border-color: var(--red); outline: 3px solid rgba(210, 64, 47, 0.25);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form .check { display: flex; align-items: center; gap: 0.5rem; }
.form .check input { width: auto; margin: 0; }
.hp { position: absolute; left: -9999px; }

.notice { border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.5rem; border: 1px solid var(--line); background: var(--card); }
.notice.ok { border-color: #3f6b4a; background: #1d2a20; }
.notice.error { border-color: #8a4038; background: #2c1c1a; }

/* --- footer --- */
.footer { background: var(--surface); color: var(--muted); margin-top: auto; border-top: 1px solid var(--line); }
.footer .triband { height: 5px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
  max-width: 1200px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem) 1rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--text); margin: 0; }
.footer-name { margin: 0.2rem 0 0; font-size: 0.9rem; }
.footer-tag { margin: 0.3rem 0 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-meta p { margin: 0 0 0.4rem; }
.footer-fine {
  max-width: 1200px; margin: 0 auto; padding: 0.8rem clamp(1rem, 4vw, 3rem) 1.5rem;
  font-size: 0.85rem; color: #6f6c66;
}
.footer-fine a { color: #6f6c66; }

/* --- admin --- */
body.admin { background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
.admin-tag {
  font-family: var(--body); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; background: var(--red); color: #fff;
  padding: 0.15rem 0.5rem; border-radius: 999px; margin-left: 0.5rem;
}
.admin-main { max-width: 1000px; width: 100%; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }
.logout { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--muted); }
.logout button {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.9rem; cursor: pointer; font: inherit; color: var(--text);
}
.logout button:hover { background: var(--red); border-color: var(--red); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; text-decoration: none; color: var(--text);
}
.stat b { font-family: var(--display); font-size: 2rem; display: block; color: var(--ember); }
.stat span { color: var(--muted); font-size: 0.9rem; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.table td a { color: var(--ember); }
.table tr.unread { background: #2a201e; }
.table .msg { max-width: 320px; }
.table small { color: var(--muted); }
.row-actions { display: flex; gap: 0.6rem; align-items: center; }
.row-actions form { display: inline; }

.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.tabs { display: flex; gap: 0.5rem; }
.tabs a {
  text-decoration: none; color: var(--muted); padding: 0.35rem 1rem;
  border-radius: 999px; border: 1px solid var(--line); font-size: 0.9rem;
}
.tabs a[aria-current] { background: var(--red); color: #fff; border-color: var(--red); }

.contact-cards { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.contact-card.unread { border-left: 4px solid var(--red); }
.contact-card header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); }
.contact-card header b { color: var(--text); }
.contact-card p { white-space: pre-wrap; }
.contact-card footer { display: flex; gap: 0.6rem; }
.contact-card footer button, .row-actions button {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.9rem; cursor: pointer; font: inherit; font-size: 0.85rem; color: var(--text);
}
.contact-card footer button:hover, .row-actions button:hover { background: var(--red); border-color: var(--red); color: #fff; }
button.danger { color: #ff8d80; border-color: #6e352e !important; }
button.danger:hover { background: #b3261e !important; border-color: #b3261e !important; color: #fff; }

.pill {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.15rem 0.6rem; border-radius: 999px; background: #2e2e33; color: var(--muted);
}
.pill.ok { background: #1d2a20; color: #7fc78f; }

.admin-form { max-width: 640px; }
.form-actions { display: flex; gap: 0.8rem; margin-top: 0.5rem; }
.hint { color: var(--muted); }

/* --- login & users --- */
.login-box {
  max-width: 380px; margin: 8vh auto 0; background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--red);
  border-radius: var(--radius); padding: 2rem;
}
.login-box h1 { margin-top: 0; font-size: 1.6rem; }
.google-btn { display: block; text-align: center; margin-bottom: 1.2rem; }
.divider {
  display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0;
  color: var(--muted); font-size: 0.85rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.inline-detail summary {
  cursor: pointer; font-size: 0.85rem; color: var(--ember);
  list-style: none; padding: 0.3rem 0;
}
.inline-detail form { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.inline-detail input {
  padding: 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 0.85rem; background: var(--surface); color: var(--text);
}
.inline-detail button {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.9rem; cursor: pointer; font: inherit; font-size: 0.85rem; color: var(--text);
}

/* --- analytics --- */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1.5rem 0 2rem; }
@media (max-width: 820px) { .analytics-grid { grid-template-columns: 1fr; } }
.analytics-grid h2 { margin-top: 0; }
.analytics-grid small { color: var(--muted); font-size: 0.8rem; }

.mini-bar { height: 8px; background: var(--red); border-radius: 2px; min-width: 2px; }

.purge-form { display: flex; align-items: center; gap: 0.7rem; }
.purge-form label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); margin: 0; }
.purge-form select {
  padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem;
}

.session-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.session-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.session-row > summary {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.8rem 1rem; cursor: pointer; list-style: none; user-select: none;
}
.session-row > summary::-webkit-details-marker { display: none; }
.session-row > summary::before {
  content: "▶"; font-size: 0.65rem; color: var(--muted); transition: transform 0.15s;
  flex-shrink: 0;
}
.session-row[open] > summary::before { transform: rotate(90deg); }
.session-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.session-start { font-size: 0.82rem; color: var(--muted); }
.session-path-preview { font-size: 0.88rem; color: var(--ember); font-family: var(--body); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-detail { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.path-list { margin: 0.8rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.path-list li { font-size: 0.9rem; display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; }
.path-time { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.path-ref { color: var(--muted); font-size: 0.78rem; }

/* --- backup / restore --- */
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 0.5rem; }
@media (max-width: 820px) { .backup-grid { grid-template-columns: 1fr; } }
.backup-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.backup-panel h2 { margin-top: 0; }

fieldset.section-checks { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 0.5rem 0 1.2rem; }
fieldset.section-checks legend { padding: 0 0.5rem; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.check-row { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.9rem; font-weight: 400; cursor: pointer; }
.check-row:last-child { margin-bottom: 0; }
.check-row input[type=checkbox] { margin-top: 0.2rem; accent-color: var(--red); width: auto; flex-shrink: 0; }
.check-row span { display: flex; flex-direction: column; gap: 0.1rem; }
.check-row b { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.check-row small { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.check-row.disabled { opacity: 0.5; cursor: default; }
.field-hint { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

.form input[type=file] {
  display: block; width: 100%; margin-top: 0.35rem;
  padding: 0.5rem; border: 1px dashed var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.form input[type=file]:hover { border-color: var(--red); }

/* --- social icons (footer) --- */
.footer-social {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto 0.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
}
.footer-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  color: var(--muted); border: 1px solid var(--line);
  background: transparent; text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.footer-social-link:hover {
  color: var(--sc, var(--red));
  border-color: var(--sc, var(--red));
  background: rgba(255,255,255,.05);
}

/* --- social admin guide --- */
.embed-guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin-top: 0.8rem;
}
.embed-guide-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.embed-guide-card b { color: var(--text); font-size: 0.92rem; }
.embed-guide-card p { color: var(--muted); font-size: 0.82rem; margin: 0; line-height: 1.5; }
.embed-guide-card code { font-size: 0.75rem; background: var(--bg); padding: 0.1rem 0.3rem; border-radius: 3px; }
.social-embed-guide { margin-top: 2.5rem; }
.edit-row-form { padding: 1rem; background: var(--bg); border-radius: 8px; margin-top: 0.5rem; }

/* --- social block (public page) --- */
.cp-social { }
.social-widget-wrap { border-radius: var(--radius); overflow: hidden; }
.social-widget-label {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem;
}
.social-link-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 2rem; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  max-width: 480px;
}
.social-link-card:hover { border-color: var(--red); box-shadow: 0 0 0 2px rgba(210,64,47,.15); }
.slc-icon { flex-shrink: 0; }
.slc-text { display: flex; flex-direction: column; gap: 0.2rem; }
.slc-text b { font-size: 1.1rem; }
.slc-text span { color: var(--muted); font-size: 0.88rem; }
.slc-cta { color: var(--ember) !important; font-weight: 600; margin-top: 0.3rem; }

/* --- builder zone (blocks below static pages) --- */
.builder-zone { border-top: 1px solid var(--line); margin-top: 0; }
.builder-zone-inner { max-width: 900px; margin: 0 auto; padding: clamp(2rem,5vw,3.5rem) clamp(1rem,4vw,2rem); }
.builder-zone-inner .cp-block:first-child { margin-top: 0; }
