/* ==========================================================================
   Fundación Afueras del Mar — main stylesheet
   Warm, community-focused theme: navy, warm cream, soft coral and white.

   Contents:
   1. Design tokens (colors, fonts, sizes)
   2. Base styles
   3. Navigation bar
   4. Hero
   5. About Us (mission, vision & values)
   6. Programs (support groups)
   7. Events
   8. Contact
   9. Donate (PayPal)
   10. Footer
   11. Responsive: tablet
   12. Responsive: mobile
   13. Scroll animations
   14. Motion preferences
   ========================================================================== */


/* ---------- 1. Design tokens ---------- */
/* Reusable values. Change one here and it updates everywhere it's used. */

:root {
    /* Brand colors */
    --navy: #243B53;          /* main text, buttons and footer */
    --navy-dark: #1A2B3D;     /* hover state for navy buttons */
    --navy-soft: #3E5670;     /* body copy on cream (about 7:1 contrast) */
    --cream: #FAF7F0;         /* page background */
    --coral: #E9A18B;         /* accents and the Donate button */
    --coral-light: #F3C3B4;   /* Donate hover and text selection */
    --coral-tint: #FBEAE4;    /* very light coral for soft backgrounds */
    --navy-tint: #DCE3EB;     /* very light blue-gray for value labels */
    --sun-tint: #FCEFD2;      /* very light sun yellow for icon badges */
    --white: #FFFFFF;

    /* Typography: a warm serif for headings, a clean sans for reading */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

    /* Layout */
    --max-width: 75rem;                    /* widest the content gets (1200px) */
    --content-width: 64rem;                /* narrower column for reading-heavy sections */
    --gutter: clamp(1.25rem, 4vw, 2rem);   /* space at the screen edges */
    /* Side padding that lines full-width sections up with the nav */
    --page-inline: max(var(--gutter), (100% - var(--max-width)) / 2 + var(--gutter));

    /* Shared details */
    --radius-pill: 999px;                                  /* fully rounded ends */
    --shadow-soft: 0 10px 30px -12px rgba(36, 59, 83, 0.3); /* resting button shadow */
    --shadow-lift: 0 16px 34px -14px rgba(36, 59, 83, 0.4); /* bigger shadow on hover */
    --ease: 200ms ease;                                    /* standard animation speed */
}


/* ---------- 2. Base ---------- */

/* Width and height include padding and border, which makes sizing easier */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Whole-page settings */
html {
    /* Stops phones from enlarging text on their own when rotated */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Keeps in-page links (#about, #programs...) clear of the sticky header */
    scroll-padding-top: 6rem;
}

/* Page defaults: fonts, colors, and a column layout (header, main, footer) */
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;         /* fits around mobile browser toolbars */
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 1.125rem;        /* 18px: comfortable for readers of all ages */
    line-height: 1.65;
    color: var(--navy);
    background-color: var(--cream);
    overflow-wrap: break-word;  /* long words wrap instead of spilling out */
    /* Safety net: never allow sideways scrolling */
    overflow-x: clip;
}

/* Pushes the footer to the bottom on short pages */
main {
    flex: 1 0 auto;
}

/* Headings: serif font, tighter line spacing, evenly balanced lines */
h1,
h2,
h3 {
    margin: 0 0 0.75em;
    font-family: var(--font-heading);
    line-height: 1.15;
    color: var(--navy);
    text-wrap: balance;
}

/* Paragraphs: avoids a single word left alone on the last line */
p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

/* Links use the surrounding text color; underlines sit a little lower */
a {
    color: inherit;
    text-underline-offset: 0.2em;
}

/* Images and media never grow wider than their container */
img,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Highlight color when text is selected */
::selection {
    background-color: var(--coral-light);
    color: var(--navy);
}

/* Clear focus ring for keyboard users */
:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}


/* ---------- 3. Navigation bar ---------- */

