/* Mirrors apps/website: globals.css, page.module.css (header), legal.module.css
   (article card), and site-footer.module.css. Keep the two in step. */

:root {
  --font-body: "Nunito", system-ui, sans-serif;
  --font-display: "Titan One", cursive, sans-serif;
  --foreground: #07143f;
  --ink-soft: #1c2d55;
  --ink-muted: #31549c;
  --sky: #5dc9f4;
  --sky-edge: #4bb9ed;
  --paper: #fffdf6;
  --navy: #112b4e;
  --link: #1d4ed8;
  --color-primary: #fdb70e;
  --color-primary-hover: #fdc53e;
  --gold-button:
    linear-gradient(180deg, rgb(255 255 255 / 55%), transparent 42%),
    linear-gradient(180deg, #fdc53e 0%, #fdb70e 55%, #e89a00 100%);
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  color: var(--foreground);
  background: var(--sky);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

main:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--foreground);
  background: var(--color-primary);
  border: 2px solid var(--foreground);
  border-radius: 4px;
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--foreground);
  outline-offset: 2px;
}

.page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: center;
  width: min(100% - 32px, 1600px);
  margin: 10px auto 40px;
}

.navbar-shell {
  display: flex;
  width: min(100%, 1080px);
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 7px;
  background: linear-gradient(180deg, #fff 0%, #e4e7ee 100%);
  border: 4px solid #2f86d6;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgb(14 85 135 / 22%);
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
}

.brand img {
  display: block;
  width: 190px;
  height: auto;
}

.brand-tag {
  padding: 6px 12px 7px;
  color: #fff;
  background: #2f86d6;
  border-radius: 999px;
  font: 400 18px/1 var(--font-display);
  transform: rotate(-6deg);
}

.nav {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font: 800 18px/1 var(--font-body);
}

.nav a:not(.header-cta) {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 2px solid #9ec8ee;
  border-radius: 999px;
  white-space: nowrap;
}

.nav svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.nav a[aria-current="page"] {
  color: #11172f;
  background: var(--gold-button);
  border-color: #e8b000;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 75%),
    0 4px 8px rgb(214 140 0 / 35%);
}

.nav a:not(.header-cta):hover:not([aria-current="page"]) {
  color: #11172f;
  background: #e7f3fc;
  border-color: #7eb6e6;
}

.header-cta,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  color: #212121;
  background: var(--color-primary);
  border: 2px solid #efb917;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgb(204 137 0 / 20%);
  font: 400 20px/1 var(--font-display);
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.header-cta {
  min-height: 52px;
  margin-left: 10px;
  color: #11172f;
  font-size: 26px;
  background: var(--gold-button);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 75%),
    0 4px 0 rgb(204 137 0 / 20%);
}

.header-cta:hover {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 45%), transparent 40%),
    linear-gradient(180deg, #ffe07a 0%, #fdc53e 55%, #fdb70e 100%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 80%),
    0 6px 0 rgb(204 137 0 / 22%);
  transform: translateY(-2px);
}

.cta:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 0 rgb(204 137 0 / 22%);
  transform: translateY(-2px);
}

.cta span {
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.brand:focus-visible,
.nav a:focus-visible,
.cta:focus-visible,
.feed-post a:focus-visible,
.pager-link:focus-visible,
.prose a:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 4px;
}

/* ---------- Home ---------- */

.blog-hero {
  display: flex;
  width: min(100% - 36px, 820px);
  align-items: center;
  gap: 22px;
  margin: 0 auto 28px;
}

.blog-hero-cooper {
  flex: 0 0 auto;
  width: 120px;
  height: auto;
  filter: drop-shadow(0 8px 10px rgb(17 43 78 / 22%));
  transform: rotate(-6deg);
}

.blog-hero h1 {
  color: #fff;
  font-size: 56px;
  line-height: 1;
  text-shadow:
    0 4px 0 #2f86d6,
    0 8px 14px rgb(17 43 78 / 28%);
}

.blog-hero p {
  margin-top: 12px;
  color: var(--foreground);
  font: 800 19px/1.35 var(--font-body);
}

.post-feed {
  display: grid;
  width: min(100% - 36px, 820px);
  gap: 32px;
  margin: 0 auto 36px;
}

.feed-post {
  overflow: hidden;
  background: var(--paper);
  border: 4px solid var(--sky-edge);
  border-radius: 18px 18px 28px 28px;
  box-shadow: 0 12px 24px rgb(17 43 78 / 16%);
}

.feed-post-heading {
  padding: 26px 32px 20px;
}

.feed-post-heading h2 {
  font-size: 34px;
  line-height: 1.1;
}

.feed-post-heading h2 a:hover {
  color: #2f86d6;
}

.feed-post-heading time,
.article-meta {
  color: var(--ink-muted);
  font: 800 13px/1.3 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-post-heading time {
  display: block;
  margin-top: 10px;
}

.feed-post-image {
  display: block;
  overflow: hidden;
  border-block: 4px solid #d7eef8;
}

.feed-post-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 300ms ease;
}

.feed-post-image:hover img {
  transform: scale(1.03);
}

.feed-post-summary {
  padding: 24px 32px 0;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 22px 32px 30px;
  padding: 0 22px;
  color: #11172f;
  background: var(--gold-button);
  border: 2px solid #e8b000;
  border-radius: 999px;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 75%),
    0 4px 0 rgb(204 137 0 / 20%);
  font: 400 19px/1 var(--font-display);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.read-more:hover {
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 80%),
    0 6px 0 rgb(204 137 0 / 22%);
  transform: translateY(-2px);
}

.read-more span[aria-hidden] {
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.feed-pager {
  display: grid;
  width: min(100% - 36px, 820px);
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 auto 36px;
}

.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;
}

