/* =========================================================
   SE Pampered Homes – theme, layout and motion
   Brand colours taken from the original site and logo.
   ========================================================= */

:root {
    /* iPhone notch / Dynamic Island / home indicator clearance (0 everywhere else). */
    --safe-b: env(safe-area-inset-bottom, 0px);
    --edge: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --green-900: #003C31;
    --green-700: #496E5C;
    --sage: #85987D;
    --sage-300: #AAB194;
    --sage-100: #DCE2D3;
    --cream: #FAF2E9;
    --blush: #EBBDAC;
    --blush-300: #F6DDD2;
    --blush-600: #D48F78;
    --white: #FFFDFA;
    --ink: #22392F;
    --ink-soft: #4C6357;

    --font-display: 'Julius Sans One', 'Segoe UI', sans-serif;
    --font-serif: 'Noto Serif Display', Georgia, serif;

    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.76, 0, .24, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    --radius: 24px;
    --header-h: 84px;
    /* Hero animations wait for the intro curtain; repeat visits skip it. */
    --intro: 1.7s;
}

html.intro-seen { --intro: 0s; }

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

html {
    /* Header green behind the page, so rubber-band scrolling never flashes a different colour. */
    background: var(--green-700);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.75;
    letter-spacing: .02em;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; letter-spacing: .04em; }
p { margin: 0; }
section[id] { scroll-margin-top: 60px; }

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

:focus-visible { outline: 3px solid var(--blush-600); outline-offset: 3px; border-radius: 6px; }

.skip-link {
    position: fixed; top: 10px; left: 10px; z-index: 300;
    padding: .7em 1.2em; border-radius: 999px;
    background: var(--cream); color: var(--green-900); text-decoration: none;
    transform: translateY(-150%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

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

.btn {
    --bg: var(--green-700);
    --fg: #fff;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7em;
    padding: 1.05em 1.9em;
    border: 0;
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    font-size: .88rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out), background-color .35s, color .35s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; transition: transform .45s var(--ease-spring); }
.btn:hover { transform: translateY(-3px); }
.btn:hover svg { transform: translateX(5px); }
.btn:active { transform: translateY(0) scale(.97); }

.btn--primary { box-shadow: 0 14px 30px -14px rgba(0, 60, 49, .7); }
.btn--primary:hover { --bg: var(--green-900); box-shadow: 0 22px 40px -16px rgba(0, 60, 49, .8); }
.btn--primary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: shimmer 4.5s var(--ease-in-out) infinite;
    animation-delay: calc(var(--intro) + 2s);
}

.btn--ghost { --bg: transparent; --fg: var(--green-700); box-shadow: inset 0 0 0 1.5px var(--sage); }
.btn--ghost:hover { --bg: var(--sage-100); }

.btn--blush { --bg: var(--blush); --fg: var(--green-900); }
.btn--blush:hover { --bg: var(--cream); }

.btn--sm { padding: .8em 1.4em; font-size: .76rem; }

/* Sparkle burst on click (created by site.js) */
.spark {
    position: fixed;
    z-index: 200;
    width: 10px;
    height: 10px;
    pointer-events: none;
    background: var(--c, var(--blush));
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- Scroll progress + header ---------- */

.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    height: 3px;
    background: linear-gradient(90deg, var(--blush), var(--sage-300));
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: var(--green-700);
    color: var(--cream);
    transition: background-color .4s, box-shadow .4s;
    /* "backwards", not "both": a lingering transform would trap the fixed mobile menu inside the header */
    animation: header-in 1s var(--ease-out) backwards;
    animation-delay: calc(var(--intro) - .3s);
}
.site-header.is-scrolled {
    background: rgba(73, 110, 92, .9);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 10px 30px -14px rgba(0, 40, 30, .5);
}
/* backdrop-filter would trap the fixed mobile menu inside the header */
.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    transition: height .45s var(--ease-out);
}
.is-scrolled .site-header__inner { height: 66px; }

