/* ==========================================================================
   The Home Delivery Alliance – Stylesheet
   Plain CSS, no build step. Breakpoints: 1024px (desktop), 1536px (wide).
   ========================================================================== */

@font-face { font-family: "Garet"; src: url("../assets/fonts/Garet-Regular.woff2") format("woff2"); font-weight: 300 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Garet"; src: url("../assets/fonts/Garet-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Garet"; src: url("../assets/fonts/Garet-Bold.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --p1: #996dfe;   /* primary light purple */
  --p2: #7653c8;
  --p3: #50329b;   /* dark purple – text */
  --p4: #d1c7e9;
  --g1: #f3f3ff;
  --g2: #c8c8c8;
  --card-grey: #eeeeee;
  --page-width: 1680px;
  --pad-x: 20px;
  --header-h: 115px;
  --radius: 30px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-logo: cubic-bezier(.65, 0, .35, 1);
}
@media (min-width: 1024px) {
  :root { --pad-x: 80px; --header-h: 150px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: "Garet", system-ui, sans-serif; color: var(--p3); background: #fff; line-height: 1.5; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--p2); outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: #fff; color: var(--p3); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Typography (mirrors original sizes) ---------- */
.h-section { font-size: 40px; line-height: 45px; font-weight: 700; color: var(--p3); }
.subhead  { font-size: 18px; line-height: 22px; font-weight: 500; color: var(--p3); }
.c1 { font-size: 16px; line-height: 20px; font-weight: 300; color: var(--p3); }
.c2 { font-size: 15px; line-height: 20px; color: var(--p3); }
.c3 { font-size: 10px; line-height: 14px; }
@media (min-width: 1024px) {
  .h-section { font-size: 35px; }
  .subhead { font-size: 25px; line-height: 35px; }
  .c1 { font-size: 24px; line-height: 35px; }
  .c2 { font-size: 20px; line-height: 28px; }
  .c3 { font-size: 12px; line-height: 17px; }
}
.text-link { text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { text-decoration: none; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: 100px; }
.section-head { display: flex; flex-direction: column; gap: 16px; }
.separator { max-width: var(--page-width); margin-inline: auto; padding-inline: var(--pad-x); }
.separator hr { margin: 0; border: 0; border-top: 1px solid var(--p2); }
.separator--desktop { display: none; }
@media (min-width: 1024px) { .separator--desktop { display: block; } }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transform: none; transition: opacity .3s linear; } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--p1); }
.site-header__bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; display: block; width: 166px; flex: 0 0 auto; transform-origin: 0 0; }
.brand img { width: 100%; height: auto; }
.brand .logo-intro { position: absolute; left: -0.63%; top: 0; width: 101.27%; max-width: none; display: none; }
@media (min-width: 1024px) { .brand { width: clamp(240px, 26vw, 406px); } }

