/* ---------- Tokens ---------- */
:root {
  --white: #ffffff;
  --ink-900: #1a1a1a;
  --ink-700: #3d3d3d;
  --ink-600: #575757;
  --ink-500: #707070;
  --ink-400: #8c8c8c;
  --ink-300: #a3a3a3;
  --line: #dbdbdb;
  --line-soft: #e8e8e8;
  --line-faint: #f5f5f5;
  --accent: #f76708;
  --dark-bg: #1a1a1a;

  --content: 1000px;
  --gutter: 24px;
  --radius: 8px;
  --header-h: 72px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-alt: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink-600);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }
strong, b { font-weight: 700; }

.container {
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

[id] { scroll-margin-top: var(--header-h); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background-color .2s ease, opacity .2s ease, transform .2s ease;
}
.btn--outline {
  background: var(--white);
  color: var(--ink-900);
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  padding: 12px;
  box-shadow: inset 0 0 0 .5px var(--line-soft);
}
.btn--outline:hover { background: #f7f7f7; }
.btn--dark {
  background: var(--ink-900);
  color: var(--white);
  font-size: 16px;
  line-height: 1.2;
  padding: 8px 12px;
}
.btn--dark:hover { background: #333; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}
.site-nav { display: flex; gap: 25px; }
.site-nav a {
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  color: var(--ink-400);
  transition: color .2s ease;
}
.site-nav a:hover { color: var(--ink-900); }
.site-nav .site-nav__cta { display: none; }
.site-nav .site-nav__cta:hover { color: var(--white); }
.site-header .btn--outline { padding: 14px 12px; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-300);
  transition: transform .25s ease, opacity .25s ease, top .25s ease;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.site-header.is-open .menu-toggle span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.site-header.is-open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .menu-toggle span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero-bg {
  position: absolute;
  top: -243px;
  left: calc(50% - 316px);
  width: 1500px;
  height: 1041px;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }

.hero {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}
.hero__logo { width: 120px; height: 42px; color: var(--ink-700); }
.hero__logo svg { width: 100%; height: 100%; display: block; }
.hero__native {
  margin-top: 16px;
  font-family: "SF Pro Display", -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -2.16px;
  color: var(--accent);
}
.hero__intro {
  margin-top: 24px;
  max-width: 560px;
  line-height: 1.8;
  color: var(--ink-600);
}
.hero__intro strong, .hero__intro a { color: var(--ink-700); font-weight: 700; }
.hero__intro a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero__intro a:hover { color: var(--ink-900); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 64px 0;
}
.section--divider { border-bottom: .5px dotted var(--line); }
.section__lead {
  margin-bottom: 32px;
  line-height: 1.8;
  color: var(--ink-600);
}
.section__lead strong { color: var(--ink-600); }
.section__lead--tight { line-height: 1.2; color: var(--ink-500); }
.section__lead--tight strong { color: var(--ink-700); }

/* ---------- Project cards ---------- */
.projects { display: grid; gap: 16px; }
.project-card {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line-faint);
  background: var(--white);
}
.project-card__media {
  flex: 0 0 350px;
  aspect-ratio: 350 / 271;
  border-radius: var(--radius);
  overflow: hidden;
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.03); }
.project-card__body { flex: 1; display: grid; gap: 24px; justify-items: start; }
.project-card__title { font-size: 16px; font-weight: 700; line-height: 1.2; color: var(--ink-700); }
.project-card__desc { margin-top: -12px; line-height: 1.6; color: var(--ink-400); }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }
.carousel__track {
  display: flex;
  gap: 24px;
  transition: transform .5s cubic-bezier(.25, .8, .25, 1);
  will-change: transform;
}
.carousel__slide {
  flex: 0 0 calc((100% - 24px) / 2);
  aspect-ratio: 488 / 413;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-faint);
}
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__slide--contain { box-shadow: none; }
.carousel__slide--contain img { object-fit: contain; }
.carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  transition: transform .2s ease;
}
.carousel__btn:hover { transform: scale(1.08); }
.carousel__btn img { width: 40px; height: 40px; }
.carousel__btn--prev { left: 32px; }
.carousel__btn--next { right: 32px; }