.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(250, 242, 233, .22);
    transition: width .45s var(--ease-out), height .45s var(--ease-out), transform .8s var(--ease-spring);
}
.brand:hover .brand__logo { transform: rotate(-14deg) scale(1.06); }
.is-scrolled .brand__logo { width: 46px; height: 46px; }
.brand__name { font-size: 1.02rem; letter-spacing: .14em; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav ul { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.site-nav ul a {
    position: relative;
    padding: 6px 0;
    font-size: .82rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
}
.site-nav ul a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: var(--blush);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .45s var(--ease-out);
}
.site-nav ul a:hover::after,
.site-nav ul a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; }

@keyframes header-in {
    from { transform: translateY(-100%); }
    to { transform: none; }
}

/* ---------- Intro curtain ---------- */

.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: var(--green-700);
    animation: intro-out 1s var(--ease-in-out) 1.3s forwards;
}
.intro::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    top: 100%;
    height: 140px;
    background: inherit;
    border-radius: 0 0 50% 50%;
}
.intro__inner {
    position: relative;
    width: min(230px, 56vw);
    aspect-ratio: 1;
    animation: intro-inner-out .6s var(--ease-in-out) 1.2s forwards;
}
.intro__logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    animation: intro-logo 1.1s var(--ease-out) both;
}
.intro__ring {
    position: absolute;
    inset: -16px;
    width: calc(100% + 32px);
    max-width: none; /* the ring is deliberately larger than the logo it surrounds */
    height: calc(100% + 32px);
    transform: rotate(-90deg);
}
.intro__ring circle {
    fill: none;
    stroke: var(--blush);
    stroke-width: .9;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.1s var(--ease-in-out) .1s forwards;
}
html.intro-seen .intro { display: none; }

/* Shown while the app downloads; Blazor swaps it for the page (and the intro curtain above). */
.app-loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--green-700);
}
.app-loading__ring {
    width: calc(min(230px, 56vw) + 32px);
    aspect-ratio: 1;
    border: 2px solid rgba(235, 189, 172, .25);
    border-top-color: var(--blush);
    border-radius: 50%;
    animation: spin 1.1s linear infinite;
}

@keyframes intro-logo {
    from { opacity: 0; transform: scale(.7) rotate(-25deg); }
    to { opacity: 1; transform: none; }
}
@keyframes intro-inner-out {
    to { opacity: 0; transform: translateY(-40px) scale(.9); }
}
@keyframes intro-out {
    99% { visibility: visible; }
    to { transform: translateY(calc(-100% - 150px)); visibility: hidden; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100svh;
    padding: calc(var(--header-h) + 48px) 0 180px;
    overflow: hidden;
    background:
        radial-gradient(1100px 600px at 88% 18%, var(--blush-300), transparent 62%),
        var(--cream);
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }

.blob {
    position: absolute;
    border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
    opacity: .7;
    translate: 0 var(--py, 0px);
    animation: morph 16s ease-in-out infinite alternate;
}
.blob--sage {
    width: 560px;
    height: 560px;
    left: -200px;
    top: 14%;
    background: radial-gradient(circle at 35% 35%, var(--sage-100), transparent 70%);
}
.blob--blush {
    width: 440px;
    height: 440px;
    right: 6%;
    bottom: 4%;
    background: radial-gradient(circle at 60% 40%, var(--blush-300), transparent 70%);
    animation-duration: 21s;
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: clamp(24px, 5vw, 72px);
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7em;
    margin-bottom: 26px;
    padding: .55em 1.2em;
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    box-shadow: inset 0 0 0 1px var(--sage-100);
    color: var(--green-700);
    font-size: .76rem;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.hero__eyebrow svg { width: 14px; height: 14px; color: var(--blush-600); animation: spin 7s linear infinite; }

.hero__title {
    margin-bottom: 28px;
    color: var(--green-900);
    font-size: clamp(2.3rem, 5.3vw, 4.5rem);
    line-height: 1.1;
}

/* Each word rises out of its own mask */
.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: .08em .04em .16em;
    margin: -.08em 0 -.16em -.04em;
}
.word > span {
    position: relative;
    display: inline-block;
    transform: translateY(115%) rotate(5deg);
    transform-origin: 0 100%;
    animation: word-up 1s var(--ease-out) forwards;
    animation-delay: calc(var(--intro) + .15s + var(--i) * 85ms);
}
.word--em { padding-bottom: .42em; margin-bottom: -.42em; }
.hero__title em {
    color: var(--green-700);
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: 0;
}
.swash {
    position: absolute;
    left: -3%;
    bottom: -.22em;
    width: 106%;
    max-width: none;
    height: .34em;
    overflow: visible;
}
.swash path {
    fill: none;
    stroke: var(--blush);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    vector-effect: non-scaling-stroke;
    animation: draw 1.2s var(--ease-out) forwards;
    animation-delay: calc(var(--intro) + 1.1s);
}

.hero__text {
    max-width: 560px;
    margin-bottom: 38px;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.25vw, 1.12rem);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.anim-in {
    opacity: 0;
    animation: fade-up 1.1s var(--ease-out) forwards;
    animation-delay: calc(var(--intro) + .15s + var(--i) * 85ms);
}

.hero__art { position: relative; justify-self: center; width: min(100%, 470px); }
.anim-in--art { animation-name: art-in; animation-duration: 1.5s; }
.hero__halo {
    position: absolute;
    inset: 6% 2% 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 68%);
    animation: halo 6s ease-in-out infinite;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 128px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1.5px var(--sage);
    opacity: 0;
    animation: fade-in 1s ease forwards;
    animation-delay: calc(var(--intro) + 1.6s);
}
.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--green-700);
    animation: scroll-dot 1.8s var(--ease-in-out) infinite;
}

