/* =========================================================
   BUDY design system tokens (from the BUDY.agency design system)
   ========================================================= */
:root {
  /* Brand colors */
  --blue: #0044b9;        /* main brand color */
  --green: #00c976;       /* energy accent – shapes only on cream/white */
  --cream: #f6f1ec;       /* page background, always with paper */
  --white: #ffffff;       /* cards, pills – never a page background */
  --ink: #1a1a1a;         /* body text */
  --soft-blue: #5b87d2;   /* cards on blue, sparingly */
  --mint: #a8e8c8;        /* ghost words on green only */
  --error: #c62828;       /* real errors only */

  /* Text on fills */
  --on-blue: var(--white);
  --on-green: var(--ink);
  --focus-ring: var(--ink);
  --focus-ring-on-blue: var(--white);

  /* Fonts */
  --font-sans: "Raleway", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Arial, sans-serif;

  /* Type scale (fluid, within the system's web ranges) */
  --fs-small: 14px;
  --fs-body: clamp(16px, 0.95rem + 0.2vw, 18px);
  --fs-button: clamp(15px, 0.9rem + 0.15vw, 16px);
  --fs-h3: clamp(20px, 1.15rem + 0.4vw, 24px);
  --fs-h2: clamp(26px, 1.4rem + 0.9vw, 32px);
  --fs-h1: clamp(34px, 1.6rem + 1.6vw, 44px);

  /* Spacing – 8px rhythm */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --gutter: clamp(var(--space-16), 4vw, var(--space-64));
  --section-y: clamp(var(--space-64), 8vw, var(--space-96));

  /* Radius – everything is soft */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --border-card: 2px;
  --squiggle-stroke: 3px;

  /* Paper texture (download from the design system: Backgrounds) */
  --paper-image: url("images/budy-paper-background-web.jpg");

  --container: 1200px;
  --header-h: 76px;
  --tap: 44px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "lnum" 1;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-sans); margin: 0 0 var(--space-16); overflow-wrap: break-word; }
p { margin: 0 0 var(--space-16); }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.section--blue :focus-visible,
.footer :focus-visible { outline-color: var(--focus-ring-on-blue); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Cream paper ground */
.paper {
  background-color: var(--cream);
  background-image: var(--paper-image);
  background-size: cover;
  background-position: center;
}

/* =========================================================
   Buttons (pills)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: var(--tap);
  padding: var(--space-12) var(--space-24);
  border: var(--border-card) solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-button);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { filter: brightness(0.94); }
.btn--blue { background: var(--blue); color: var(--on-blue); }
.btn--green { background: var(--green); color: var(--on-green); }
.btn--white { background: var(--white); color: var(--blue); font-weight: 700; }
.btn--outline { background: transparent; color: var(--blue); border-color: var(--blue); font-weight: 700; }
.btn--outline:hover { background: var(--blue); color: var(--on-blue); filter: none; }
.btn--lg { min-height: 56px; padding: var(--space-16) var(--space-32); font-size: 17px; font-weight: 700; }
.btn--block { width: 100%; }

/* =========================================================
   Pills & label tags
   ========================================================= */
.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-32) 0 0;
  padding: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}
.pill--white { background: var(--white); color: var(--blue); }

/* Label with speech tail */
.label {
  position: relative;
  display: inline-block;
  margin: 0 0 var(--space-24);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}
.label::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -8px;
  border-style: solid;
  border-width: 8px 10px 0 0;
  border-color: currentColor transparent transparent transparent;
}
.label--blue { background: var(--blue); color: var(--on-blue); }
.label--blue::after { border-top-color: var(--blue); }
.label--green { background: var(--green); color: var(--on-green); }
.label--green::after { border-top-color: var(--green); }

/* =========================================================
   Navigation – green bar
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: var(--on-green);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}
.nav__logo img { width: 52px; height: 52px; }

/* Hamburger (mobile default) */
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--tap);
  height: var(--tap);
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav__menu {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding: var(--space-8) var(--gutter) var(--space-24);
  background: var(--green);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.nav__menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); }

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--on-green);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.nav__link { border-bottom: 3px solid transparent; }
.nav__link:hover { border-bottom-color: var(--ink); }
.nav__link.is-active { border-bottom-color: var(--blue); }
.nav__cta { width: 100%; }