/* Header bar that stays at the top of the screen while scrolling */
header {
    position: sticky;
    top: 0;
    z-index: 10;                    /* stays above the page content */
    background-color: var(--white); /* solid white so the logo's white background blends in */
    border-bottom: 1px solid rgba(36, 59, 83, 0.08);
    box-shadow: 0 6px 20px -18px rgba(36, 59, 83, 0.5);
}

/* Logo on the left, menu on the right, centered on wide screens */
nav {
    display: flex;
    flex-wrap: wrap;                /* wraps instead of overflowing if space runs out */
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    max-width: var(--max-width);
    margin-inline: auto;
    padding: 0.875rem var(--gutter);
}

/* Logo + organization name */
nav > a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;                   /* space between the logo and the name */
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--navy);
    text-decoration: none;
    text-wrap: balance; /* even line breaks if the name wraps on tiny screens */
}

/* Logo emblem (width follows the image's proportions) */
nav > a img {
    flex-shrink: 0;                 /* never squeezed by a long name */
    width: auto;
    height: 3.5rem;
}

/* Menu list: links in a row, bullets removed */
nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Menu links (padding gives each one a large, easy-to-click area) */
nav ul a {
    display: inline-block;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--navy);
    text-decoration: none;
    /* Coral underline that grows in on hover */
    background-image: linear-gradient(var(--coral), var(--coral));
    background-repeat: no-repeat;
    background-position: 50% calc(100% - 0.35rem);
    background-size: 0 2px;         /* starts at zero width (hidden) */
    transition: background-size var(--ease);
}

/* Hover: the underline grows to the width of the text */
nav ul a:hover {
    background-size: calc(100% - 1.75rem) 2px;
}

/* Donate: the main call to action */
nav a[href="#donate"] {
    margin-left: 0.5rem;                    /* a little extra space before the button */
    padding: calc(0.625rem - 2px) 1.375rem; /* minus the border, so it matches the other links' height */
    border: 2px solid transparent; /* keeps a visible edge in high-contrast mode */
    background: var(--coral);
    font-weight: 700;
    color: var(--navy);
    box-shadow: var(--shadow-soft);
    transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

/* Donate hover: lighter coral and a slight lift */
nav a[href="#donate"]:hover {
    background-color: var(--coral-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
}

/* Language switcher (EN / ES): a small outlined pill with two buttons */
.lang-switch {
    display: inline-flex;
    gap: 0.125rem;
    margin-left: 0.5rem;            /* a little space after the Donate button */
    padding: 0.2rem;
    border: 1px solid rgba(36, 59, 83, 0.2);
    border-radius: var(--radius-pill);
}

/* Each language button */
.lang-switch button {
    padding: 0.4rem 0.7rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    font: inherit;                  /* buttons don't use the page font by default */
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--navy-soft);
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease);
}

/* Hover on a language button: light blue-gray background */
.lang-switch button:hover {
    background-color: var(--navy-tint);
    color: var(--navy);
}

/* The language currently showing: navy pill with white text */
.lang-switch button[aria-pressed="true"] {
    background-color: var(--navy);
    color: var(--white);
}


/* ---------- 4. Hero ---------- */

/* Two columns: text on the left, illustration on the right.
   The empty 1fr rows above and below keep the text vertically centered. */
#home {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas:
        ".       art"
        "heading art"
        "text    art"
        "action  art"
        ".       art";
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: var(--page-inline);
    /* Soft coral glow behind the illustration area */
    background:
        radial-gradient(38rem 30rem at 82% 40%, rgba(233, 161, 139, 0.22), transparent 70%),
        var(--cream);
}

/* Main heading; the size grows and shrinks with the screen width */
#home > h1 {
    grid-area: heading;
    margin-bottom: 1.5rem;
    font-size: clamp(2.25rem, 1.5rem + 4vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* Short coral accent above the heading */
#home > h1::before {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.3rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-pill);
    background-color: var(--coral);
}

/* Mission statement; max-width keeps lines short and easy to read */
#home > p {
    grid-area: text;
    max-width: 36ch;
    margin-bottom: 2.25rem;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.375rem);
    line-height: 1.6;
    color: var(--navy-soft);
}