/* ---------- Work experience ---------- */
.jobs { display: grid; gap: 64px; }
.job { display: grid; grid-template-columns: 220px 1fr; }
.job__meta { color: var(--ink-400); line-height: 1.6; padding-top: 2px; }
.job__meta p { width: 164px; }
.job__meta p + p { margin-top: 4px; }
.job__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; line-height: 1.6; }
.job__company { font-weight: 700; color: var(--ink-700); }
.job__org { color: var(--ink-400); }
.job__role { margin-top: 8px; font-weight: 700; line-height: 1.8; color: var(--ink-600); }
.job__list {
  margin-top: 8px;
  padding-left: 23px;
  color: var(--ink-400);
  line-height: 1.6;
}
.job__list li::marker { font-size: 12px; }
.achievements {
  margin-top: 24px;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}
.achievements__title { font-weight: 700; line-height: 1.8; color: var(--ink-600); }
.achievements ul { margin-top: 8px; padding-left: 23px; color: var(--ink-400); line-height: 1.6; }
.achievements li::marker { font-size: 12px; }
.achievements b { font-family: var(--font-alt); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 64px 0 24px;
  border-top: .5px dotted var(--line);
}
.site-footer__top {
  padding-bottom: 64px;
  border-bottom: 1px dotted var(--line);
}
.site-footer__row {
  display: flex;
  justify-content: space-between;
  gap: 48px;
}
.cta__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: var(--ink-700);
}
.cta__text { margin-top: 8px; line-height: 1.8; color: var(--ink-600); }
.cta .btn { margin-top: 24px; }
.footer-nav { display: grid; gap: 10px; align-content: start; min-width: 133px; }
.footer-nav a { color: var(--ink-400); line-height: 1.6; transition: color .2s ease; }
.footer-nav a:hover { color: var(--ink-900); }
.site-footer__copy {
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-300);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel__track { transition: none; }
  .site-nav, .site-nav a { transition: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1099px) {
  .hero-bg { left: auto; right: -900px; }
  .project-card__media { flex-basis: 42%; }
}

/* ---------- Mobile ---------- */
@media (max-width: 809px) {
  :root { --gutter: 20px; }
  .hero-bg { display: none; }
  .site-header > .site-header__inner > .btn--outline { display: none; }
  .menu-toggle { display: block; }
  .site-header__inner { justify-content: flex-end; padding: 16px 20px; }
  .site-header.is-open { background: var(--white); }

  /* Menu panel slides down from under the header */
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px 20px 24px;
    background: var(--white);
    border-bottom: .5px dotted var(--line);
    box-shadow: 0 16px 24px -20px rgba(26, 26, 26, .25);
    clip-path: inset(0 0 100% 0);
    transform: translateY(-12px);
    visibility: hidden;
    transition: clip-path .4s cubic-bezier(.2, .8, .2, 1), transform .4s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .4s;
  }
  .site-header.is-open .site-nav {
    clip-path: inset(0 0 -40px 0);
    transform: none;
    visibility: visible;
    transition: clip-path .45s cubic-bezier(.2, .8, .2, 1), transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s;
  }
  .site-nav a {
    font-size: 16px;
    line-height: 1.6;
    padding: 12px 0;
    color: var(--ink-600);
    border-bottom: .5px solid var(--line-faint);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
  }
  .site-header.is-open .site-nav a {
    opacity: 1;
    transform: none;
    transition: opacity .35s ease calc(.08s + var(--i, 0) * .05s), transform .35s cubic-bezier(.2, .8, .2, 1) calc(.08s + var(--i, 0) * .05s), color .2s ease;
  }
  .site-nav a:nth-child(1) { --i: 0; }
  .site-nav a:nth-child(2) { --i: 1; }
  .site-nav a:nth-child(3) { --i: 2; }
  .site-nav a:nth-child(4) { --i: 3; }
  .site-nav a:nth-child(5) { --i: 4; }
  .site-nav .site-nav__cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 16px;
    padding: 10px 16px;
    border-bottom: 0;
    color: var(--white);
  }

  .hero { padding: 64px 0; }
  .project-card { flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; }
  .project-card__media { flex: none; width: 100%; border-radius: 0; }
  .project-card__body { padding: 24px; gap: 24px; }
  .project-card__title { font-size: 20px; }
  .project-card__desc { font-size: 18px; line-height: 1.7; }

  .carousel__slide { flex-basis: 100%; }
  .carousel__btn--prev { left: -8px; }
  .carousel__btn--next { right: -8px; }

  .job { grid-template-columns: 1fr; gap: 12px; }
  .job__meta { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .job__meta p { width: auto; }
  .job__meta p + p { margin-top: 0; }
  .achievements { padding: 16px; }

  .site-footer__row { flex-direction: column; gap: 40px; }
  .cta__title { font-size: 32px; }
}