/* Rolling waves into the marquee */
.hero__waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 110px;
    overflow: hidden;
    pointer-events: none;
}
/* max-width: none overrides the global svg cap – the wave must be twice the screen width to loop */
.wave { position: absolute; left: 0; bottom: 0; width: 200%; max-width: none; height: 100%; animation: wave 14s linear infinite; }
.wave--front path { fill: var(--sage); }
.wave--back { height: 120%; opacity: .45; animation-duration: 22s; animation-direction: reverse; }
.wave--back path { fill: var(--sage-300); }

/* ---------- Animated bottle illustration ---------- */

.bottle-art { position: relative; width: 100%; height: auto; overflow: visible; }

.bottle-art__float {
    transform-box: fill-box;
    transform-origin: 50% 90%;
    animation: float 6s ease-in-out infinite;
}
.bottle-art__shadow {
    fill: var(--green-700);
    opacity: .14;
    transform-box: fill-box;
    transform-origin: center;
    animation: float-shadow 6s ease-in-out infinite;
}

.leaf { animation: sway 5s ease-in-out infinite; }
.leaf--2 { animation-duration: 6s; animation-delay: -1.5s; }
.leaf--3 { animation-duration: 5.5s; animation-delay: -3s; }
.leaf--4 { animation-duration: 6.5s; animation-delay: -.8s; }

.sparkle {
    transform-box: fill-box;
    transform-origin: center;
    animation: twinkle 3.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * -.55s);
}

.bottle-art__trigger {
    transform-origin: 255px 62px;
    animation: squeeze 4.5s var(--ease-out) infinite;
    animation-delay: calc(var(--intro) + 1.48s);
}
.bottle-art__mist circle {
    fill: #fff;
    stroke: var(--sage-300);
    stroke-width: 1;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: mist 4.5s var(--ease-out) infinite;
    animation-delay: calc(var(--intro) + 1.6s + var(--i) * 30ms);
}

/* ---------- Marquee ---------- */

.marquee { position: relative; overflow: hidden; padding: 20px 0 24px; background: var(--sage); color: var(--cream); }
.marquee__track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; }
.marquee__item {
    display: flex;
    align-items: center;
    gap: 36px;
    padding-right: 36px;
    font-size: clamp(1.15rem, 2.2vw, 1.85rem);
    letter-spacing: .1em;
    white-space: nowrap;
}
.marquee__item svg { width: 22px; height: 22px; color: var(--blush); animation: spin 9s linear infinite; }