/* "Learn More" button */
#home > a {
    grid-area: action;
    justify-self: start;            /* only as wide as its text */
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;                  /* space between the text and the arrow */
    padding: 0.875rem 1.75rem;
    border: 2px solid transparent; /* keeps a visible edge in high-contrast mode */
    border-radius: var(--radius-pill);
    background-color: var(--navy);
    color: var(--white);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

/* Decorative arrow, hidden from screen readers */
#home > a::after {
    content: "→";       /* fallback for older browsers */
    content: "→" / "";  /* the empty text after "/" tells screen readers to skip it */
    transition: transform var(--ease);
}

/* Button hover: darker navy and a slight lift */
#home > a:hover {
    background-color: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

/* The arrow nudges right on hover */
#home > a:hover::after {
    transform: translateX(3px);
}

/* Hero illustration: sits in the "art" area on the right */
.hero-illustration {
    grid-area: art;
    align-self: center;             /* vertically centered next to the text */
    justify-self: end;              /* lines up with the right edge of the page content */
    width: 100%;                    /* fills its column... */
    max-width: 32rem;               /* ...but never gets bigger than about 512px */
    height: auto;                   /* keeps the drawing's proportions */
}


/* ---------- 5. About Us (mission, vision & values) ---------- */

/* White band so it stands apart from the cream hero.
   Content sits in a narrower centered column for easier reading. */
#about {
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: max(var(--gutter), (100% - var(--content-width)) / 2);
    background-color: var(--white);
}

/* Even spacing between the blocks inside the section */
#about > * + * {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* Subheadings: Why We Exist, Mission, Vision, Our Values */
#about h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

/* Section title block, centered */
.section-intro {
    text-align: center;
}

/* Coral accent bar above the title (same style as the hero) */
.section-intro::before {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.3rem;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-pill);
    background-color: var(--coral);
}

/* "Mission, Vision & Values" */
.section-intro h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
}

/* Italic tagline under the title */
.section-subtitle {
    margin: 0;
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    font-style: italic;
    color: var(--navy-soft);
}

/* Why We Exist: a short, centered story */
.about-why {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

/* Larger italic serif text, like a quote */
.about-why p {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-style: italic;
    line-height: 1.6;
    color: var(--navy-soft);
}

/* Community photos: two side by side */
.about-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Each photo: same 4:3 shape, cropped to fill its frame, with rounded corners */
.about-photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;                  /* fills the frame without stretching */
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    background-color: var(--cream);     /* soft placeholder color while the photo loads */
}

/* Mission and Vision: two cards side by side */
.about-statements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Card: cream background with a colored bar on the left */
.statement {
    padding: clamp(1.75rem, 3vw, 2.5rem);
    border-left: 6px solid var(--coral);   /* coral bar for Mission */
    border-radius: 1rem;
    background-color: var(--cream);
}

/* Navy bar for Vision, so the two cards are easy to tell apart */
.statement-vision {
    border-left-color: var(--navy);
}

/* No extra space under the card text */
.statement p {
    margin: 0;
}

/* "Our Values" heading and intro line, centered */
.about-values > h3,
.values-intro {
    text-align: center;
}

/* Intro line: italic, softer color, space before the list */
.values-intro {
    margin-bottom: 2rem;
    font-style: italic;
    color: var(--navy-soft);
}

/* Values list: one row per value, with a small gap between rows */
.values-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

/* One row: the name on the left, its meaning on the right */
.value {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    border-radius: 1rem;
    overflow: hidden;           /* clips the colored name cell to the rounded corners */
    background-color: var(--cream);
}

/* Value name: bold, uppercase, centered in a colored cell */
.value dt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background-color: var(--navy-tint);
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

/* Value meaning */
.value dd {
    margin: 0;
    padding: 1.25rem 1.75rem;
}

/* Name cell colors rotate: light blue-gray (default above), coral, navy */

/* 2nd, 5th... values: coral */
.value:nth-child(3n + 2) dt {
    background-color: var(--coral);
}

