/* Colimo — site styles. Palette from Colimo/Design/Theme.swift (DECISIONS D04): cream, night ink, pine,
   sage, apricot, honey; never pure black, never red. Type: the system's rounded face (SF Pro Rounded on
   Apple devices, like the app), no downloaded font. Contrast ratios: ink/cream 10.7, inkSoft/cream 5.7,
   cream/pine 6.0, honeyDeep/cream 4.9. Terracotta and sage are never used for text. */

:root {
  --cream: #fbf4e6;
  --cream-deep: #f1e3c6;
  --paper: #fffbf2;
  --ink: #2e3a3f;
  --ink-soft: #56636a;
  --pine: #3b6649;
  --pine-deep: #2b4e37;
  --sage: #86b07b;
  --sage-deep: #5e8c57;
  --pistachio: #c7dda4;
  --apricot: #f2a766;
  --terracotta: #c46f48;
  --honey: #e5b23f;
  --honey-deep: #8a6414;
  --sky: #cfe7ec;
  --sky-low: #f7e9cf;
  --soil: #b48863;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(46, 58, 63, 0.12);
  --wrap: 1120px;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, Manjari,
    "Arial Rounded MT", "Arial Rounded MT Bold", Calibri, source-sans-pro, system-ui, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

figure {
  margin: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--pine);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--pine-deep);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  margin: 0 0 0.4em;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin: 0 0 0.5em;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.35em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--pine);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  color: var(--cream);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 244, 230, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--cream-deep);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 22.5%;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--cream-deep);
}

.site-nav .lang {
  border: 2px solid var(--cream-deep);
}

@media (max-width: 760px) {
  .site-nav .optional {
    display: none;
  }
}

/* Buttons and store badge */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--pine);
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--pine-deep);
  color: var(--cream);
}

.btn--quiet {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--cream-deep);
}

.btn--quiet:hover {
  background: var(--cream-deep);
  color: var(--ink);
}

.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 9px;
}

/* Apple's badge, untouched: no shadow, no recolouring, only its height (40 px minimum). */
.store-badge img {
  height: 54px;
  width: auto;
}

/* English page, until Apple's official English badge is added (Website/README.md). */
.store-soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 6px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.store-soon small {
  font-weight: 600;
  opacity: 0.85;
}

.store-soon:hover {
  color: var(--cream);
}

