
:root {
  --bg-color: #bde7c3;
  --primary: #036938;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(3, 105, 56, 0.08);
  --shadow-soft: 0 18px 45px rgba(3, 105, 56, 0.08);
  --shadow-strong: 0 24px 60px rgba(3, 105, 56, 0.16);
  --max-width: 520px;
  font-size: 16px;
}

/* Global resets & helpers */
* { box-sizing: border-box; }
html, body {
  padding: 0;
  margin: 0;
  min-height: 100%;
  font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--primary);
}
body { position: relative; overflow-x: hidden; }

/* Ensure images don't leave inline gaps and behave consistently */
img { display: block; max-width: 100%; height: auto; }

.background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 20% -10%, #ffffffaa, transparent 50%),
    radial-gradient(circle at 80% 0%, #ffffffaa, transparent 45%), var(--bg-color);
}
.background::after {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(80px);
  backdrop-filter: blur(80px);
}

.page {
  max-width: var(--max-width);
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 64px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 20px;
}
.hero__logo {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 12px 30px rgba(3, 105, 56, 0.25));
}
.hero__text h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin: 0;
  font-weight: 700;
}
.hero__text p {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 500;
}

.social { display: flex; gap: 16px; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 20px rgba(3, 105, 56, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.social svg { fill: var(--primary); width: 22px; height: 22px; }
.social a:hover, .social a:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(3, 105, 56, 0.2);
}

.links { display: flex; flex-direction: column; gap: 16px; }

.link-button {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding: 20px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(3, 105, 56, 0.08);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-button__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  pointer-events: none;
}
.link-button__icon img { width: 56px; height: auto; }

.link-button__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 auto;
  min-width: 0;
}
.link-button__content--featured { gap: 0; }
.link-button__content .link-button__description { font-weight: 500; opacity: 0.85; }

.link-button--featured {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(3, 105, 56, 0.12);
  box-shadow: var(--shadow-strong);
  border-radius: 26px;
}

/* FEATURED CARD MEDIA
   The original code used `inset` on the absolutely positioned image.
   Some mobile browsers (esp. older iOS / in‑app webviews) ignore `inset`,
   which leaves the image at its intrinsic size.  We:
   1) Give the media wrapper an aspect-ratio so it always has a height.
   2) Anchor the image with explicit top/left/right/bottom instead of `inset`.
*/
.link-button--featured .link-button__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  line-height: 0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  aspect-ratio: 16 / 9;
}
@supports not (aspect-ratio: 1 / 1) {
  .link-button--featured .link-button__media {
    height: clamp(152px, 48vw, 196px); /* Fallback for older browsers */
  }
}
.link-button--featured .link-button__media img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0; /* instead of inset for wider support */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.link-button--featured .link-button__content {
  padding: 14px 24px 18px;
  gap: 4px;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: none;
  width: 100%;
}

.footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(3, 105, 56, 0.78);
  margin: 0 auto 40px;
  padding: 0 24px;
  max-width: var(--max-width);
}
.footer a { color: inherit; text-decoration: underline; }

.link-button__title { font-size: 1.02rem; line-height: 1.3; }
.link-button strong { font-weight: 600; }

.link-button:hover, .link-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 26px 45px rgba(3, 105, 56, 0.18);
}

@media (max-width: 520px) {
  .page { padding: 56px 16px 80px; gap: 24px; }
  .links { gap: 14px; }
  /* Mobile padding override disabled so the featured card stays flush */ 
  /* (.link-button { padding: 18px 22px; } 
  .link-button--featured .link-button__content { padding: 14px 20px 18px; }
  Height already handled by aspect-ratio; keep as fallback for very old browsers. */
  .link-button--featured .link-button__media { height: clamp(152px, 48vw, 196px); }
  .link-button__icon { width: 56px; height: 56px; flex: 0 0 56px; }
  .link-button__content { min-width: 0; }
  .link-button__icon img { width: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