/* 3rd, 6th... values: navy with white text */
.value:nth-child(3n) dt {
    background-color: var(--navy);
    color: var(--white);
}

/* Closing message: large italic serif, centered */
.closing-quote {
    max-width: 40rem;
    margin-inline: auto;
    margin-bottom: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    color: var(--navy);
}


/* ---------- 6. Programs (support groups) ---------- */

/* Cream band, alternating with the white About Us section above.
   Uses the same narrower centered column as About Us. */
#programs {
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: max(var(--gutter), (100% - var(--content-width)) / 2);
    background-color: var(--cream);
}

/* Short description under the section title (centered by .section-intro) */
.section-description {
    max-width: 40rem;
    margin: 1.25rem auto 0;
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    color: var(--navy-soft);
}

/* Support group cards: three side by side */
.support-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

/* One card: white, rounded, with a soft shadow */
.support-card {
    padding: clamp(1.75rem, 3vw, 2.25rem);
    border-radius: 1.25rem;
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

/* Round icon badge at the top of each card */
.support-icon {
    display: grid;
    place-items: center;            /* centers the icon inside the circle */
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background-color: var(--coral-tint);
    color: var(--navy);             /* icon lines use this color (stroke="currentColor") */
}

/* Icon size inside the badge */
.support-icon svg {
    width: 2.25rem;
    height: 2.25rem;
}

/* Coral fill for the heart and leaves inside the icons */
.icon-accent {
    fill: var(--coral);
}

/* Badge color for Older Adults: light blue-gray (Families keeps the coral default) */
.support-elders .support-icon {
    background-color: var(--navy-tint);
}

/* Badge color for Children & Young People: light sun yellow */
.support-youth .support-icon {
    background-color: var(--sun-tint);
}

/* Group name */
.support-card h3 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem);
}

/* Group description */
.support-card p {
    margin: 0;
    color: var(--navy-soft);
}


/* ---------- 7. Events ---------- */

/* Soft coral band: sits between the cream Programs section and the white
   Contact section, so it needs its own color to stand apart from both.
   Uses the same narrower centered column as the other sections. */
#events {
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: max(var(--gutter), (100% - var(--content-width)) / 2);
    background-color: var(--coral-tint);
}

/* "Coming soon" card: white, centered, rounded, with a soft shadow */
.events-card {
    max-width: 36rem;
    margin: clamp(2rem, 4vw, 3rem) auto 0;
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: 1.5rem;
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

/* Round badge holding the calendar icon */
.events-icon {
    display: grid;
    place-items: center;            /* centers the calendar inside the circle */
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background-color: var(--coral-tint);
    color: var(--navy);             /* calendar line color (stroke="currentColor") */
}

/* Calendar size inside the badge */
.events-icon svg {
    width: 2.25rem;
    height: 2.25rem;
}

/* "Events coming soon": large serif text */
.events-soon {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

/* Short note under it */
.events-text {
    max-width: 28rem;
    margin: 0 auto 1rem;
    color: var(--navy-soft);
}

/* Instagram link: bold with a thick coral underline */
.events-link {
    font-weight: 700;
    color: var(--navy);
    text-decoration-color: var(--coral);
    text-decoration-thickness: 2px;
}

/* Link hover: the underline turns navy */
.events-link:hover {
    text-decoration-color: var(--navy);
}


/* ---------- 8. Contact ---------- */

/* White band, alternating with the cream Programs section above.
   Uses the same narrower centered column as the other sections. */
#contact {
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: max(var(--gutter), (100% - var(--content-width)) / 2);
    background-color: var(--white);
}

/* Contact cards: two per row, bullets removed */
.contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 60rem;               /* wide enough for the email address to fit on one line on desktop */
    margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
    padding: 0;
    list-style: none;
}

/* One contact card: icon on the left, details on the right */
.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    background-color: var(--cream);
}

/* Round coral icon badge */
.contact-icon {
    display: grid;
    place-items: center;            /* centers the icon inside the circle */
    flex-shrink: 0;                 /* never squeezed by long text */
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background-color: var(--coral-tint);
    color: var(--navy);             /* icon lines use this color (stroke="currentColor") */
}