.store-note {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Hero */

.hero {
  position: relative;
  /* The potager's sky colours (Theme.swift daySky → daySkyLow); the painted sky, with its sun, stays in the
     demo, so that the hero's capture never stands in front of a second sun. */
  background: linear-gradient(180deg, var(--sky) 0%, #e3eee6 55%, var(--sky-low) 100%);
  padding-top: clamp(28px, 6vw, 72px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 34em;
}

.hero .store {
  margin-top: 26px;
}

.hero-shot {
  justify-self: center;
  width: min(290px, 70vw);
}

.shot {
  border-radius: 34px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(46, 58, 63, 0.08);
  background: var(--cream-deep);
  aspect-ratio: 1320 / 2868;
  width: 100%;
  object-fit: cover;
}

/* Shown in place of a capture that is not built yet (Media/ missing): never a broken image. */
.shot.is-missing {
  visibility: hidden;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-shot {
    width: min(250px, 66vw);
    margin-bottom: 20px;
  }
}

/* The garden at the foot of the hero: the free garden's painted bands, still, Colimo on the path. */
.garden-strip {
  position: relative;
  height: 230px;
  margin-top: -70px;
  z-index: 1;
}

.garden-strip .band {
  position: absolute;
  left: 0;
  right: 0;
  background-repeat: repeat-x;
  background-size: auto 100%;
}

.garden-strip .far {
  bottom: 120px;
  height: 120px;
  background-image: url("/assets/img/scene/far-hills.webp");
}

.garden-strip .near {
  bottom: 96px;
  height: 90px;
  background-image: url("/assets/img/scene/near-hills.webp");
  background-position: 240px 0;
}

.garden-strip .ground {
  bottom: 0;
  height: 126px;
  background-image: url("/assets/img/scene/ground.webp");
}

/* The soil melts into the page instead of stopping on a straight line. */
.garden-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(rgba(251, 244, 230, 0), var(--cream));
}

.garden-strip .snail {
  position: absolute;
  left: calc(50% - 150px);
  bottom: 96px;
  width: 170px;
}

.garden-strip .flower {
  position: absolute;
  bottom: 104px;
  width: 64px;
}

.garden-strip .flower {
  left: calc(50% + 60px);
}

@media (max-width: 820px) {
  .garden-strip {
    margin-top: 0;
    height: 200px;
  }

  .garden-strip .snail {
    width: 130px;
    left: calc(50% - 150px);
  }

  .garden-strip .flower {
    width: 54px;
    left: calc(50% + 10px);
  }

}

/* Sections */

.section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section--paper {
  background: var(--paper);
}

.section--sage {
  background: linear-gradient(var(--pistachio), #d9e8c1);
}

.section-head {
  max-width: 44em;
  margin-bottom: 36px;
}

.section-head p {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: 10px;
}

.cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 1px 0 var(--cream-deep), 0 6px 18px rgba(46, 58, 63, 0.06);
}

.section--paper .card {
  background: var(--cream);
}

.card img.art {
  width: 150px;
  margin: -6px auto 14px;
}

.card p:last-child {
  margin-bottom: 0;
}

.contrast {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
}

.contrast .card {
  text-align: center;
}

.contrast .card img {
  width: 190px;
  margin: 0 auto 12px;
}

.contrast .card.calm {
  background: linear-gradient(#eef6e4, var(--paper));
}

.contrast .card.loud {
  background: linear-gradient(#fbecd2, var(--paper));
}

.pullquote {
  margin: 30px auto 0;
  max-width: 36em;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

@media (max-width: 680px) {
  .contrast {
    grid-template-columns: 1fr;
  }
}

.steps {
  counter-reset: step;
}

.steps .card {
  position: relative;
  text-align: center;
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--cream);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.uses .card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uses .tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pistachio);
  color: var(--ink);
}

.facts {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.facts li {
  background: var(--cream);
  border-radius: 20px;
  padding: 20px 22px;
}

.facts strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* Demo */

.demo {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .demo {
    grid-template-columns: 1fr;
  }
}

.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: url("/assets/img/scene/sky.webp") center 30% / cover no-repeat, var(--sky);
  box-shadow: var(--shadow);
  isolation: isolate;
}

@media (max-width: 560px) {
  .stage {
    aspect-ratio: 4 / 3.6;
  }
}

/* The session's layout (WalkScene.swift, WalkLayout): the ground line at 62 % of the height, Colimo
   min(40 % of the width, 190 pt) wide with his head in the middle, flowers 62 % of his width. */
.stage {
  container-type: size;
}

.stage > * {
  --mw: min(40cqw, 190px);
  --gy: 62cqh;
  --fw: calc(var(--mw) * 0.62);
  --gh: max(calc(var(--mw) * 2.4), calc((100cqh - var(--gy) + 8px) / 0.85));
}

.stage .band {
  position: absolute;
  left: 0;
  width: 100%;
  background-repeat: repeat-x;
  background-size: auto 100%;
  will-change: transform;
}

.stage .band.far {
  top: calc(var(--gy) * 0.5);
  height: calc(var(--gy) * 0.5 + 10px);
  background-image: url("/assets/img/scene/far-hills.webp");
}

.stage .band.near {
  top: calc(var(--gy) * 0.68);
  height: calc(var(--gy) * 0.32 + 10px);
  background-image: url("/assets/img/scene/near-hills.webp");
}

.stage .band.ground {
  top: calc(var(--gy) - var(--gh) * 0.15);
  height: var(--gh);
  background-image: url("/assets/img/scene/ground.webp");
}

.stage .flowers {
  position: absolute;
  inset: 0;
}

.stage .flower {
  position: absolute;
  left: 0;
  top: calc(var(--gy) - var(--fw) * 1.12);
  width: var(--fw);
  height: calc(var(--fw) * 1.2);
  object-fit: contain;
  object-position: center bottom;
  will-change: transform, opacity;
}

.stage .snail {
  position: absolute;
  width: var(--mw);
  left: calc(50cqw - var(--mw) * 0.86);
  top: calc(var(--gy) - var(--mw) * 0.784);
}

.stage .snail.is-walking {
  animation: gait 1.6s ease-in-out infinite;
  transform-origin: 70% 100%;
}

@keyframes gait {
  0%,
  100% {
    rotate: 0deg;
  }
  50% {
    rotate: -2.5deg;
  }
}

.stage .trail {
  position: absolute;
  left: 0;
  top: calc(var(--gy) - 5px);
  width: calc(50cqw - var(--mw) * 0.36);
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.55);
}

.stage .bouquet {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(251, 244, 230, 0.9);
  font-weight: 800;
  font-size: 1.35rem;
}

.stage .bouquet img {
  width: 34px;
  height: 34px;
}

.stage .bouquet.is-new {
  animation: pop 0.5s ease-out;
}

@keyframes pop {
  40% {
    scale: 1.15;
  }
}

/* The level badge of the session (BreezeGauge.swift): four sizes and colours, capped above the threshold. */
.stage .badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(251, 244, 230, 0.85);
  display: grid;
  place-items: center;
}

.stage .badge span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sage);
  scale: 0.25;
  transition: scale 0.35s, background-color 0.35s;
}