/* =========================================================
   Case-study pages
   ========================================================= */
.page-case { background: var(--dark-bg); }
.page-case .site-header:not(.is-scrolled):not(.is-open) { background: var(--dark-bg); }
.page-case .site-header:not(.is-scrolled):not(.is-open) .site-nav a { color: var(--ink-600); }
.page-case .site-header:not(.is-scrolled):not(.is-open) .site-nav a:hover { color: var(--white); }
.page-case .site-header:not(.is-scrolled):not(.is-open) .menu-toggle span { background: var(--ink-600); }

.cs-cover { position: relative; overflow: hidden; }
.cs-cover img { width: 100%; height: 100%; object-fit: cover; }

.cs-band { position: relative; }
.cs-band > .container { --gap: inherit; }

.cs-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap, 0px);
  width: 100%;
}
.cs-stack > * { width: 100%; }
.cs-stack.is-start { align-items: flex-start; }
.cs-row {
  display: flex;
  gap: var(--gap, 0px);
  width: 100%;
}
.cs-col { min-width: 0; display: flex; flex-direction: column; }
.cs-col > * { width: 100%; }
.cs-col > .cs-img { align-self: center; }
.cs-box { border: var(--bd, 0 solid transparent); }
a.cs-box { transition: opacity .2s ease; width: auto !important; max-width: none !important; align-self: flex-start; white-space: nowrap; }
a.cs-box:hover { opacity: .85; }

.cs-img { display: block; width: 100%; height: auto; max-width: 100%; }

.cs-band p, .cs-band li { overflow-wrap: break-word; }
.cs-band ul, .cs-band ol { padding-left: 24px; }
.cs-band a:not(.btn):not(.cs-box):not(.other-card) { text-decoration: underline; text-underline-offset: 3px; }