/* Icon size inside the badge */
.contact-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Text area next to the icon; min-width: 0 lets long text wrap */
.contact-text {
    min-width: 0;
}

/* Small uppercase label: "Email", "Instagram"... */
.contact-label {
    margin: 0 0 0.15rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy-soft);
}

/* The contact detail itself (a link, or plain text for the location) */
.contact-value {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    overflow-wrap: anywhere;        /* long email addresses wrap instead of overflowing */
}

/* Contact links: thick coral underline */
a.contact-value {
    text-decoration-color: var(--coral);
    text-decoration-thickness: 2px;
}

/* Link hover: the underline turns navy */
a.contact-value:hover {
    text-decoration-color: var(--navy);
}


/* ---------- 9. Donate (PayPal) ---------- */

/* Cream band, alternating with the white Contact section above.
   Uses the same narrower centered column as the other sections. */
#donate {
    padding-block: clamp(4rem, 9vw, 7rem);
    padding-inline: max(var(--gutter), (100% - var(--content-width)) / 2);
    background-color: var(--cream);
}

/* Main donation card: white, centered, with a coral stripe along the top */
.donate-card {
    max-width: 42rem;
    margin-inline: auto;
    padding: clamp(2rem, 5vw, 3.25rem);
    border-top: 6px solid var(--coral);
    border-radius: 1.5rem;
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

/* Round badge holding the heart icon */
.donate-icon {
    display: grid;
    place-items: center;            /* centers the heart inside the circle */
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background-color: var(--coral-tint);
    color: var(--navy);             /* heart outline color (stroke="currentColor") */
}

/* Heart size inside the badge */
.donate-icon svg {
    width: 2.25rem;
    height: 2.25rem;
}

/* "Support Our Mission" */
.donate-card h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
}

/* Short message under the title */
.donate-text {
    max-width: 34rem;
    margin: 0 auto 2rem;
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    color: var(--navy-soft);
}

/* Big "Donate with PayPal" button (coral, like the Donate button in the menu) */
.donate-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;                    /* space between the heart and the text */
    padding: 1rem 2.25rem;
    border: 2px solid transparent;  /* keeps a visible edge in high-contrast mode */
    border-radius: var(--radius-pill);
    background-color: var(--coral);
    color: var(--navy);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

/* Small heart inside the button */
.donate-button svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

/* Button hover: lighter coral and a slight lift */
.donate-button:hover {
    background-color: var(--coral-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

/* Small print under the button */
.donate-note {
    max-width: 30rem;
    margin: 1.25rem auto 0;
    font-size: 0.9rem;
    color: var(--navy-soft);
}

/* "Other Ways to Help" area below the card */
.help-ways {
    max-width: 42rem;
    margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
    text-align: center;
}

/* "Other Ways to Help" heading */
.help-ways h3 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.75rem);
}

/* The two ways to help, side by side, bullets removed */
.help-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* One small white card per way to help */
.help-item {
    padding: 1.5rem;
    border-radius: 1.25rem;
    background-color: var(--white);
}

/* Card title: "Volunteer", "Follow & Share" */
.help-item h4 {
    margin: 0 0 0.4rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--navy);
}

/* Card text */
.help-item p {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--navy-soft);
}

/* Card link: bold with a thick coral underline */
.help-item a {
    font-weight: 700;
    color: var(--navy);
    text-decoration-color: var(--coral);
    text-decoration-thickness: 2px;
}

/* Card link hover: the underline turns navy */
.help-item a:hover {
    text-decoration-color: var(--navy);
}


/* ---------- 10. Footer ---------- */

/* Navy band with white text */
footer {
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
    padding-inline: var(--page-inline);
    background-color: var(--navy);
    color: var(--white);
    font-size: 0.95rem;
    text-align: center;
}

/* Small coral accent line, echoing the hero */
footer::before {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-pill);
    background-color: var(--coral);
}