/* ---------- Shared section bits ---------- */

.section { position: relative; padding: clamp(84px, 11vw, 150px) 0; }

.section-head { max-width: 760px; margin: 0 auto clamp(48px, 6vw, 80px); text-align: center; }
.section-head--left { margin: 0 0 24px; text-align: left; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .9em;
    margin-bottom: 14px;
    color: var(--sage);
    font-size: .76rem;
    letter-spacing: .3em;
    text-transform: uppercase;
}
.eyebrow::before,
.eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-head--left .eyebrow::after { display: none; }

.section-title { color: var(--green-900); font-size: clamp(2rem, 4.4vw, 3.3rem); }

/* Scroll reveals – only hide things when JS is there to show them again */
html.js [data-reveal] {
    opacity: 0;
    transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
    transition-delay: var(--d, 0ms);
}
html.js [data-reveal="up"] { transform: translateY(44px); }
html.js [data-reveal="zoom"] { transform: scale(.92); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Services ---------- */

.services { background: var(--cream); }

.services__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 40px; padding-left: 12px; }
.services__item { flex: 1 1 300px; max-width: 350px; }

.service-card {
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: 100%;
    padding: 46px 32px 40px;
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
    box-shadow: -12px 12px 0 var(--green-700);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
    transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.service-card:hover { --lift: -8px; box-shadow: -18px 18px 0 var(--green-700); }

/* Soft blush glow that follows the pointer */
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--blush-300), transparent 50%);
    opacity: 0;
    transition: opacity .5s;
}
.service-card:hover::before { opacity: 1; }

.service-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--sage), var(--blush));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .7s var(--ease-out);
}
.service-card:hover::after { transform: scaleX(1); }

.service-card__num { position: absolute; top: 18px; right: 24px; color: var(--sage-300); font-size: .78rem; letter-spacing: .2em; }

.service-card__icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--green-700);
    transition: transform .7s var(--ease-spring), background-color .4s;
}
.service-card__icon svg { width: 42px; height: 42px; }
.service-card:hover .service-card__icon { transform: rotate(-10deg) scale(1.08); background: var(--blush-300); }

.service-card h3 { margin-bottom: 14px; color: var(--green-900); font-size: 1.28rem; }
.service-card p { color: var(--ink-soft); font-size: .97rem; }

.icon-draw * {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.6s var(--ease-out);
    transition-delay: calc(var(--d, 0ms) + 350ms);
}
.is-visible .icon-draw *,
html:not(.js) .icon-draw * { stroke-dashoffset: 0; }

/* ---------- Testimonials ---------- */

.testimonials { overflow: hidden; background: var(--green-700); color: var(--cream); }
.testimonials .section-title { color: var(--cream); }
.testimonials .eyebrow { color: var(--blush); }

.testimonials__mark {
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50% var(--py, 0px);
    color: rgba(250, 242, 233, .06);
    font-family: var(--font-serif);
    font-size: clamp(16rem, 34vw, 30rem);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.testi { position: relative; max-width: 860px; margin: 0 auto; text-align: center; }
.testi__slides { display: grid; }
.testi__slide {
    grid-area: 1 / 1;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(26px) scale(.98);
    filter: blur(8px);
    transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), filter .7s var(--ease-out), visibility 0s .9s;
}
.testi__slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    filter: none;
    transition-delay: .2s, .2s, .2s, 0s;
}
.testi__slide blockquote {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3.1vw, 2.3rem);
    font-style: italic;
    line-height: 1.45;
    letter-spacing: 0;
}
.testi__slide figcaption {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    color: var(--blush);
    font-size: .9rem;
    letter-spacing: .3em;
    text-transform: uppercase;
}
.testi__slide figcaption::before { content: ""; width: 36px; height: 1px; background: currentColor; }

.testi__controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 48px; }
.testi__btn {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(250, 242, 233, .35);
    color: var(--cream);
    cursor: pointer;
    transition: background-color .3s, color .3s, transform .45s var(--ease-spring);
}
.testi__btn:hover { background: var(--cream); color: var(--green-700); transform: scale(1.08); }
.testi__btn svg { width: 20px; height: 20px; }