.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav { display: flex; gap: clamp(32px, 4.5vw, 80px); }
}
.nav-link { font-size: 30px; line-height: 1; font-weight: 700; color: var(--g1); text-decoration: none; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-link:hover, .nav-link.is-active { text-decoration-line: underline; }
@media (min-width: 1024px) and (max-width: 1279px) { .main-nav .nav-link { font-size: 24px; } }

/* Hamburger */
.menu-toggle { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -10px; }
.menu-toggle span { display: block; width: 25px; height: 14px; border-block: 3px solid #fff; transition: height .3s var(--ease), border-width .3s var(--ease); }
.menu-toggle[aria-expanded="true"] span { height: 1px; border-block-width: 2px; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-menu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.mobile-menu > div { overflow: hidden; }
.mobile-menu.is-open { grid-template-rows: 1fr; }
.mobile-menu a { display: flex; align-items: center; height: 87px; padding-inline: 20px; }
.mobile-menu a:nth-child(1) { background: var(--p2); }
.mobile-menu a:nth-child(2) { background: var(--p3); }
.mobile-menu a:nth-child(3) { background: var(--p4); color: var(--p3); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }

main { padding-top: var(--header-h); }

/* ==========================================================================
   Intro animation
   Only active when <html> has .intro (set by the inline script in <head>).
   ========================================================================== */
.intro-overlay { display: none; }
.intro .intro-overlay { display: block; position: fixed; inset: 0; z-index: 40; background: var(--p1); overflow: hidden; pointer-events: none; }
.intro-run .intro-overlay { background: transparent; }
.intro-overlay__lottie { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 16 / 9; transform-origin: top; transition: transform 2s ease-in 1s; }
.intro-run .intro-overlay__lottie { transform: translateY(-10%); }
.intro-overlay__underlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--p1); transition: height 3.5s var(--ease) .5s; }
.intro-run .intro-overlay__underlay { height: 0; }
@media (min-aspect-ratio: 16/9) { .intro-run .intro-overlay__underlay { display: none; } }

/* Logo and nav during the intro */
.intro .brand .logo-static { visibility: hidden; }
.intro .brand .logo-intro { display: block; }
/* Like the original: the logo really is large at the start (no scaling = stays sharp)
   and shrinks via its width while the whole logo moves into the header. */
.intro .brand { transform: var(--brand-from, none); }
.intro-run .brand { transform: none; transition: transform 2s var(--ease-logo) 1.1s; }
.intro .brand .logo-intro { width: var(--logo-from, 101.27%); }
.intro-run .brand .logo-intro { width: 101.27%; transition: width 2s var(--ease) 1s; }
.intro .main-nav .nav-link, .intro .menu-toggle { opacity: 0; }
.intro-run .main-nav .nav-link, .intro-run .menu-toggle { opacity: 1; transition: opacity .7s var(--ease) 2.5s; }
.intro-run .main-nav .nav-link:nth-child(2) { transition-delay: 2.7s; }
.intro-run .main-nav .nav-link:nth-child(3) { transition-delay: 2.9s; }
/* While waiting for assets: keep the logo invisible, it fades in once ready */
.intro:not(.intro-run) .brand { opacity: 0; }
.intro-run .brand { opacity: 1; }

/* ==========================================================================
   Hero (About)
   ========================================================================== */
.hero { position: relative; }
.hero__anim { position: relative; width: 100%; background: #fff; overflow: hidden; }
.hero__anim--desktop { display: none; aspect-ratio: 2 / 1; }
.hero__anim--mobile { aspect-ratio: 2 / 3; margin-top: -30px; }
@media (min-width: 1024px) {
  /* Never taller than the visible area below the header, so the country label (bottom left) stays in view */
  .hero__anim--desktop { display: block; width: min(100%, calc((100vh - var(--header-h) - 40px) * 2)); width: min(100%, calc((100svh - var(--header-h) - 40px) * 2)); margin-inline: auto; }
  .hero__anim--mobile { display: none; }
}
.hero__skip { position: absolute; right: var(--pad-x); bottom: 24px; z-index: 5; opacity: 0; transition: opacity .4s var(--ease); }
.hero__skip.is-visible { opacity: 1; }
@media (min-width: 1024px) { .hero__skip { bottom: 80px; } }
.hero__text { display: flex; flex-direction: column; gap: 25px; margin-top: 60px; }
@media (min-width: 1024px) {
  /* On desktop the headline is part of the animation; keep the HTML text for SEO and screen readers */
  .hero__text { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.hero__text .h-section { font-size: 40px; }

/* ==========================================================================
   What we deliver
   ========================================================================== */
.deliver .section-head { margin-bottom: 40px; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; list-style: none; padding: 0; }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.product-card { background: var(--card-grey); border-radius: var(--radius); padding: 0 22px; display: flex; flex-direction: column; align-items: center; aspect-ratio: 353 / 460; }
@media (min-width: 1024px) { .product-card { aspect-ratio: auto; padding-block: 8px; } }
.product-card h3 { height: 88px; display: flex; align-items: flex-end; justify-content: center; text-align: center; margin-bottom: 5px; font-size: 24px; line-height: 30px; font-weight: 400; color: var(--p3); border-bottom: 1px solid var(--p3); width: 100%; padding-bottom: 5px; }
@media (min-width: 1536px) { .product-card h3 { padding-inline: 16%; } }
.product-card__img { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding-block: 16px; }
.product-card__img img { height: 245px; width: auto; object-fit: contain; }
@media (min-width: 1024px) { .product-card__img img { width: 100%; height: auto; max-height: 245px; aspect-ratio: 1; } }

/* ==========================================================================
   Services
   ========================================================================== */
.services .section-head { margin-bottom: 80px; }
.services .section-head .c1 { display: none; }
@media (min-width: 1024px) { .services .section-head .c1 { display: block; } }
.icon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; }
@media (min-width: 1024px) { .icon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; } }
.icon-card { background: var(--p1); color: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
@media (min-width: 1024px) { .icon-card { aspect-ratio: 205 / 268; } }
.icon-card img { width: 73px; height: 73px; margin-bottom: 16px; }
.icon-card hr { width: 100%; margin: 0; border: 0; border-top: 1px solid #fff; }
.icon-card h3 { width: 100%; font-size: 20px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; hyphens: auto; }
@media (min-width: 1024px) and (max-width: 1279px) { .icon-card h3 { font-size: 17px; line-height: 21px; } }
.icon-card p { width: 100%; margin-top: -2px; }
@media (min-width: 1536px) { .icon-card h3 { font-size: 23px; line-height: 28px; } }

/* ==========================================================================
   How we deliver – service levels
   ========================================================================== */
.levels .section-head { margin-bottom: 65px; }
.level-grid { display: flex; flex-direction: column; list-style: none; padding: 0; }
@media (min-width: 1024px) { .level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; } }
.level { position: relative; background: var(--p3); color: #fff; border: 1px solid #fff; border-radius: var(--radius); padding: 24px 40px 0; overflow: hidden; }
.level--light { background: var(--p1); }
.level__title { font-size: 32px; line-height: 38px; text-align: center; width: 100%; font-weight: 400; color: #fff; }
.level__toggle { display: block; width: 100%; font-size: 32px; line-height: 38px; color: #fff; }
.level__title--desktop { display: none; }
.level hr { margin: 16px 0 0; border: 0; border-top: 1px solid #fff; }
.level__list { list-style: none; padding: 32px 0 92px; margin: 0; display: flex; flex-direction: column; gap: 32px; }
.level__item { display: flex; gap: 18px; }
.level__icon { flex: 0 0 22px; font-size: 30px; line-height: 25px; text-align: center; }
.level__icon--plus { font-size: 44px; line-height: 25px; font-weight: 300; }
.level__super, .level__sub { font-size: 12px; line-height: 20px; }
.level__label { font-size: 16px; line-height: 20px; }
/* mobile: stacked, collapsible cards */
@media (max-width: 1023px) {
  .level { margin-bottom: -24px; }
  .level:not(:last-child) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .level:nth-child(1) { z-index: 1; } .level:nth-child(2) { z-index: 2; } .level:nth-child(3) { z-index: 3; } .level:nth-child(4) { z-index: 4; }
  .level__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease); }
  .level__body > div { overflow: hidden; }
  .js .level:not(.is-open) .level__body { grid-template-rows: 0fr; }
  .level.is-open { border-radius: var(--radius); margin-bottom: -48px; }
  .level:last-child { margin-bottom: 0; }
  .level { padding-bottom: 24px; }
  .js .level:not(.is-open) { padding-bottom: 30px; }
  .level__list { padding-bottom: 60px; }
}
@media (min-width: 1024px) {
  .level { padding-top: 60px; }
  .level__toggle { display: none; }
  .level__title--desktop { display: block; }
}

/* ==========================================================================
   What you get
   ========================================================================== */
.benefits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 1024px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.benefits__text { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 1024px) { .benefits__text { gap: 40px; } }
.benefits ul { padding-left: 32px; line-height: 2; }
.benefits ul.c1 { line-height: 2; }
.benefits__img { justify-self: center; width: 100%; max-width: 620px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { position: relative; padding-top: 0; padding-bottom: 100px; }
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 52px; }
@media (min-width: 1024px) {
  .contact__grid { grid-template-columns: minmax(300px, 34%) 1fr; gap: 24px; align-items: start; }
}
.contact__intro { display: flex; flex-direction: column; gap: 16px; margin-top: 100px; }
.contact__intro .c1 + .c1 { margin-top: 0; }
.contact__map { display: none; position: relative; }
@media (min-width: 1024px) {
  .contact__map { display: block; margin-top: 40px; }
  .contact__list { display: none; }
  .contact__intro .only-mobile { display: none; }
}
@media (max-width: 1023px) { .contact__intro .only-desktop { display: none; } }
.map-wrap { position: relative; width: 100%; aspect-ratio: 1440 / 1050; }
.map-wrap svg { width: 100%; height: 100%; }
.map-wrap .map-base { pointer-events: none; }
.map-wrap .country { cursor: pointer; transition: opacity .2s var(--ease); outline: none; }
.map-wrap .country:hover, .map-wrap .country:focus-visible { opacity: .55; }
.map-wrap .country.is-selected { opacity: .55; }
.map-wrap .country:focus-visible path, .map-wrap .country:focus-visible polygon { stroke: var(--p2); stroke-width: 4px; }

/* Country card (desktop popup) */
.country-card { position: absolute; z-index: 20; width: 340px; padding: 28px 32px 32px; background: #fff; border: 2px solid var(--p2); border-radius: 25px; box-shadow: 0 18px 40px rgba(80, 50, 155, .18);
  opacity: 0; transform: scale(.92); transform-origin: var(--origin-x, 0) 50%; visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s, left .3s var(--ease), top .3s var(--ease); }
.country-card.no-move { transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
.country-card.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.country-card__close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 30px; line-height: 1; color: var(--g2); }
.country-card__close:hover { color: var(--p3); }
.country-card__kicker { font-size: 15px; line-height: 20px; color: var(--p2); }
.country-card__title { font-size: 30px; line-height: 36px; font-weight: 700; color: var(--p3); margin: 4px 40px 20px 0; }
.country-card__partner { font-size: 18px; line-height: 24px; font-weight: 500; margin-bottom: 20px; }
.country-card__logo { height: 64px; width: auto; max-width: 200px; object-fit: contain; object-position: left; margin-bottom: 20px; }

/* Country accordion (mobile) – native <details> */
.country-list { list-style: none; padding: 0; margin: 0; }
.country-item { border-bottom: 1px solid var(--p3); margin-bottom: 12px; }
.country-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 40px; cursor: pointer; }
.country-item summary::-webkit-details-marker { display: none; }
.country-item summary::after { content: "+"; font-size: 40px; line-height: 25px; font-weight: 300; color: var(--p3); width: 25px; text-align: center; }
.country-item[open] summary::after { content: "–"; }
.country-item__body { display: flex; flex-direction: column; gap: 16px; padding: 12px 0 16px; }
.country-item__body .partner { font-size: 18px; line-height: 24px; font-weight: 500; }
.country-item__body img { width: 50%; max-height: 100px; object-fit: contain; object-position: right; align-self: flex-end; }
@supports (interpolate-size: allow-keywords) {
  .country-list { interpolate-size: allow-keywords; }
  .country-item::details-content { height: 0; overflow: hidden; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
  .country-item[open]::details-content { height: auto; }
}

/* ==========================================================================
   Partners
   ========================================================================== */
.partners .section-head { margin-bottom: 89px; }
.partner-logos { display: flex; flex-direction: column; align-items: flex-start; gap: 118px; list-style: none; padding: 0; margin: 0 0 89px; }
@media (min-width: 1024px) { .partner-logos { flex-direction: row; align-items: center; justify-content: space-around; gap: 24px; padding-inline: 8%; } }
.partner-logos a { display: block; opacity: .7; filter: saturate(0); transition: opacity .3s var(--ease), filter .3s var(--ease); }
.partner-logos a:hover, .partner-logos a:focus-visible { opacity: 1; filter: none; }
.partner-logos img { max-height: 100px; width: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer__claim { background: var(--p1); padding-block: 34px; }
.site-footer__claim p { color: #fff; font-weight: 700; font-size: 40px; line-height: 45px; }
@media (min-width: 1024px) { .site-footer__claim p { font-size: 35px; } }
.site-footer__bar { background: var(--p3); color: var(--g1); padding-block: 24px; }
.site-footer__bar .container { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.site-footer__bar a { text-decoration: none; }
.site-footer__bar a:hover { text-decoration: underline; }
@media (min-width: 1024px) {
  .site-footer__bar { padding-block: 0; }
  .site-footer__bar .container { display: grid; grid-template-columns: 6fr 2fr 4fr; gap: 24px; align-items: center; height: 70px; }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal { padding-block: 80px 100px; max-width: 980px; }
.legal h1 { margin-bottom: 32px; }
.legal h2 { font-size: 20px; line-height: 28px; font-weight: 700; margin: 36px 0 8px; }
.legal h3 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 24px 0 6px; }
.legal p, .legal li { font-size: 16px; line-height: 26px; color: #2c1c57; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal a { color: var(--p2); }
.legal .todo { background: #fff4c2; padding: 2px 6px; border-radius: 4px; }
.back-home { display: inline-block; margin-bottom: 32px; }