/* Copyright text */
footer p {
    margin: 0;
    letter-spacing: 0.01em;
}

/* Ready for future footer links */
footer a {
    color: var(--white);
    text-decoration-color: var(--coral);
}

/* Footer link hover: light coral */
footer a:hover {
    color: var(--coral-light);
}

/* Coral focus ring stays visible on navy */
footer :focus-visible {
    outline-color: var(--coral);
}


/* ---------- 11. Responsive: tablet (navigation at 1152px and below, layout at 992px and below) ---------- */

/* Navigation (1152px and below). The menu plus the EN / ES switcher needs about
   1,100px to fit on one row (a bit more in Spanish), so it stacks a little earlier
   than the rest of the page. */
@media (max-width: 72rem) {
    /* The header is taller here, so in-page links need more room */
    html {
        scroll-padding-top: 8rem;
    }

    /* Name on top, links centered underneath */
    nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Center the menu links */
    nav ul {
        justify-content: center;
    }

    /* No extra space needed once the links are centered */
    nav a[href="#donate"] {
        margin-left: 0;
    }

    /* Same for the language switcher */
    .lang-switch {
        margin-left: 0;
    }
}

/* Page layout (992px and below) */
@media (max-width: 62rem) {
    /* Hero stacks into one centered column, illustration last */
    #home {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "heading"
            "text"
            "action"
            "art";
        justify-items: center;
        text-align: center;
    }

    /* Center the coral accent bar above the heading */
    #home > h1::before {
        margin-inline: auto;
    }

    /* Center the "Learn More" button */
    #home > a {
        justify-self: center;
    }

    /* Illustration moves below the text, centered and a bit smaller */
    .hero-illustration {
        justify-self: center;
        max-width: 28rem;
        margin-top: 3rem;
    }

    /* Mission and Vision cards stack, kept to a comfortable reading width */
    .about-statements {
        grid-template-columns: minmax(0, 1fr);
        max-width: 46rem;
        margin-inline: auto;
    }

    /* Narrower name column for the values */
    .value {
        grid-template-columns: 11rem minmax(0, 1fr);
    }

    /* Support group cards stack, one per row, at a comfortable width */
    .support-groups {
        grid-template-columns: minmax(0, 1fr);
        max-width: 36rem;
        margin-inline: auto;
    }

    /* Contact cards stack too, so the email address has room for one line */
    .contact-list {
        grid-template-columns: minmax(0, 1fr);
        max-width: 36rem;
    }
}


/* ---------- 12. Responsive: mobile (640px and below) ---------- */