.testi__dots { display: flex; gap: 6px; }
.testi__dot { display: grid; align-items: center; width: 46px; height: 28px; padding: 0 4px; border: 0; background: none; cursor: pointer; }
.testi__track { position: relative; height: 4px; overflow: hidden; border-radius: 4px; background: rgba(250, 242, 233, .25); }
.testi__fill { position: absolute; inset: 0; background: var(--blush); transform: scaleX(0); transform-origin: left; }
.testi__dot.is-active .testi__fill { animation: progress var(--interval, 7000ms) linear forwards; }
html:not(.js) .testi__dot.is-active .testi__fill { transform: scaleX(1); animation: none; }
.testi.is-paused .testi__fill { animation-play-state: paused; }

/* ---------- Team ---------- */

.team { overflow: hidden; background: var(--cream); }
.team__grid { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: clamp(32px, 6vw, 90px); }

.team__art svg { width: 100%; height: auto; overflow: visible; }
.friend { transition: transform 1.5s var(--ease-out) .15s; }
.friend__shape { transform-box: fill-box; transform-origin: center; animation: breathe 7s ease-in-out infinite; }
.friend--a .friend__shape { fill: var(--sage); opacity: .9; }
.friend--b .friend__shape { fill: var(--blush); opacity: .85; mix-blend-mode: multiply; animation-delay: -3.5s; }
html.js .friend--a { transform: translateX(-56px); }
html.js .friend--b { transform: translateX(56px); }
html.js .is-visible .friend { transform: none; }

.team__heart path {
    fill: var(--green-700);
    transform-box: fill-box;
    transform-origin: center;
    animation: beat 2.6s ease-in-out infinite 2.8s;
}
.team__heart > path { scale: 1; transition: scale 1s var(--ease-spring) 1.25s; }
html.js .team__art:not(.is-visible) .team__heart > path { scale: 0; }
.team__art .sparkle path { fill: var(--blush-600); }

.team__text { margin-bottom: 30px; color: var(--ink-soft); font-size: 1.08rem; }

.chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    padding: .6em 1.2em;
    border-radius: 999px;
    background: var(--white);
    box-shadow: inset 0 0 0 1px var(--sage-100), 0 8px 18px -12px rgba(0, 60, 49, .45);
    color: var(--green-700);
    font-size: .84rem;
    letter-spacing: .08em;
    transition: transform .45s var(--ease-spring), background-color .3s, color .3s;
}
.chip:hover { transform: translateY(-4px) rotate(-2deg); background: var(--green-700); color: var(--cream); }
.chips svg { width: 13px; height: 13px; color: var(--blush-600); }

/* ---------- Contact ---------- */

.contact {
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 50% 0%, rgba(235, 189, 172, .2), transparent 60%),
        linear-gradient(180deg, var(--green-700), var(--green-900));
    color: var(--cream);
    text-align: center;
}
.contact .section-title { color: var(--cream); }
.contact .eyebrow { color: var(--blush); }
.contact__lede { max-width: 560px; margin: 18px auto 0; color: rgba(250, 242, 233, .82); }

.contact__cards { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.contact__cards > * { flex: 0 1 410px; }
.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
    padding: 22px 30px 22px 22px;
    border-radius: 22px;
    background: rgba(250, 242, 233, .07);
    box-shadow: inset 0 0 0 1px rgba(250, 242, 233, .2);
    color: var(--cream);
    text-align: left;
    text-decoration: none;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: transform .5s var(--ease-spring), background-color .35s, color .35s, box-shadow .35s;
}
.contact-card:hover { transform: translateY(-6px); background: var(--cream); color: var(--green-900); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6); }
.contact-card__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--green-900);
}
.contact-card__icon svg { width: 24px; height: 24px; }
.contact-card:hover .contact-card__icon svg { animation: wiggle .6s ease-in-out; }
.contact-card small { display: block; opacity: .75; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; }
.contact-card strong { font-weight: 400; font-size: 1.08rem; letter-spacing: .02em; }

