/* Shared styles for aaronchavez site. Page sections keep their inline styles from the design canvas;
   this file holds the base, header, footer, embeds, and mobile adjustments. */

:root {
  --ink: #0A0A0B;
  --body: #52525B;
  --muted: #71717A;
  --border: #E4E4E7;
  --accent: #7C3AED;
  --accent-dark: #6D28D9;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); }
a:hover { color: #5B21B6; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-header { background: var(--ink); position: relative; z-index: 20; }
.nav {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: Montserrat, Inter, sans-serif; font-weight: 900; font-size: 20px;
  letter-spacing: 0.01em; text-transform: uppercase; color: #FFFFFF; text-decoration: none;
}
.brand:hover { color: #FFFFFF; }
.nav-links { display: flex; align-items: center; gap: 8px 28px; }
.nav-links a {
  color: #D4D4D8; text-decoration: none; font-size: 15px; font-weight: 600;
}
.nav-links a:hover { color: #FFFFFF; }
.nav-links a[aria-current="page"]:not(.nav-cta) {
  color: #FFFFFF; font-weight: 700; text-decoration: underline;
  text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px;
}
.nav-links .nav-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 10px; background: var(--accent); color: #FFFFFF; font-weight: 700;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #FFFFFF; }
.nav-links .nav-cta[aria-current="page"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #FFFFFF; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid #3F3F46; border-radius: 10px;
  background: transparent; color: #FFFFFF; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1000px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 4px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 17px; border-top: 1px solid #27272A; }
  .nav-links .nav-cta { justify-content: center; margin-top: 12px; border-top: 0; min-height: 52px; font-size: 17px; }
}

/* Footer */
.site-footer { background: var(--ink); color: #A1A1AA; font-size: 14px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 40px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand strong {
  font-family: Montserrat, Inter, sans-serif; font-weight: 900; color: #FFFFFF;
  font-size: 17px; text-transform: uppercase;
}
.footer-newsletter { border-bottom: 1px solid #27272A; scroll-margin-top: 80px; }
.footer-newsletter-inner {
  max-width: 1200px; margin: 0 auto; padding: 40px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
}
.footer-newsletter-copy { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.footer-newsletter-copy strong {
  font-family: Montserrat, Inter, sans-serif; font-weight: 900; color: #FFFFFF; font-size: 22px; text-transform: uppercase;
}
.footer-newsletter-copy span { color: #D4D4D8; font-size: 16px; }
.footer-newsletter-form { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.newsletter-fallback {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  min-height: 48px; padding: 0 24px; border-radius: 10px; background: #7C3AED; color: #FFFFFF;
  font-weight: 700; text-decoration: none;
}
.newsletter-fallback[hidden] { display: none; }
.embed-beehiiv.is-empty { display: none !important; }
.footer-newsletter-note { margin: 0; color: #A1A1AA; font-size: 13px; }
.footer-newsletter-note a { color: #D4D4D8; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; }
.footer-links a { color: #D4D4D8; }
.footer-links a:hover { color: #FFFFFF; }

/* Buttons and cards from the canvas get a hover state */
main a[style*="min-height"] { transition: filter 0.15s ease, transform 0.15s ease; }
main a[style*="min-height"]:hover { filter: brightness(1.08); }
main a[style*="border-radius: 16px"][style*="text-decoration: none"] { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
main a[style*="border-radius: 16px"][style*="text-decoration: none"]:hover { box-shadow: 0 10px 28px rgba(10, 10, 11, 0.08); }

/* Embeds */
.embed-typeform { width: 100%; min-height: 380px; border-radius: 16px; overflow: hidden; background: #FFFFFF; }
.embed-beehiiv { width: 100%; min-height: 64px; }
.embed-pending {
  margin: 0; padding: 14px 16px; border: 1px dashed #D4D4D8; border-radius: 10px;
  font-size: 14px; color: var(--muted); background: #FFFFFF;
}


.sr-only:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 14px; margin: 0;
  clip: auto; overflow: visible; white-space: normal; z-index: 100;
  background: #FFFFFF; color: var(--ink); border-radius: 8px; font-weight: 700;
}

@media (max-width: 640px) {
  /* Newsletter card: give the signup form more room on phones */
  #newsletter [style*="padding: 48px 32px"] { padding: 28px 20px !important; }
}

/* Small label under a logo */
main [style*="font-size: 11.5px"] { font-size: 12.5px !important; }

/* Tablet and below: center hero images and ebook covers once they wrap under the text */
@media (max-width: 1000px) {
  main > section:first-child > div > div:has(> img),
  main > section:first-child > div > div:has(> div > img) { margin-left: auto; margin-right: auto; }
  /* Stats row: tighter gap so all three fit on one line on tablets */
  main [style*="gap: 32px 112px"] { gap: 28px 32px !important; }
}

@media (max-width: 880px) {
  /* Footer links: bigger tap targets */
  .footer-links { gap: 0 22px; }
  .footer-links a { display: inline-block; padding: 11px 0; }
}

@media (max-width: 640px) {
  /* Ebook pages: smaller cover so the title and signup form sit higher on the screen */
  main > section:first-child img[src*="/ebook-"] { max-width: 200px !important; }
}

@media (min-width: 600px) and (max-width: 1000px) {
  main [style*="gap: 32px 112px"] { display: grid !important; grid-template-columns: repeat(3, 1fr); }
}

/* Cookie banner: small card, bottom left, no overlay */
.cookie-box {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; width: min(380px, calc(100vw - 32px));
  background: var(--ink); color: #E4E4E7; border: 1px solid #27272A; border-radius: 14px;
  padding: 18px 18px 16px; box-shadow: 0 18px 50px rgba(10, 10, 11, 0.35); font-size: 14px; line-height: 1.5;
}
.cookie-box[hidden] { display: none; }
.cookie-title { margin: 0 0 4px; font-weight: 800; color: #FFFFFF; font-size: 15px; }
.cookie-text { margin: 0 28px 12px 0; color: #D4D4D8; }
.cookie-text a { color: #C4B5FD; }
.cookie-details { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; padding: 12px 0 0; border-top: 1px solid #27272A; }
.cookie-details[hidden] { display: none; }
.cookie-details label { display: grid; grid-template-columns: 20px 1fr; column-gap: 8px; font-weight: 700; color: #FFFFFF; cursor: pointer; }
.cookie-details label span { grid-column: 2; font-weight: 400; color: #A1A1AA; font-size: 13px; }
.cookie-details input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions button {
  min-height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid #3F3F46; background: transparent; color: #FFFFFF;
}
.cookie-actions .cookie-accept { background: var(--accent); border-color: var(--accent); }
.cookie-actions .cookie-save { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.cookie-actions .cookie-manage { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }
.cookie-actions button[hidden] { display: none; }
.cookie-close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: transparent;
  color: #A1A1AA; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.cookie-close:hover { color: #FFFFFF; }
.footer-links .link-btn {
  padding: 0; border: 0; background: none; color: #D4D4D8; font: inherit; text-decoration: underline; cursor: pointer;
}
.footer-links .link-btn[hidden] { display: none; }
@media (max-width: 880px) { .footer-links .link-btn { padding: 11px 0; } }
/* Phones: legal links in a 2 x 2 grid so Cookie settings never wraps onto its own line */
@media (max-width: 600px) {
  .footer-links[aria-label="Legal"] { display: grid; grid-template-columns: repeat(2, max-content); column-gap: 32px; }
}