@media (max-width: 40rem) {
    /* The header no longer sticks, so in-page links need little room */
    html {
        scroll-padding-top: 1.5rem;
    }

    /* Slightly smaller body text for narrow screens */
    body {
        font-size: 1.0625rem;
    }

    /* A tall stacked header would cover too much of a small screen */
    header {
        position: static;
    }

    /* Slightly tighter header spacing */
    nav {
        padding-block: 1rem 0.75rem;
    }

    /* Smaller organization name */
    nav > a {
        font-size: 1.2rem;
    }

    /* Smaller logo */
    nav > a img {
        height: 3rem;
    }

    /* Less space between menu links so they fit in two rows */
    nav ul {
        gap: 0.125rem;
    }

    /* Slightly smaller menu links */
    nav ul a {
        padding-inline: 0.7rem;
        font-size: 0.975rem;
    }

    /* Slightly narrower Donate button */
    nav a[href="#donate"] {
        padding-inline: 1.125rem;
    }

    /* Full-width button is easier to tap */
    #home > a {
        justify-content: center;
        width: 100%;
        max-width: 20rem;
    }

    /* Less space above the illustration on small screens */
    .hero-illustration {
        margin-top: 2.25rem;
    }

    /* Photos stack, one per row, with a smaller gap */
    .about-photos {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    /* Values: name on top, meaning underneath */
    .value {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Value name becomes a left-aligned band across the top */
    .value dt {
        justify-content: flex-start;
        padding: 0.75rem 1.25rem;
        text-align: left;
    }

    /* Tighter padding around the meaning on small screens */
    .value dd {
        padding: 1rem 1.25rem 1.25rem;
    }

    /* A little less space between the contact cards */
    .contact-list {
        gap: 1rem;
    }

    /* Slightly tighter padding and icon gap inside each contact card,
       leaving more room for the email address */
    .contact-item {
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    /* Slightly smaller icon circle on phones */
    .contact-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    /* Slightly smaller contact details, so the email fits on common phones (360px+) */
    .contact-value {
        font-size: 1rem;
    }

    /* Donate button fills the card width, so it's easy to tap */
    .donate-button {
        justify-content: center;
        width: 100%;
        padding-inline: 1.5rem;
    }

    /* "Other ways to help" cards stack, one per row */
    .help-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Very small phones (352px and below) */
@media (max-width: 22rem) {
    /* Contact cards: icon above the text, so the email gets the card's full width */
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}


/* ---------- 13. Scroll animations ---------- */

/* How it works:
   - js/main.js adds the class "reveal" to sections and cards further down the page,
     which hides them slightly lower than normal.
   - When one scrolls into view, main.js adds "is-visible" and it glides up into place.
   - Items that appear at the same time (like cards in a row) get a small extra delay
     each (--reveal-delay), so they come in one after another.
   - Without JavaScript, or with "reduce motion" turned on, nothing is hidden.
   The hero (top of the page) animates with CSS alone, below. */

/* Starting point: invisible and 28px lower */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 700ms ease,
        transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);  /* fast start, gentle finish */
    transition-delay: var(--reveal-delay, 0ms);
}

/* Scrolled into view: fully visible, back in its normal place */
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Section titles: the coral accent bar grows out from the middle */
.section-intro.reveal::before {
    width: 0;
    transition: width 700ms ease;
    transition-delay: calc(var(--reveal-delay, 0ms) + 250ms);  /* after the title appears */
}

/* Section titles in view: the bar reaches its full width */
.section-intro.reveal.is-visible::before {
    width: 3.5rem;
}

/* Hero animations run only for visitors who haven't asked for less motion.
   "backwards" applies the starting look during the delay, then hands control back
   to the normal styles, so the button's hover lift still works afterwards. */
@media (prefers-reduced-motion: no-preference) {
    /* Heading, text and button rise in one after another */
    #home > h1,
    #home > p,
    #home > a {
        animation: rise-in 800ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    }

    /* Description comes in just after the heading */
    #home > p {
        animation-delay: 150ms;
    }

    /* Button comes in last */
    #home > a {
        animation-delay: 300ms;
    }

    /* Coral bar above the heading grows in */
    #home > h1::before {
        animation: grow-bar 700ms ease 400ms backwards;
    }

    /* Illustration fades in and settles from slightly smaller */
    .hero-illustration {
        animation: settle-in 1000ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms backwards;
    }
}

/* Rise in: from invisible and slightly lower to normal */
@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
}

/* Grow bar: from zero width to the bar's normal width */
@keyframes grow-bar {
    from {
        width: 0;
    }
}

/* Settle in: from invisible, slightly lower and smaller, to normal */
@keyframes settle-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
}


/* ---------- 14. Motion preferences ---------- */

/* Smooth scrolling only for visitors who haven't asked for less motion */
@media (prefers-reduced-motion: no-preference) {
    /* Menu links glide down the page instead of jumping */
    html {
        scroll-behavior: smooth;
    }
}

/* Visitors who turned on "reduce motion" in their settings: no animations */
@media (prefers-reduced-motion: reduce) {
    /* Makes every transition and animation finish instantly */
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    /* No lift or slide on hover */
    nav a[href="#donate"]:hover,
    #home > a:hover,
    #home > a:hover::after,
    .donate-button:hover {
        transform: none;
    }

    /* Safety net: scroll-animated items are always fully visible
       (main.js already skips the animations for these visitors) */
    .reveal {
        opacity: 1;
        transform: none;
    }
}