/* ---------- Bubbles ---------- */

.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bubble {
    position: absolute;
    bottom: -80px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .9) 0 5%, rgba(255, 255, 255, .12) 14%, transparent 60%, rgba(170, 177, 148, .14) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset -3px -4px 8px rgba(133, 152, 125, .12);
    opacity: 0;
    animation: rise var(--t) linear infinite;
    animation-delay: var(--delay);
}

/* ---------- Footer ---------- */

.site-footer { padding: 26px 0 calc(26px + var(--safe-b)); background: var(--green-900); color: rgba(250, 242, 233, .75); font-size: .8rem; letter-spacing: .1em; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.to-top {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(250, 242, 233, .3);
    color: var(--cream);
    transition: transform .45s var(--ease-spring), background-color .3s, color .3s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { transform: translateY(-4px); background: var(--blush); color: var(--green-900); }

/* ---------- 404 ---------- */

.not-found { padding-top: calc(var(--header-h) + 100px); min-height: 80vh; }
.not-found__text { margin: 18px 0 34px; color: var(--ink-soft); }

/* ---------- Keyframes ---------- */

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}
@keyframes word-up { to { transform: none; } }
@keyframes art-in {
    from { opacity: 0; transform: translateY(50px) scale(.9) rotate(-5deg); }
    to { opacity: 1; transform: none; }
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    35%, 100% { transform: translateX(100%); }
}
@keyframes morph {
    0% { border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%; transform: rotate(0) scale(1); }
    50% { border-radius: 63% 37% 41% 59% / 58% 52% 48% 42%; transform: rotate(18deg) scale(1.07); }
    100% { border-radius: 38% 62% 55% 45% / 40% 60% 40% 60%; transform: rotate(-10deg) scale(.95); }
}
@keyframes halo {
    0%, 100% { transform: scale(1); opacity: .9; }
    50% { transform: scale(1.06); opacity: 1; }
}
@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(16px); opacity: 0; }
}
@keyframes wave { to { transform: translateX(-50%); } }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-14px) rotate(-1.5deg); }
}
@keyframes float-shadow {
    0%, 100% { transform: scaleX(1); opacity: .14; }
    50% { transform: scaleX(.82); opacity: .08; }
}
@keyframes sway {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(5deg); }
}
@keyframes twinkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
    50% { transform: scale(.5) rotate(45deg); opacity: .4; }
}
@keyframes squeeze {
    0%, 12%, 100% { transform: rotate(0); }
    3% { transform: rotate(12deg); }
}
@keyframes mist {
    0% { opacity: 0; transform: translate(0, 0) scale(.3); }
    4% { opacity: .95; }
    26%, 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.7); }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
@keyframes beat {
    0%, 40%, 100% { transform: scale(1); }
    10% { transform: scale(1.18); }
    20% { transform: scale(1); }
    30% { transform: scale(1.1); }
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-14deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-6deg); }
}
@keyframes rise {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    10% { opacity: .9; }
    50% { transform: translate(var(--sway), -55vh) scale(1); }
    90% { opacity: .7; }
    100% { opacity: 0; transform: translate(0, -115vh) scale(1.1); }
}

/* ---------- Responsive ---------- */

