/* ==============================================================
   BEAUFORT CHILDCARE — holding page
   "Sunlit meadow, modern morning"
   Zero dependencies beyond Google Fonts. Built to be deployed
   as-is to the beaufortchildcare.co.uk web root.
   ============================================================== */

:root {
    --honey:        #FFB900;
    --honey-soft:   #FFD469;
    --honey-deep:   #E89B00;
    --pollen:       #FFF4D6;
    --meadow:       #4CA637;
    --meadow-deep:  #2F7A2C;
    --pine:         #173F1E;
    --leaf:         #A5D66F;
    --sky:          #CFEAF6;
    --cloud:        #FDFBF5;
    --ink:          #22301F;
    --ink-soft:     #5C6657;

    --font-display: "Outfit", system-ui, sans-serif;
    --font-body:    "Nunito", system-ui, sans-serif;

    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-soft: 0 10px 30px rgba(23, 63, 30, 0.08);
    --shadow-deep: 0 24px 60px rgba(23, 63, 30, 0.14);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* NOTE: no `scroll-behavior: smooth` here on purpose — it makes browsers
   animate scroll restoration and #hash jumps on page load, so the page
   visibly glides away from the top. Smooth scrolling for in-page links
   is handled in js/main.js instead. */

body {
    font-family: var(--font-body);
    font-size: 1.06rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--cloud);
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--pine);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

a { color: var(--meadow-deep); }

::selection { background: var(--honey-soft); color: var(--pine); }

/* ==============================================================
   AURORA BACKDROP — three soft gradient blobs, slowly breathing
   ============================================================== */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
}
.aurora .a1 {
    width: 55vw; height: 55vw;
    top: -18vw; right: -12vw;
    background: radial-gradient(circle, var(--honey-soft), transparent 65%);
    animation: drift1 26s ease-in-out infinite alternate;
}
.aurora .a2 {
    width: 48vw; height: 48vw;
    bottom: -20vw; left: -14vw;
    background: radial-gradient(circle, var(--leaf), transparent 65%);
    animation: drift2 32s ease-in-out infinite alternate;
    opacity: 0.4;
}
.aurora .a3 {
    width: 36vw; height: 36vw;
    top: 30vh; left: 55vw;
    background: radial-gradient(circle, var(--sky), transparent 60%);
    animation: drift3 24s ease-in-out infinite alternate;
    opacity: 0.5;
}
@keyframes drift1 { to { transform: translate(-6vw, 8vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(8vw, -6vh) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-10vw, 6vh) scale(0.92); } }

/* faint dot-grid texture over the aurora */
.dotgrid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgba(23, 63, 30, 0.05) 1.2px, transparent 1.2px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}

/* ==============================================================
   POLLEN — tiny motes drifting upward
   ============================================================== */
.pollen {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.pollen i {
    position: absolute;
    bottom: -2vh;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--honey);
    opacity: 0;
    animation: rise linear infinite;
}
.pollen i:nth-child(1) { left: 8%;  animation-duration: 19s; animation-delay: 0s;   width: 5px; height: 5px; }
.pollen i:nth-child(2) { left: 22%; animation-duration: 24s; animation-delay: 4s; }
.pollen i:nth-child(3) { left: 37%; animation-duration: 17s; animation-delay: 9s;   width: 4px; height: 4px; }
.pollen i:nth-child(4) { left: 52%; animation-duration: 26s; animation-delay: 2s;   width: 6px; height: 6px; }
.pollen i:nth-child(5) { left: 67%; animation-duration: 21s; animation-delay: 12s; }
.pollen i:nth-child(6) { left: 79%; animation-duration: 18s; animation-delay: 6s;   width: 5px; height: 5px; }
.pollen i:nth-child(7) { left: 91%; animation-duration: 23s; animation-delay: 15s;  width: 4px; height: 4px; }
@keyframes rise {
    0%   { transform: translateY(0) translateX(0);        opacity: 0; }
    8%   { opacity: 0.5; }
    50%  { transform: translateY(-55vh) translateX(3vw);  opacity: 0.35; }
    100% { transform: translateY(-110vh) translateX(-2vw); opacity: 0; }
}

/* ==============================================================
   FLYING BEE — crosses the sky once on load
   ============================================================== */
.sky-bee {
    position: fixed;
    top: 0; left: 0;
    width: clamp(64px, 7vw, 96px);
    z-index: 50;
    pointer-events: none;
    offset-path: path("M -100 180 C 300 40, 500 320, 820 140 S 1400 60, 2100 220");
    offset-rotate: auto 12deg;
    animation: flyAcross 9s ease-in-out 1.2s 1 both;
}
@keyframes flyAcross {
    0%   { offset-distance: 0%;   opacity: 0; }
    4%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* ==============================================================
   SHELL
   ============================================================== */
.shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}