.t-display { font-size: 40px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
.t-h1 { font-size: 32px; font-weight: 800; line-height: 1.4; }
.t-h2 { font-size: 24px; font-weight: 700; line-height: 1.4; }
.t-label { font-size: 16px; font-weight: 700; line-height: 1.2; }
.t-body { font-size: 16px; font-weight: 500; line-height: 2; }
.t-h1-sm { font-size: 28px; font-weight: 800; line-height: 1.4; }
.t-h3 { font-size: 20px; font-weight: 700; line-height: 1.4; }
.t-text { font-size: 16px; font-weight: 400; line-height: 1.8; }
.t-text-sm { font-size: 16px; font-weight: 400; line-height: 1.6; }
.is-center { text-align: center; }

/* Other works */
.other-works { padding: 40px 0 80px; }
.other-works .container { display: grid; gap: 32px; max-width: 1228px; }
.other-works .t-label { color: var(--white); }
.other-card {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 48px;
  border-radius: 32px;
  background: #222;
  box-shadow: inset 0 0 0 1px #333;
  transition: transform .3s ease, box-shadow .3s ease;
}
.other-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #444; }
.other-card__media { flex: 0 0 538px; aspect-ratio: 538 / 416; border-radius: 20px; overflow: hidden; }
.other-card__media img { width: 100%; height: 100%; object-fit: cover; }
.other-card__body { display: grid; gap: 16px; justify-items: start; }
.other-card .t-h2 { color: var(--white); }
.other-card .t-body { color: var(--line); }
.other-card .btn { margin-top: 8px; box-shadow: inset 0 0 0 1px #3a3a3a; }

@media (max-width: 1099px) {
  .other-card__media { flex-basis: 45%; }
}

@media (max-width: 809px) {
  .cs-band { padding-left: 0; padding-right: 0; }
  .cs-band[style] { padding-top: 56px !important; padding-bottom: 56px !important; }
  .cs-cover { height: 200px !important; }
  .cs-row { flex-direction: column; gap: min(var(--gap, 0px), 24px); }
  .cs-col { flex: none !important; }
  div.cs-box[style*="padding"] { padding: 20px !important; }
  .cs-row--icon { flex-direction: row; align-items: flex-start; }
  .cs-row--icon > .cs-col:first-child { flex: 0 0 48px !important; }
  .cs-row--icon > .cs-col + .cs-col { flex: 1 1 0 !important; }
  .cs-row--icon .t-h2 { font-size: 18px; }
  .cs-row > .cs-col > .cs-img { width: 100% !important; }
  .cs-row--icon > .cs-col > .cs-img { width: 48px !important; }
  .t-display { font-size: 30px; }
  .t-h1 { font-size: 24px; }
  .t-h2 { font-size: 20px; }
  .t-h1-sm { font-size: 22px; }
  .t-h3 { font-size: 18px; }
  .t-body { line-height: 1.8; }

  .other-card { flex-direction: column; align-items: stretch; gap: 24px; padding: 20px; border-radius: 24px; }
  .other-card__media { flex: none; width: 100%; }
}

/* =========================================================
   Password-protected case studies (preview + unlock card)
   ========================================================= */
.cs-band.is-peek { max-height: 400px; overflow: hidden; }
.cs-band.is-peek::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(rgba(255, 255, 255, 0), #ffffff 90%);
  pointer-events: none;
}

.lock-gate {
  position: relative;
  z-index: 1;
  margin-top: -48px;
  padding: 0 0 64px;
  background: linear-gradient(transparent 48px, #ffffff 48px);
}
.lock-gate > .container { max-width: calc(920px + var(--gutter) * 2); }
.lock-card {
  display: grid;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -28px rgba(26, 26, 26, .18);
}
.lock-card__head { display: flex; gap: 16px; align-items: flex-start; }
.lock-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: #f3f6fb;
  color: var(--ink-700);
}
.lock-card__title { font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--ink-700); }
.lock-card__text { margin-top: 4px; line-height: 1.8; color: var(--ink-400); }
.lock-card__text a {
  color: var(--ink-700);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lock-card__text a:hover { color: var(--ink-900); }
.lock-card__form { display: flex; gap: 8px; max-width: 480px; margin-left: 56px; }
.lock-card__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--white);
  color: var(--ink-700);
  font: inherit;
  font-size: 16px;
  transition: box-shadow .2s ease;
}
.lock-card__input::placeholder { color: var(--ink-300); }
.lock-card__input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink-700); }
.lock-card__input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #d93025; }
.lock-card__form .btn { height: 40px; padding: 0 16px; border: 0; cursor: pointer; }
.lock-card__meta { margin-left: 56px; font-size: 14px; line-height: 1.5; color: var(--ink-300); }
.lock-card__meta.is-error { color: #d93025; }

@media (max-width: 809px) {
  .cs-band.is-peek { max-height: 520px; }
  .lock-card { padding: 20px; gap: 16px; }
  .lock-card__head { flex-direction: column; gap: 12px; }
  .lock-card__title { font-size: 18px; }
  .lock-card__form, .lock-card__meta { margin-left: 0; }
}

/* =========================================================
   Homepage hero: sky + plant-a-flower grate
   ========================================================= */
/* The sky runs under the sticky header and eases into the white page */
.hero--sky {
  margin-top: calc(-1 * var(--header-h));
  padding: calc(120px + var(--header-h)) 0 96px;
  overflow: hidden;
  background: linear-gradient(180deg,
    #7cc6f2 0%, #7ec7f2 8.3%, #85caf3 16.7%, #8fcef4 25%, #9dd4f5 33.3%,
    #addbf7 41.7%, #bee2f8 50%, #ceeafa 58.3%, #def1fc 66.7%, #ecf7fd 75%,
    #f6fbfe 83.3%, #fdfeff 91.7%, #ffffff 100%);
}
.hero--sky {
  --navy: #14294a;        /* logo, bold words, links */
  --navy-text: #2d4566;   /* description */
  --navy-muted: #5a7393;  /* small helper text */
}
.hero--sky > .container { position: relative; z-index: 1; }
.hero--sky .hero__logo { color: var(--navy); }
.hero--sky .hero__intro { color: var(--navy-text); }
.hero--sky .hero__intro strong,
.hero--sky .hero__intro a { color: var(--navy); }
.hero--sky .hero__intro a:hover { color: #0a1a33; }

.page-home .site-header:not(.is-scrolled):not(.is-open) .site-nav a { color: #3a5578; }
.page-home .site-header:not(.is-scrolled):not(.is-open) .site-nav a:hover { color: #14294a; }
.page-home .site-header:not(.is-scrolled):not(.is-open) .menu-toggle span { background: #3a5578; }


.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute;
  left: 0;
  width: 260px;
  height: 64px;
  border-radius: 999px;
  background: #ffffff;
  opacity: .75;
  filter: blur(14px);
  animation: cloud-drift var(--dur, 140s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}
.cloud::before { width: 120px; height: 100px; left: 46px; top: -46px; }
.cloud::after { width: 90px; height: 80px; left: 128px; top: -30px; }
.cloud--1 { top: 120px; --dur: 150s; --delay: -40s; }
.cloud--2 { top: 210px; --dur: 190s; --delay: -120s; width: 180px; height: 48px; opacity: .6; }
.cloud--3 { top: 70px;  --dur: 170s; --delay: -95s; width: 300px; }
.cloud--4 { top: 300px; --dur: 210s; --delay: -10s; width: 200px; opacity: .5; }
@keyframes cloud-drift {
  from { transform: translateX(-360px); }
  to   { transform: translateX(calc(100vw + 60px)); }
}

/* Garden: flowers grow out of one long grate slot */
.garden { margin-top: 40px; }
.garden__bed {
  position: relative;
  height: 230px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.garden__bed:focus-visible .garden__grate { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #3f6a8a; }
.garden__grate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 70%, rgba(150, 92, 52, .35), transparent 22%),
    radial-gradient(circle at 63% 30%, rgba(150, 92, 52, .25), transparent 18%),
    radial-gradient(circle at 88% 60%, rgba(70, 64, 56, .35), transparent 16%),
    linear-gradient(180deg, #91877a 0%, #7d7366 45%, #685f54 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .14), 0 6px 14px -8px rgba(60, 50, 40, .35);
}
.garden__slot {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 9px;
  bottom: 7px;
  border-radius: 7px;
  background: linear-gradient(180deg, #121110, #2a2722);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
/* Stems disappear into the dark of the slot */
.garden__shade {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 9px;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, rgba(26, 24, 21, 0), #1c1a17 70%);
  pointer-events: none;
  z-index: 2;
}
.garden__flowers {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  bottom: 14px;
  z-index: 1;
}
.garden__ghost {
  position: absolute;
  bottom: 9px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, .9);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 3;
}
.garden__bed.is-hover .garden__ghost { opacity: 1; transform: scale(1); }
.garden__status {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy-muted, var(--ink-400));
}

.flower {
  position: absolute;
  bottom: 0;
  width: 60px;
  margin-left: -30px;
  transform-origin: 50% 100%;
  animation: flower-sway var(--sway, 4s) ease-in-out var(--sway-delay, 0s) infinite alternate;
  transition: opacity .6s ease, transform .6s ease;
}
.flower svg { display: block; overflow: visible; }
.tuft {
  position: absolute;
  bottom: -4px;
  width: 28px;
  margin-left: -14px;
  transform-origin: 50% 100%;
  pointer-events: none;
}
.tuft svg { display: block; }
.flower.is-gone { opacity: 0; transform: translateY(10px) scale(.9); }
@keyframes flower-sway {
  from { rotate: calc(var(--tilt, 0deg) - 2deg); }
  to   { rotate: calc(var(--tilt, 0deg) + 2deg); }
}
.flower.is-growing .flower__stem {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: stem-grow .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) forwards;
}
.flower.is-growing .flower__leaf,
.flower.is-growing .flower__head {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transform: scale(0);
}
.flower.is-growing .flower__leaf { animation: leaf-pop .45s ease-out calc(var(--d, 0s) + .45s) forwards; }
.flower.is-growing .flower__head { animation: head-bloom .6s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .7s) forwards; }
@keyframes stem-grow { to { stroke-dashoffset: 0; } }
@keyframes leaf-pop { to { transform: scale(1); } }
@keyframes head-bloom {
  from { transform: scale(0) rotate(-70deg); }
  to   { transform: scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .flower { animation: none; }
  .flower.is-growing .flower__stem,
  .flower.is-growing .flower__leaf,
  .flower.is-growing .flower__head { animation: none; stroke-dashoffset: 0; transform: none; }
}

@media (max-width: 809px) {
  .hero--sky { padding: calc(64px + var(--header-h)) 0 72px; }
  .garden__bed { height: 190px; }
}