/* 980px rather than 900px so landscape phones (up to 932px wide) keep the phone layout and menu. */
@media (max-width: 980px) {
    .nav-toggle {
        position: relative;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 50%;
        background: rgba(250, 242, 233, .12);
        cursor: pointer;
    }
    .nav-toggle span {
        position: absolute;
        width: 20px;
        height: 1.5px;
        border-radius: 2px;
        background: var(--cream);
        transition: transform .45s var(--ease-out), opacity .3s;
    }
    .nav-toggle span:nth-child(1) { transform: translateY(-6px); }
    .nav-toggle span:nth-child(3) { transform: translateY(6px); }
    .nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
    .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg); }

    .site-nav {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        gap: 44px;
        background: var(--green-700);
        visibility: hidden;
        clip-path: circle(0 at calc(100% - var(--edge) - 23px) 42px);
        transition: clip-path .7s var(--ease-in-out), visibility 0s .7s;
    }
    .nav-open .site-nav {
        visibility: visible;
        clip-path: circle(150% at calc(100% - var(--edge) - 23px) 42px);
        transition: clip-path .7s var(--ease-in-out), visibility 0s;
    }
    .site-nav ul { flex-direction: column; align-items: center; gap: 22px; }
    .site-nav ul a { font-size: 1.5rem; }
    .site-nav li,
    .site-nav .btn { opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .6s var(--ease-out); }
    .nav-open .site-nav li,
    .nav-open .site-nav .btn { opacity: 1; transform: none; transition-delay: calc(.25s + var(--n) * 70ms); }

    .hero { min-height: auto; padding: calc(var(--header-h) + 40px) 0 160px; }
    .hero__grid { grid-template-columns: 1fr; text-align: center; }
    .hero__text { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .hero__art { width: min(80%, 340px); }
    .scroll-cue { display: none; }

    .team__grid { grid-template-columns: 1fr; }
    .team__art { width: min(100%, 380px); margin: 0 auto; }
    .team__copy { text-align: center; }
    .section-head--left { margin-inline: auto; text-align: center; }
    .section-head--left .eyebrow::after { display: block; }
    .chips { justify-content: center; }
}

/* Phones on their side: lots of width but very little height. Back to two columns, with
   headings and artwork sized to the screen height so nothing feels zoomed in. */
@media (orientation: landscape) and (max-height: 500px) {
    :root { --header-h: 64px; }
    .brand__logo { width: 44px; height: 44px; }

    .section { padding: 56px 0; }
    .section-head { margin-bottom: 36px; }
    .section-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

    .hero { padding: calc(var(--header-h) + 24px) 0 120px; }
    .hero__grid { grid-template-columns: 1.25fr .75fr; text-align: left; }
    .hero__title { margin-bottom: 18px; font-size: clamp(1.8rem, 4.4vw, 2.6rem); }
    .hero__text { margin-inline: 0; margin-bottom: 24px; font-size: .95rem; }
    .hero__actions { justify-content: flex-start; }
    .hero__art { width: min(100%, 62vh); }

    .team__grid { grid-template-columns: .8fr 1.2fr; }
    .team__art { width: min(100%, 62vh); }
    .team__copy { text-align: left; }
    .section-head--left { margin-inline: 0; text-align: left; }
    .section-head--left .eyebrow::after { display: none; }
    .chips { justify-content: flex-start; }
}

@media (max-width: 520px) {
    :root { --header-h: 72px; }
    .brand__logo { width: 50px; height: 50px; }
    .brand__name { font-size: .82rem; letter-spacing: .1em; }
    .hero__eyebrow { font-size: .64rem; letter-spacing: .12em; }
    .hero__actions .btn { width: 100%; letter-spacing: .08em; }
    .services__grid { padding-left: 12px; }
    .contact-card { padding-right: 20px; }
    .site-footer__inner { flex-direction: column; text-align: center; }
    .site-footer__brand { flex-direction: column; }
}

/* ---------- Pre-rendered page ---------- */

/* The page's HTML is saved into index.html at deploy time, for search engines and for browsers that can't run
   the app. While the app is starting (html.js) it stays hidden behind the loading screen. */
html.js .prerendered { display: none; }
html:not(.js) .app-loading { display: none; }

/* ---------- Reduced motion: keep the design, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
    .intro, .bubbles, .scroll-cue, .bottle-art__mist { display: none; }
    html.js [data-reveal] { opacity: 1; transform: none; }
    html.js .friend--a, html.js .friend--b { transform: none; }
    html.js .team__art:not(.is-visible) .team__heart > path { scale: 1; }
    .icon-draw * { stroke-dashoffset: 0; }
}

/* ---------- Blazor plumbing ---------- */

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    padding: .6rem 1.25rem .7rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    color: #222;
}
#blazor-error-ui .dismiss { position: absolute; top: .5rem; right: .75rem; cursor: pointer; }
.blazor-error-boundary { padding: 1rem; background: #b32121; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