.stage .badge[data-breeze="light"] span {
  background: var(--sage-deep);
  scale: 0.5;
}

.stage .badge[data-breeze="rising"] span {
  background: var(--honey);
  scale: 0.75;
}

.stage .badge[data-breeze="strong"] span {
  background: var(--terracotta);
  scale: 1;
}

.demo-panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
}

.demo-status {
  min-height: 3.2em;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.demo-panel label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.noise {
  width: 100%;
  margin: 6px 0 4px;
  accent-color: var(--pine);
  height: 44px;
}

.noise-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 18px;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-note {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.btn[aria-pressed="false"] .on,
.btn[aria-pressed="true"] .off {
  display: none;
}

/* Gallery */

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 62vw);
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 22px;
  margin: 0;
  list-style: none;
}

.gallery li {
  scroll-snap-align: start;
}

@media (min-width: 1100px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }
}

.gallery figcaption,
.video figcaption {
  margin-top: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--ink-soft);
}

.media-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
}

.video video {
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: var(--cream-deep);
  aspect-ratio: 1320 / 2868;
  width: 100%;
  object-fit: cover;
}

.video video.is-missing {
  visibility: hidden;
}

@media (max-width: 760px) {
  .media-row {
    grid-template-columns: 1fr;
  }

  .video {
    width: min(260px, 70vw);
    margin: 0 auto;
  }
}

/* Price */

.plans {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  border: 2px solid var(--cream-deep);
}

.plan--complete {
  border-color: var(--sage);
  background: linear-gradient(#f3f8ea, var(--paper) 40%);
}

.plan .price {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.plan .price small {
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.plan ul {
  padding-left: 1.2em;
  margin: 16px 0 0;
}

.plan li {
  margin-bottom: 6px;
}

.gardens {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
}

.gardens img {
  width: 48px;
}

.motto {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 30px 0 6px;
}

.fine {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* FAQ */

.faq {
  max-width: 820px;
}

.faq details {
  background: var(--cream);
  border-radius: 18px;
  margin-bottom: 12px;
  padding: 0 22px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.08rem;
  padding: 18px 28px 18px 0;
  position: relative;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.5rem;
  color: var(--pine);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > div {
  padding-bottom: 14px;
}

/* Closing call */

.closing {
  text-align: center;
}

.closing img {
  width: 200px;
  margin: 0 auto 8px;
}

.closing .store {
  justify-content: center;
  margin-top: 18px;
}

/* Footer */

.site-footer {
  background: var(--pine-deep);
  color: var(--cream);
  padding: 40px 0 34px;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--cream);
}

.site-footer .brand {
  color: var(--cream);
}

.site-footer .wrap {
  display: grid;
  gap: 20px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer p {
  margin: 0;
  opacity: 0.92;
}

/* Legal pages */

.legal-hero {
  background: linear-gradient(var(--sky), var(--sky-low));
  padding: 40px 0 28px;
}

.legal-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
  margin-bottom: 4px;
}

.legal-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.legal {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
  padding: 36px 0 70px;
}

.legal h2 {
  font-size: 1.45rem;
  margin-top: 1.8em;
}

.legal h3 {
  font-size: 1.12rem;
  margin-top: 1.4em;
}

.legal li {
  margin-bottom: 0.45em;
}

.legal .summary {
  background: var(--paper);
  border-left: 6px solid var(--sage);
  border-radius: 16px;
  padding: 18px 22px;
  font-weight: 700;
}

.legal .summary ul {
  font-weight: 400;
  margin: 10px 0 0;
}

.legal table {
  border-collapse: collapse;
  width: 100%;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--cream-deep);
}

.legal th {
  width: 36%;
}

.lang-switch {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 18px;
}

/* Something to fill in before going live (Website/README.md). Never shipped. */
.todo {
  background: #ffe7a6;
  outline: 2px dashed var(--honey-deep);
  padding: 0 4px;
  border-radius: 4px;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 140%;
  opacity: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--cream);
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 700;
  max-width: min(92vw, 460px);
  text-align: center;
  transition: translate 0.3s, opacity 0.3s;
  pointer-events: none;
}

.toast.is-shown {
  translate: -50% 0;
  opacity: 1;
}

/* Platforms (Android later): elements with data-show="ios android all" only show on the listed platforms.
   Only iOS exists today; Website/README.md says how to switch this on. */
[data-platform="ios"] [data-show]:not([data-show~="ios"]),
[data-platform="android"] [data-show]:not([data-show~="android"]),
[data-platform="all"] [data-show]:not([data-show~="all"]) {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
