/*
 * Custom styling for francismadden.github.io. Defines the palette, layout,
 * typography, and component styles shared across the landing page and article
 * pages. Sections roughly map to the major blocks in index.html (hero, cards,
 * guides, about, contact, and CV timeline).
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6f9ff;
  --bg-soft: #eaf2ff;
  --card: #ffffff;
  --card-strong: #eff4ff;
  --text: #1f2933;
  --muted: #52606d;
  --accent: #5777d8;
  --accent-strong: #2f4fc9;
  --shadow: 0 20px 50px rgba(87, 119, 216, 0.12);
  --radius-lg: 20px;
  --radius-sm: 12px;
  --max-width: 1200px;
  --header-height: 88px;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 88px;
  scroll-behavior: smooth;
}

html, body {
  padding: 0;
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, rgba(112, 168, 255, 0.18), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.12), transparent 40%),
    linear-gradient(170deg, #fafdff 0%, #f3f7ff 45%, #eef4ff 100%);
  min-height: 100vh;
  height: 100%;
  line-height: 1.7;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

main {
  flex: 1 0 auto;
  min-height: 0;
}

section, .hero {
  scroll-margin-top: 64px;
}

@media (max-width: 768px) {
  section, .hero { scroll-margin-top: 56px; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0 0 0.35em;
  color: var(--text);
}

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

a:hover {
  color: var(--accent);
}

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

header.site-header {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 120;
  backdrop-filter: blur(12px);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.08);
  flex: 0 0 auto;
}

@supports not (position: sticky) and not (position: -webkit-sticky) {
  body { padding-top: var(--header-height); }

  header.site-header {
    position: fixed;
  }
}

.site-header.nav-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.08);
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease;
}

.site-header.nav-scrolled .navbar { padding: 0.9rem 1.5rem; }

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 1rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  line-height: 1.1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.38rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:hover { background: rgba(255, 255, 255, 1); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12); }

.nav-links { display: flex; gap: 1rem; align-items: center; }

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: all 0.25s ease;
  color: var(--muted);
}

.nav-links a:hover, .nav-links a:focus {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
}

.site-header.nav-collapsible .menu-toggle { display: flex; }

.site-header.nav-collapsible .navbar {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.7rem 1rem;
}

.site-header.nav-collapsible .nav-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  padding: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: none;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.site-header.nav-collapsible .nav-links a {
  padding-inline: 0.7rem;
  width: 100%;
}

.site-header.nav-collapsible .nav-links.nav-opening { animation: navSlideDown 0.25s ease forwards; }
.site-header.nav-collapsible .nav-links.nav-closing { animation: navSlideUp 0.22s ease forwards; }

.site-header.nav-collapsible .nav-links::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
}

.site-header.nav-collapsible.nav-open .nav-links,
.site-header.nav-open .nav-links,
.nav-links.open {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding: 0.5rem 0.75rem 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.12);
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes navSlideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.site-header.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero-meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  border: 1px solid #d0def7;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button.primary {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent));
  color: #fff;
  box-shadow: var(--shadow);
  border-color: transparent;
}

.button:hover {
  transform: translateY(-2px);
  border-color: #b6d0ff;
  box-shadow: 0 18px 35px rgba(59, 130, 246, 0.18);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 2.1rem;
}

.section .lead {
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 720px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 5rem 1.5rem 4rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-card {
  background: linear-gradient(145deg, #ffffff, #f2f7ff);
  padding: 2.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid #d8e6ff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 0.35rem;
}

.hero .title-pill {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #e4edff;
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.card-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.guide-scroller {
  position: relative;
}

.guides-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.guides-main { min-width: 0; }

.guide-profile-card {
  position: sticky;
  top: 100px;
  background: linear-gradient(160deg, #f7f9ff 0%, #eef2ff 100%);
  border: 1px solid #dfe7ff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.guide-headshot {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(47, 79, 201, 0.15);
  margin-bottom: 1rem;
}

.scroll-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d8e6ff;
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  z-index: 2;
}

.card-grid.edge-bounce-left {
  animation: edgeBounceLeft 0.45s ease;
}

.card-grid.edge-bounce-right {
  animation: edgeBounceRight 0.45s ease;
}

@keyframes edgeBounceLeft {
  0% { transform: translateX(0); }
  40% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

@keyframes edgeBounceRight {
  0% { transform: translateX(0); }
  40% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

.scroll-arrow:hover {
  transform: translateY(-50%) translateY(-2px);
  box-shadow: var(--shadow);
}

.scroll-arrow.prev { left: -0.75rem; }
.scroll-arrow.next { right: -0.75rem; }

@media (max-width: 980px) {
  .scroll-arrow.prev { left: -0.35rem; }
  .scroll-arrow.next { right: -0.35rem; }

  .guides-layout {
    grid-template-columns: 1fr;
  }

  .guide-profile-card {
    position: relative;
    top: auto;
  }
}

.card-grid::-webkit-scrollbar {
  height: 8px;
}

.card-grid::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
}

.card-grid::-webkit-scrollbar-track {
  background: transparent;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  border: 1px solid #d8e6ff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #bcd3ff;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.6rem;
}

.card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e5edff, #d7e5ff);
  display: block;
  object-fit: cover;
  border: 1px solid #d8e6ff;
  margin-bottom: 0.75rem;
}

.breathing-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid #d8e6ff;
  background: linear-gradient(140deg, #ffffff, #eef2ff);
  box-shadow: var(--shadow);
}

.breathing-copy p {
  color: var(--muted);
}

.breathing-preview {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #fafdff 0%, #f3f7ff 45%, #eef4ff 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.breathing-preview canvas {
  width: 100%;
  height: 100%;
}

.breath-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--text);
  font-weight: 700;
  text-align: center;
  gap: 0.1rem;
  text-shadow: none;
}

.breath-count {
  font-size: 2.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  color: #fff;
}

.timeline {
  display: grid;
  gap: 1.1rem;
}

.timeline-item {
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid #d8e6ff;
}

.article-layout .timeline-item {
  padding: 1rem 1.1rem;
}

.timeline-item h4 {
  margin: 0 0 0.35rem;
}

.cv-timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 2.25rem;
  display: grid;
  gap: 1.25rem;
}

.cv-path {
  position: absolute;
  left: 0.7rem;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, rgba(132, 164, 255, 0.85), rgba(78, 115, 216, 0.9));
  border-radius: 999px;
  opacity: 0.6;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}

.cv-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid #d8e6ff;
  box-shadow: 0 18px 35px rgba(59, 130, 246, 0.14);
  overflow: hidden;
  align-items: start;
}

.cv-item.highlight {
  background: linear-gradient(140deg, #ffffff, #eaf2ff);
  border-color: #bcd3ff;
}

.cv-logo {
  position: static;
  width: 64px;
  height: auto;
  border-radius: 12px;
  align-self: start;
  grid-row: 1;
  grid-column: 1;
  object-fit: contain;
}

.cv-logo-link {
  display: inline-block;
  line-height: 0;
}

.cv-logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 14px;
}

.cv-body {
  padding: 0;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 0.35rem;
}

@media (max-width: 720px) {
  .cv-item {
    grid-template-columns: 1fr;
  }
  .cv-logo {
    margin-left: 0;
    margin-bottom: 0.75rem;
  }
}

.cv-body > * { margin: 0; }
.cv-body ul { padding-left: 1.15rem; margin: 0; }

.cv-body h3 {
  margin: 0.15rem 0 0.4rem;
}

.cv-body a.cv-link {
  color: inherit;
  text-decoration: none;
}

.cv-body a.cv-link:hover,
.cv-body a.cv-link:focus-visible {
  text-decoration: underline;
}

.cv-body .meta {
  color: var(--muted);
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.cv-body .muted {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.timeline-item small {
  color: var(--muted);
  display: block;
  margin-bottom: 0.4rem;
}

.card-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-top: 0.35rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 1fr;
  gap: 1.5rem;
  align-items: start;
}

form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

label {
  font-weight: 600;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #d0def7;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

select option {
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea {
  resize: vertical;
}

.contact-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  border: 1px solid #d8e6ff;
  box-shadow: var(--shadow);
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid #d8e6ff;
}

.pill-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  padding: 0.3rem 0.75rem;
  background: #e6efff;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
}

.article-layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.4rem;
  align-items: start;
}

.article-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  background: var(--card);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
}

.article-aside h3 {
  margin: 0 0 0.35rem;
}

.article-aside p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: relative;
    top: 0;
    order: -1;
  }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.article-layout h1 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.article-meta {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.article-layout h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.article-layout p {
  color: var(--muted);
}

.article-section { margin-top: 1.2rem; }

.callout {
  background: linear-gradient(120deg, rgba(96, 165, 250, 0.15), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  color: var(--text);
  margin: 1rem 0;
}

.list {
  padding-left: 1rem;
  color: var(--muted);
}

.list li { margin-bottom: 0.55rem; }

.highlight-box {
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.list-clean {
  padding-left: 1rem;
  color: var(--muted);
}

.list-clean li { margin-bottom: 0.4rem; }

.video-embed {
  background: var(--card);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  border: none;
  border-radius: var(--radius-md);
  background: #000;
}

.related-links {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.related-links h3 {
  margin: 0 0 0.6rem;
}

.related-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.related-links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.related-links a:hover {
  color: var(--accent-strong);
}

.video-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-top: 1rem;
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  border: none;
  border-radius: var(--radius-sm);
}

.video-thumb { overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-soft); }

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.video-details { display: grid; gap: 0.4rem; }

.video-title { font-weight: 700; color: var(--text); margin: 0; }

.video-note { color: var(--muted); font-size: 0.95rem; margin: 0; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  height: 100%;
  object-fit: cover;
  object-position: 92% center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .about-image img { object-position: 98% center; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.hero-visual {
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 55%),
    var(--card-strong);
  height: 100%;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  min-height: 360px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}


.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Intro animation for initial load */
body.page-ready .navbar {
  animation: intro-down 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.05s;
}

body.page-ready .hero-card {
  animation: intro-up 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.12s;
}

body.page-ready .hero-visual {
  animation: intro-up 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}

body.page-ready .mouse-indicator {
  animation: intro-fade 0.9s ease forwards;
  animation-delay: 0.4s;
}

@keyframes intro-up {
  0% { opacity: 0; transform: translateY(18px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes intro-down {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes intro-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

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

  header.site-header {
    position: sticky;
  }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2.2rem; }
  .embed-frame { min-height: 720px; }
}