.post-list-empty {
  padding: 36px;
  text-align: center;
  background: var(--paper);
  border: 4px solid var(--sky-edge);
  border-radius: 18px;
  font: 800 18px/1.4 var(--font-body);
}

/* ---------- Article ---------- */

.article {
  width: min(100% - 36px, 760px);
  margin: 12px auto 36px;
  padding: 36px 40px 42px;
  background: var(--paper);
  border: 4px solid var(--sky-edge);
  border-radius: 18px 18px 28px 28px;
  box-shadow: 0 12px 24px rgb(17 43 78 / 16%);
}

.article-centered {
  text-align: center;
}

.article-heading {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 3px solid #d7eef8;
}

.article-heading h1 {
  margin-top: 8px;
  font-size: 44px;
  line-height: 1.05;
}

.article-lede {
  margin-top: 14px;
  color: var(--ink-soft);
  font: 700 19px/1.45 var(--font-body);
}

.article-hero {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 28px;
  border: 3px solid #d7eef8;
  border-radius: 14px;
}

.prose {
  display: grid;
  gap: 20px;
  color: var(--ink-soft);
  font: 600 17px/1.6 var(--font-body);
}

.prose h2 {
  margin-top: 10px;
  color: var(--foreground);
  font-size: 28px;
  line-height: 1.15;
}

.prose h3 {
  margin-top: 6px;
  color: var(--foreground);
  font-size: 22px;
  line-height: 1.2;
}

.prose a {
  color: var(--link);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--foreground);
  font-weight: 800;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}

.prose li::marker {
  color: #2f86d6;
  font-weight: 900;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 14px;
}

.prose blockquote {
  padding: 16px 20px;
  color: var(--foreground);
  background: #fff5d6;
  border-left: 6px solid var(--color-primary);
  border-radius: 6px 14px 14px 6px;
  font-weight: 700;
}

.prose code {
  padding: 2px 6px;
  background: #e7f3fc;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 16px 18px;
  color: #e7f3fc;
  background: var(--navy);
  border-radius: 14px;
}

.prose pre code {
  padding: 0;
  color: inherit;
  background: none;
}

.prose hr {
  height: 3px;
  background: #d7eef8;
  border: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid #d7eef8;
}

.post-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 3px solid #d7eef8;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid #9ec8ee;
  border-radius: 14px;
  font: 400 18px/1.2 var(--font-display);
}

.pager-link span {
  color: var(--ink-muted);
  font: 800 13px/1 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pager-link:hover {
  background: #e7f3fc;
  border-color: #7eb6e6;
}

.pager-next {
  grid-column: 2;
  text-align: right;
}

/* ---------- Footer ---------- */

.footer-spacer {
  width: 100%;
  margin-top: auto;
  padding-top: 40px;
}

.site-footer {
  overflow: hidden;
  color: #fff;
  background: var(--navy);
  border-radius: 50% 50% 0 0 / 22px 22px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 48px, 1200px);
  min-height: 164px;
  margin-inline: auto;
  gap: 34px;
  padding-block: 24px;
}

.footer-action {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-action .cta {
  min-width: 304px;
  gap: 12px;
}

.footer-note {
  font: 400 24px/1.05 var(--font-display);
  opacity: 0.92;
  transform: rotate(-6deg);
}

.footer-note::before {
  display: inline-block;
  margin-right: 14px;
  content: "↱";
  font-family: Arial, sans-serif;
  font-size: 52px;
  transform: rotate(-20deg);
  vertical-align: middle;
}

.footer-note-right {
  justify-self: end;
  text-align: right;
  transform: rotate(-5deg);
}

.footer-note-right::before {
  content: "⌁";
}

.legal-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  text-align: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.legal-links a {
  font: 800 13px/1.2 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-links a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.copyright {
  font: 700 12px/1.3 var(--font-body);
  opacity: 0.8;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav svg {
    display: none;
  }

  .nav a:not(.header-cta) {
    padding: 8px 10px;
  }

  .header-cta {
    font-size: 22px;
  }
}

@media (max-width: 860px) {
  .site-header {
    margin-bottom: 28px;
  }

  .navbar-shell {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 10px 10px;
    border-radius: 28px;
  }

  .brand img {
    width: 160px;
  }

  .nav {
    flex: 1 0 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 16px;
  }

  .nav a:not(.header-cta) {
    min-height: 44px;
  }

  .header-cta {
    min-height: 44px;
    margin-left: 0;
    padding-inline: 18px;
    font-size: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-note-right {
    display: none;
  }
}

@media (max-width: 620px) {
  .blog-hero {
    gap: 14px;
  }

  .blog-hero-cooper {
    width: 80px;
  }

  .blog-hero h1 {
    font-size: 38px;
  }

  .blog-hero p {
    font-size: 17px;
  }

  .article {
    width: min(100% - 32px, 760px);
    padding: 26px 20px 32px;
  }

  .article-heading h1 {
    font-size: 34px;
  }

  .post-pager,
  .feed-pager {
    grid-template-columns: 1fr;
  }

  .feed-post-heading {
    padding: 20px 20px 16px;
  }

  .feed-post-heading h2 {
    font-size: 27px;
  }

  .feed-post-summary {
    padding: 20px 20px 0;
  }

  .read-more {
    margin: 20px 20px 26px;
  }

  .pager-next {
    grid-column: 1;
  }

  .footer-inner {
    display: flex;
    width: min(100% - 32px, 1200px);
    min-height: 220px;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding-block: 28px;
  }

  .footer-note {
    display: none;
  }

  .footer-action .cta {
    min-width: min(304px, 100%);
  }
}
