/* ==========================================================================
   MyCarePal - base styles
   Design tokens, reset, typography, buttons, badges and utilities.
   The brand blues are sampled from the MyCarePal care worker logo.
   ========================================================================== */

:root {
    color-scheme: light;

    /* Brand */
    --blue-50: #f0f5fe;
    --blue-100: #dfe9fd;
    --blue-200: #c3d6fb;
    --blue-300: #97b9f5;
    --blue-400: #6a9af0;
    --blue-500: #508bed;
    --blue-600: #376cd7;
    --blue-700: #2957cc;
    --blue-800: #1f45a3;
    --blue-900: #183578;

    --navy-800: #16294d;
    --navy-900: #0f1f3d;
    --navy-950: #0a1630;

    --honey-100: #fdf6dc;
    --honey-200: #faebb5;
    --honey-300: #f5de8f;
    --honey-400: #eed472;

    --peach-50: #fdf5f1;
    --peach-100: #fbebe3;
    --peach-300: #edc7b6;
    --peach-500: #ce958b;

    --green-50: #e8f7ef;
    --green-500: #1f9d6b;
    --green-700: #12714c;
    --amber-50: #fff4d9;
    --amber-500: #e5a50a;
    --amber-700: #8a5700;
    --red-50: #fdeceb;
    --red-700: #b42318;

    /* Neutrals */
    --ink: #0f1d38;
    --text: #34425d;
    --muted: #5a6780;
    --line: #e3e8f0;
    --line-strong: #cdd6e4;
    --bg: #fbfaf7;
    --surface: #ffffff;
    --surface-soft: #f3f6fb;
    --surface-warm: #f8f3eb;

    /* Type. System fonts keep the site fast; to use a brand font, self-host it and change these two stacks. */
    --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --text-sm: 0.9375rem;
    --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1.07rem + 0.3vw, 1.3125rem);
    --text-xl: clamp(1.3rem, 1.18rem + 0.6vw, 1.625rem);
    --text-2xl: clamp(1.75rem, 1.45rem + 1.4vw, 2.625rem);
    --text-3xl: clamp(2.3rem, 1.7rem + 2.8vw, 3.9rem);

    /* Shape and depth */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 2px rgb(15 31 61 / 0.06), 0 2px 6px rgb(15 31 61 / 0.04);
    --shadow: 0 2px 4px rgb(15 31 61 / 0.04), 0 12px 32px -8px rgb(15 31 61 / 0.12);
    --shadow-lg: 0 30px 70px -20px rgb(24 53 120 / 0.3), 0 8px 20px -8px rgb(15 31 61 / 0.12);

    /* Layout */
    --container: 1200px;
    --gutter: clamp(1.125rem, 4vw, 2rem);
    --header-height: 72px;
    --section-space: clamp(4.5rem, 9vw, 7.5rem);
}

/* Reset ------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

main:focus {
    outline: none;
}

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

img {
    height: auto;
}

/* Typography -------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

h2 {
    font-size: var(--text-2xl);
    font-weight: 750;
    letter-spacing: -0.03em;
}

h3 {
    font-size: var(--text-lg);
    font-weight: 650;
    letter-spacing: -0.015em;
}

h4 {
    font-size: var(--text-base);
    font-weight: 650;
}

p,
ul,
ol,
dl {
    margin: 0 0 1em;
}

p {
    text-wrap: pretty;
}

strong,
b {
    font-weight: 650;
}

a {
    color: var(--blue-700);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--blue-900);
}

:focus-visible {
    outline: 3px solid var(--blue-500);
    outline-offset: 3px;
}

::selection {
    background: var(--honey-300);
    color: var(--ink);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-700);
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.55;
}

.eyebrow--light {
    color: var(--honey-300);
}

.lead {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--muted);
}

.highlight {
    padding-inline: 0.06em;
    background: linear-gradient(transparent 62%, var(--honey-300) 62% 92%, transparent 92%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Accessibility helpers ---------------------------------------------------- */

.skip-link {
    position: absolute;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    color: #fff;
    transform: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Layout primitives --------------------------------------------------------- */

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.container--narrow {
    --container: 820px;
}

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

/* Icons --------------------------------------------------------------------- */

.icon {
    display: inline-block;
    flex: none;
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.25em;
}

/* Buttons ------------------------------------------------------------------- */

.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--ink);
    --btn-border: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.375rem;
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    color: var(--btn-fg);
    transform: translateY(-1px);
}

.btn:active {
    transform: none;
}

.btn .icon {
    width: 1.125em;
    height: 1.125em;
}

.btn--primary {
    --btn-bg: var(--blue-700);
    --btn-fg: #fff;
    --btn-border: var(--blue-700);
    box-shadow: 0 10px 24px -10px rgb(41 87 204 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.btn--primary:hover {
    --btn-bg: var(--blue-800);
    --btn-border: var(--blue-800);
}

.btn--secondary:hover {
    --btn-fg: var(--blue-800);
    --btn-border: var(--blue-300);
    box-shadow: var(--shadow-sm);
}

.btn--white {
    --btn-bg: #fff;
    --btn-fg: var(--blue-800);
    --btn-border: #fff;
}

.btn--white:hover {
    --btn-bg: var(--blue-50);
}

.btn--ghost-light {
    --btn-bg: transparent;
    --btn-fg: #fff;
    --btn-border: rgb(255 255 255 / 0.45);
}

.btn--ghost-light:hover {
    --btn-bg: rgb(255 255 255 / 0.12);
    --btn-border: #fff;
}

.btn--sm {
    min-height: 2.5rem;
    padding: 0.5rem 1.05rem;
    font-size: 0.9375rem;
}

.btn--lg {
    min-height: 3.5rem;
    padding: 0.95rem 1.75rem;
    font-size: 1.0625rem;
}

.btn--block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 650;
    text-decoration: none;
}

.text-link .icon {
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.2s ease;
}

.text-link:hover .icon {
    transform: translateX(3px);
}

/* Badges and lists ----------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-800);
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.4;
}

.badge--green {
    background: var(--green-50);
    color: var(--green-700);
}

.check-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 2.25rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    top: 0.15em;
    left: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312714c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
}

.check-list strong {
    color: var(--ink);
}

/* Scroll reveal --------------------------------------------------------------
   Pure CSS scroll-driven animation. Browsers without support, and people who
   prefer reduced motion, simply see the content without the effect. Keep it off
   content near the very bottom of a page, which may never scroll far enough in. */

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .reveal {
            animation: reveal-up linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 25%;
        }
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}