@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-32);
    padding: 0;
    background: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .nav__links { flex-direction: row; gap: var(--space-24); }
  .nav__link { min-height: var(--tap); font-size: 16px; }
  .nav__cta { width: auto; }
}

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: var(--section-y); }
.section--blue { background: var(--blue); color: var(--on-blue); }
.section--green { background: var(--green); color: var(--on-green); }

.section__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  max-width: 24ch;
}
.paper .section__title { color: var(--blue); }
.section__lead { max-width: 60ch; margin-bottom: var(--space-32); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-block: clamp(var(--space-48), 6vw, var(--space-96)) var(--section-y); overflow: hidden; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-64);
  align-items: center;
}
.hero__content { min-width: 0; }

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.15;
  color: var(--blue);
  max-width: 18ch;
  margin-bottom: var(--space-24);
}
.hero__title strong { font-weight: 700; }

.hero__subtitle { max-width: 54ch; margin-bottom: var(--space-32); }
.hero__subtitle strong { font-weight: 700; }

.hero__actions .btn { width: 100%; white-space: normal; }

.hero__media {
  position: relative;
  min-width: 0;
  padding: var(--space-24) var(--space-16);
}

/* Organic blobs */
.blob {
  position: absolute;
  display: block;
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  z-index: 0;
}
.blob--blue { background: var(--blue); }
.blob--green { background: var(--green); }
.hero__blob-big { inset: 0 -6% 4% 10%; }
.hero__blob-small {
  width: 28%;
  aspect-ratio: 1;
  left: -4%;
  bottom: -6%;
  border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
}

/* Squiggle */
.squiggle { position: absolute; z-index: 1; width: 96px; height: 24px; overflow: visible; }
.squiggle path { fill: none; stroke: var(--green); stroke-width: var(--squiggle-stroke); stroke-linecap: round; }
.hero__squiggle { top: -8px; right: 8%; }

/* Video (thumbnail → iframe) */
.video {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}
.video__thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.video:hover .video__thumb { transform: scale(1.03); }
.video__play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--green);
  color: var(--on-green);
  transition: transform 0.2s;
}
.video__play svg { margin-left: 4px; }
.video:hover .video__play { transform: scale(1.08); }
.video:focus-visible { outline-offset: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (min-width: 600px) {
  .hero__actions .btn { width: auto; }
  .hero__media { padding: var(--space-32) var(--space-32) var(--space-32) var(--space-48); }
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(var(--space-48), 5vw, var(--space-96));
  }
}

/* =========================================================
   Cards
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-24);
  margin-bottom: var(--space-48);
}
.card {
  border-radius: var(--radius-md);
  padding: var(--space-24);
}
.card h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; margin-bottom: var(--space-8); }
.card p { margin: 0; }
.card--soft { background: var(--soft-blue); color: var(--ink); }
.card--white { background: var(--white); color: var(--ink); }
.card--outline { background: var(--white); color: var(--ink); border: var(--border-card) solid var(--blue); }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: var(--space-32); }
  .card { padding: var(--space-32); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   Contact form
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-48);
}
.form { display: grid; gap: var(--space-24); }
.form__field { display: grid; gap: var(--space-8); }
.form label { font-weight: 700; font-size: 15px; }
.form input,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-12) var(--space-16);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--ink);
  background: var(--cream);
  border: var(--border-card) solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.form textarea { resize: vertical; min-height: 140px; }
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--blue); }
.form input:focus-visible,
.form textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.form .is-invalid { border-color: var(--error); }
.form__status { margin: 0; font-size: 15px; font-weight: 600; min-height: 1.5em; }
.form__status.is-error { color: var(--error); }
.form__status.is-success { color: var(--blue); }

@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1fr; align-items: start; gap: var(--space-64); }
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--blue);
  color: var(--on-blue);
  padding-block: var(--space-32);
  font-size: 15px;
}
.footer__inner { display: flex; flex-direction: column; gap: var(--space-8); align-items: flex-start; }
.footer p { margin: 0; }
.footer__top {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: none;
  font-weight: 700;
}
@media (min-width: 720px) {
  .footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
