/* ============================================================
   Heart Foundation Trust — Premium Static Site
   Typography: Playfair Display + DM Sans
   Palette: Navy #0B1D32, Cardiac Red #9B2335, Gold #C09464
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

/* — Custom Properties — */
:root {
  --navy: #0B1D32;
  --navy-light: #132B48;
  --red: #9B2335;
  --red-dark: #7A1C2A;
  --red-light: #C73E52;
  --gold: #C09464;
  --gold-light: #D4AD82;
  --cream: #FAF9F6;
  --warm-white: #FFFEFA;
  --sand: #F0ECE4;
  --text: #1C1C1C;
  --text-muted: #5A5A5A;
  --text-light: #8A8A8A;
  --border: #E4DFD7;
  --shadow-sm: 0 1px 3px rgba(11,29,50,0.06);
  --shadow-md: 0 4px 20px rgba(11,29,50,0.08);
  --shadow-lg: 0 12px 40px rgba(11,29,50,0.12);
  --shadow-xl: 0 20px 60px rgba(11,29,50,0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* — Reset & Base — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* — Skip Link — */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  font-weight: 600;
}
.skip:focus { left: 10px; top: 10px; border-radius: 6px; }

/* — Container — */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 860px; }

/* — Animations — */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(1); }
  42% { transform: scale(1.06); }
  70% { transform: scale(1); }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.8s var(--transition) forwards;
}

/* — Typography — */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 600;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }
p { margin: 0 0 1rem; }

.text-gold { color: var(--gold); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 680px;
}
.kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(192,148,100,0.12);
  border: 1px solid rgba(192,148,100,0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.mini { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }
.hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* — Header — */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,254,250,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(228,223,215,0.5);
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(255,254,250,0.95);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.brand img {
  height: 48px;
  width: auto;
  transition: var(--transition);
}
.brand:hover img { transform: scale(1.03); }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.brand-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Nav */
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--navy);
  background: rgba(11,29,50,0.04);
}
.nav-list a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.nav-cta {
  margin-left: 8px;
}
.nav-cta a {
  background: var(--red) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  border-radius: 100px !important;
  box-shadow: 0 2px 12px rgba(155,35,53,0.25);
  transition: var(--transition) !important;
}
.nav-cta a:hover {
  background: var(--red-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(155,35,53,0.35) !important;
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: var(--transition);
}
.mobile-toggle:hover { background: rgba(11,29,50,0.04); }
.hamburger {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 900px) {
  .mobile-toggle { display: flex; }
  .nav-list {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: var(--warm-white);
    padding: 32px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: var(--transition-slow);
    overflow-y: auto;
  }
  .nav-list.open { transform: translateX(0); }
  .nav-list a { font-size: 1.1rem; padding: 14px 20px; }
  .nav-cta { margin-left: 0; margin-top: 16px; }
  .nav-cta a { display: block; text-align: center; }
}

/* — Hero Sections — */
.hero {
  position: relative;
  background: var(--navy);
  padding: 160px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(155,35,53,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(192,148,100,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--cream), transparent);
  pointer-events: none;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero h1 { color: #fff; margin-bottom: 16px; }
.hero .lead { color: rgba(255,255,255,0.7); }
.hero .badge {
  color: var(--gold-light);
  background: rgba(192,148,100,0.15);
  border-color: rgba(192,148,100,0.3);
}

/* Home hero */
.hero--home {
  padding: 140px 0 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.hero--home::after { display: none; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content {
  animation: slideInLeft 1s ease forwards;
}
.hero-visual {
  animation: slideInRight 1s ease 0.2s forwards;
  opacity: 0;
}
.hero-visual img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat { text-align: left; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
.heart-float {
  position: absolute;
  opacity: 0.04;
  font-size: 180px;
  color: #fff;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  animation: heartbeat 3s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero { padding: 130px 0 70px; }
  .hero--home { min-height: auto; padding: 130px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
}

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 12px rgba(155,35,53,0.25);
}
.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(155,35,53,0.35);
}
.btn--secondary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 12px rgba(11,29,50,0.2);
}
.btn--secondary:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--navy);
  background: rgba(11,29,50,0.03);
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* — Sections — */
.section { padding: 100px 0; }
.section--alt { background: var(--warm-white); }
.section--sand { background: var(--sand); }
.section-header { margin-bottom: 56px; }
.section-header h2 { margin-bottom: 12px; }

/* — Cards — */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(228,223,215,0.5);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card img {
  aspect-ratio: 3/2;
  object-fit: cover;
  width: 100%;
  transition: var(--transition-slow);
}
.card:hover img { transform: scale(1.04); }
.card-img-wrap { overflow: hidden; position: relative; }
.card-body { padding: 28px; }
.card-body h3 {
  margin: 6px 0 10px;
  transition: var(--transition);
}
.card-body h3 a:hover { color: var(--red); }
.card-body .mini { margin: 0; }

/* — Grid Layouts — */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* — Panel — */
.panel {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(228,223,215,0.3);
}
.panel .pad { padding: 32px; }
.panel img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* — Testimonials — */
.testimonial {
  position: relative;
  padding: 32px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.testimonial:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-md);
}
.testimonial::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  position: absolute;
  top: 16px;
  left: 24px;
}
.testimonial p {
  position: relative;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 12px 0 16px;
}
.testimonial-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}
.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* — Form — */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192,148,100,0.15);
  background: #fff;
}
.form-textarea { resize: vertical; min-height: 140px; }
.form-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 8px;
}

/* — Timeline — */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--red));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--red);
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--red);
}
.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item p { margin: 0; }

/* — Hours — */
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.hours-row:last-child { border-bottom: none; }
.hours-day { font-weight: 600; color: var(--navy); }
.hours-time { color: var(--text-muted); }

/* — Blog list — */
.blog-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.blog-item:last-child { border-bottom: none; }
.blog-item h3 { margin-bottom: 4px; }
.blog-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* — CTA Banner — */
.cta-banner {
  background: var(--navy);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(155,35,53,0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(192,148,100,0.15) 0%, transparent 50%);
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; position: relative; }
.cta-banner .lead { color: rgba(255,255,255,0.65); margin: 0 auto 32px; position: relative; }
.cta-banner .btn-group { justify-content: center; position: relative; }

/* — Footer — */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1) opacity(0.9);
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 300px;
}
.footer-heading {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold-light); }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.footer-contact-icon {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}
.footer-bottom a {
  color: rgba(255,255,255,0.4);
  transition: var(--transition);
}
.footer-bottom a:hover { color: var(--gold-light); }
.footer-legal { display: flex; gap: 20px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* — Scroll reveal — */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* — Utility — */
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }

/* — Print — */
@media print {
  .site-header, .site-footer, .cta-banner, .mobile-toggle { display: none; }
  body { background: #fff; color: #000; }
  .hero { background: #eee; padding: 40px 0; }
  .hero h1, .hero .badge { color: #000; }
}