/* ==============================================================
   HERO
   ============================================================== */
.hero {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3rem, 8vh, 5rem) 0 6.5rem;
    position: relative;
}

/* assembling logo */
.hero-logo {
    position: relative;
    width: clamp(120px, 16vw, 168px);
    aspect-ratio: 1;
    margin-bottom: 1.6rem;
}
.hero-logo img { position: absolute; inset: 0; }
.hero-logo .logo-back {
    transform: scale(0);
    transition: transform 0.9s var(--ease-spring) 0.15s;
}
.hero-logo .logo-front {
    opacity: 0;
    transform: translate(-70px, -50px) rotate(-30deg) scale(0.6);
    transition: transform 1s var(--ease-spring) 0.75s, opacity 0.5s ease 0.75s;
}
body.loaded .hero-logo .logo-back  { transform: scale(1); }
body.loaded .hero-logo .logo-front { opacity: 1; transform: none; }

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    letter-spacing: 0.34em;
    text-indent: 0.34em; /* optically centre the tracked-out text */
    text-transform: uppercase;
    color: var(--meadow-deep);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.7rem, 7.2vw, 5.2rem);
    font-weight: 700;
    max-width: 21ch;
    margin: 0 auto 1.4rem;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--honey-deep), var(--honey) 45%, var(--meadow) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lede {
    max-width: 52ch;
    font-size: clamp(1.08rem, 1.8vw, 1.3rem);
    color: var(--ink-soft);
    margin: 0 auto 2.2rem;
}
.hero .lede strong { color: var(--pine); }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* staged entrance for hero children */
.stage {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-spring);
}
body.loaded .stage { opacity: 1; transform: none; }
body.loaded .stage.s1 { transition-delay: 0.35s; }
body.loaded .stage.s2 { transition-delay: 0.5s; }
body.loaded .stage.s3 { transition-delay: 0.65s; }
body.loaded .stage.s4 { transition-delay: 0.8s; }

/* photo sticker cards — inline row on most screens,
   floating in the hero's quiet corners on wide ones */
.chip-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.4rem;
    margin-top: 2.4rem;
}
.sticker-chip {
    width: clamp(120px, 30vw, 150px);
    padding: 10px 10px 8px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow-deep);
}
.sticker-chip img {
    border-radius: 10px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top;
    background: var(--pollen);
}
.sticker-chip figcaption {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-align: center;
    padding-top: 8px;
}
.chip-left  { transform: rotate(-4deg); }
.chip-right { transform: rotate(4deg) translateY(10px); }

@media (min-width: 1280px) {
    /* The row must never carry a transform here: a transformed ancestor
       becomes the containing block for the absolutely-positioned chips,
       which made them jump when its entrance transition finished. */
    .chip-row.stage { margin: 0; transform: none; }
    /* Chips are spaced off the MAIN TEXT, not the viewport:
       - horizontally: measured from the page centre (calc(50% - …)) so they
         always sit just outside the headline's column, never over the words;
       - vertically: anchored to the hero centre (≈ the headline's centre),
         staggered — left chip level with the title, right chip down by the
         paragraph. No vh units, so every screen gets the same composition. */
    .sticker-chip {
        position: absolute;
        top: 50%;
        width: 140px;
        padding-bottom: 26px;
        opacity: 0;
        transition: opacity 1s ease 1.2s, transform 1s var(--ease-spring) 1.2s;
    }
    /* Left chip: bottom edge just above the headline's first line
       (the hero centre sits ~91px above the title top at every size).
       Right chip: down beside the narrow paragraph. ~340px stagger. */
    .chip-left  { left: calc(50% - 645px);  transform: translateY(calc(-50% - 220px)) rotate(-7deg); }
    .chip-right { right: calc(50% - 645px); transform: translateY(calc(-50% + 180px)) rotate(6deg); }
    body.loaded .chip-left  { opacity: 1; transform: translateY(calc(-50% - 190px)) rotate(-7deg); animation: floaty 7s ease-in-out 2.4s infinite; }
    body.loaded .chip-right { opacity: 1; transform: translateY(calc(-50% + 150px)) rotate(6deg);  animation: floaty 8s ease-in-out 2.8s infinite reverse; }
}
@keyframes floaty {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -14px; }
}

/* scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    opacity: 0;
    transition: opacity 1s ease 2s;
}
body.loaded .scroll-hint { opacity: 0.85; }
.scroll-hint .wheel {
    width: 22px; height: 34px;
    border: 2px solid var(--ink-soft);
    border-radius: 12px;
    position: relative;
}
.scroll-hint .wheel::after {
    content: "";
    position: absolute;
    top: 5px; left: 50%;
    width: 4px; height: 7px;
    margin-left: -2px;
    border-radius: 3px;
    background: var(--honey-deep);
    animation: wheelDot 1.8s ease-in-out infinite;
}
@keyframes wheelDot {
    0%, 100% { transform: translateY(0);   opacity: 1; }
    70%      { transform: translateY(12px); opacity: 0; }
}

/* ==============================================================
   BUTTONS
   ============================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
    padding: 0.95rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover  { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(120deg, var(--honey), var(--honey-soft));
    color: var(--pine);
    box-shadow: 0 6px 18px rgba(232, 155, 0, 0.4);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(232, 155, 0, 0.5); }

.btn-quiet {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--pine);
    box-shadow: inset 0 0 0 1.5px rgba(23, 63, 30, 0.18), var(--shadow-soft);
}
.btn-quiet:hover { background: #fff; }

/* ==============================================================
   HONEYCOMB PROGRESS STRIP
   ============================================================== */
.build-strip {
    padding: 1rem 0 0.4rem;
    text-align: center;
}
.build-card {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.4rem 2.2rem;
    padding: 1.3rem 2.4rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}
.build-card p {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--pine);
}
.build-card p span { color: var(--ink-soft); font-weight: 400; font-family: var(--font-body); font-size: 0.95rem; }

.comb { display: flex; gap: 5px; }
.comb .cell {
    width: 22px; height: 25px;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: rgba(23, 63, 30, 0.10);
    position: relative;
    overflow: hidden;
}
.comb .cell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--honey-soft), var(--honey-deep));
    transform: translateY(100%);
    animation: fillCell 7s ease-in-out infinite;
}
.comb .cell:nth-child(1)::after { animation-delay: 0s; }
.comb .cell:nth-child(2)::after { animation-delay: 0.9s; }
.comb .cell:nth-child(3)::after { animation-delay: 1.8s; }
.comb .cell:nth-child(4)::after { animation-delay: 2.7s; }
.comb .cell:nth-child(5)::after { animation-delay: 3.6s; }
.comb .cell:nth-child(6)::after { animation-delay: 4.5s; }
@keyframes fillCell {
    0%       { transform: translateY(100%); }
    28%, 68% { transform: translateY(0); }
    96%, 100%{ transform: translateY(-101%); }
}

/* ==============================================================
   CONTACT BAND
   ============================================================== */
.contact {
    padding: clamp(2.5rem, 7vh, 4.5rem) 0 clamp(3rem, 8vh, 5rem);
}
.contact-card {
    position: relative;
    background: var(--pine);
    border-radius: var(--radius-xl);
    padding: clamp(2.4rem, 6vw, 4rem);
    color: #EAF3E2;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}
.contact-card > * { position: relative; }

.contact-card .contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
.contact-card h2 {
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    margin-bottom: 0.8rem;
}
.contact-card h2 em {
    font-style: normal;
    color: var(--honey-soft);
}
.contact-card .contact-copy p {
    color: #C9DDBC;
    max-width: 44ch;
    margin-bottom: 1.6rem;
}
.contact-methods { display: grid; gap: 0.9rem; }
.method {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.15rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s var(--ease-spring);
}
.method:hover { background: rgba(255, 255, 255, 0.13); transform: translateX(6px); }
.method .m-icon {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    background: var(--honey);
    color: var(--pine); /* icon glyph matches the card background */
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--honey-deep);
}
.method .m-icon svg { width: 22px; height: 22px; display: block; }
.method .m-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--honey-soft);
    display: block;
    line-height: 1.4;
}
.method .m-value { color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.method .m-value small { display: block; font-weight: 400; font-size: 0.82rem; color: #B9CFAA; }

/* ==============================================================
   FOOTER
   ============================================================== */
.foot {
    text-align: center;
    padding: 0 1.5rem 2.2rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}
.foot .sleepy {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.foot .sleepy img { width: 44px; }
.foot .legal { line-height: 1.9; }
.foot .legal strong { color: var(--pine); }
.foot .credit {
    margin-top: 0.9rem;
    font-size: 0.82rem;
    color: var(--ink-soft);
}
.foot .credit a {
    color: var(--meadow-deep);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--honey);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.foot .credit a:hover { color: var(--honey-deep); border-bottom-color: var(--meadow); }

/* ==============================================================
   SCROLL REVEAL
   ============================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-spring);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ==============================================================
   RESPONSIVE & MOTION
   ============================================================== */
@media (max-width: 720px) {
    .hero { min-height: 88vh; }
    .contact-card .contact-grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .build-card { border-radius: var(--radius-lg); padding: 1.2rem 1.5rem; }
    .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
    html { scroll-behavior: auto; }
    .sky-bee, .pollen { display: none; }
    .stage, .sticker-chip, .scroll-hint, .reveal,
    .hero-logo .logo-back, .hero-logo .logo-front { opacity: 1; transform: none; }
}
