/*
  /projects/fungelo - page styles, built on /projects/base.css.
  Fungelo's own dark look: spruce-black ground, light fern accent, faint contour
  rings as on the cover, Figtree throughout. Warm colours appear only in the
  activity scale, where they mean mushroom activity.
*/

/* Fungelo's dark palette over base.css's tokens. */
:root {
  --stage: #0c1410;
  --shot: #08100c;
  --card: #111c16;
  --raise: #17241d;
  --line: #22332a;
  --line-hi: #314a3c;
  --fg: #eef4ee;
  --sub: #eef4ee;
  --muted: #9cb2a3;
  /* Decoration only: too faint for text. */
  --faint: #4a5f52;
  --accent: #9bd08a;
  --accent-text: #9bd08a;
  --on-accent: #0c1410;
  --accent-soft: rgba(155, 208, 138, 0.1);

  /* Figtree everywhere, the small labels included. */
  --f-text: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-mono: var(--f-text);

  /* Activity, very low to exceptional. Used for the scale and nothing else. */
  --act-1: #e8e3c9;
  --act-2: #d4d5a7;
  --act-3: #dbb563;
  --act-4: #d68635;
  --act-5: #bc5a29;
  --act-6: #913727;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(155, 208, 138, 0.3);
  color: var(--fg);
}

.site-header {
  font-size: var(--s-sm);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 18px;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

/* Contour rings, light fern at 10%, fading out from behind the phone. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  --rings-x: 50%;
  --rings-y: 78%;
  background: repeating-radial-gradient(
    circle at var(--rings-x) var(--rings-y),
    transparent 0 25px,
    rgba(155, 208, 138, 0.1) 25px 26px
  );
  -webkit-mask-image: radial-gradient(circle at var(--rings-x) var(--rings-y), #000 0, #000 18%, transparent 62%);
  mask-image: radial-gradient(circle at var(--rings-x) var(--rings-y), #000 0, #000 18%, transparent 62%);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--s-sm);
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.hero__inner {
  display: grid;
  gap: clamp(3rem, 8vw, 4rem);
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
}

.hero__text {
  max-width: 38rem;
}

.hero__title {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

/* The brand lockup, small drawing, dark colourway; a quarter of the mark's height
   stays clear around it. */
.hero__lockup {
  width: auto;
  height: 44px;
}

.hero__line {
  max-width: 21ch;
  font-size: var(--s-hero);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__copy {
  max-width: 32rem;
  margin-top: 18px;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--muted);
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: var(--s-sm);
  font-weight: 500;
  color: var(--fg);
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  border-radius: var(--r-pill);
  padding-inline: 20px;
}

.btn--primary:hover {
  background: #b6deaa;
}

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn:focus-visible {
  border-radius: var(--r-pill);
}

.hero__shot {
  justify-self: center;
  width: min(66vw, 280px);
}

.hero__shot figcaption,
.gallery__note {
  margin-top: 14px;
  font-size: var(--s-xs);
  color: var(--muted);
  text-align: center;
}

@media (min-width: 1024px) {
  .hero::before {
    --rings-x: 76%;
    --rings-y: 52%;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 4rem;
  }

  .hero__shot {
    width: 100%;
    max-width: 320px;
  }

  .hero__lockup {
    height: 52px;
  }
}

/* ---------- Phone frames ---------- */

.phone {
  overflow: hidden;
  border: 1px solid var(--line-hi);
  border-radius: 28px;
  background: var(--shot);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.phone img {
  width: 100%;
  height: auto;
}

/* ---------- Sections ---------- */

.sec {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
}

.sec--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.sec__head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.sec__head h2 {
  margin-bottom: 14px;
}

.sec__head h2:last-child {
  margin-bottom: 0;
}

.sec__lede {
  font-size: var(--s-md);
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .sec__split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: start;
  }

  .sec__split .sec__head {
    margin-bottom: 0;
  }
}

h3 {
  font-size: var(--s-md);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- What it does: three steps on a hairline ---------- */

.flow {
  position: relative;
  display: grid;
  gap: 28px;
}

.flow::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-hi), rgba(155, 208, 138, 0.55));
}

.flow__step {
  position: relative;
  padding-left: 32px;
}

.flow__step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--stage);
}

.flow__step:last-child::before {
  background: var(--accent);
}

.flow__step p {
  max-width: 24rem;
  margin-top: 6px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .flow::before {
    top: 4px;
    bottom: auto;
    left: 4px;
    right: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, var(--line-hi), rgba(155, 208, 138, 0.55));
  }

  .flow__step {
    padding-left: 0;
    padding-top: 30px;
  }

  .flow__step::before {
    top: 0;
  }
}

/* The activity scale: the one place the warm colours appear. */
.scale {
  max-width: 26rem;
  margin-top: clamp(3rem, 6vw, 4rem);
}

.scale__bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}

.scale__bar span {
  height: 8px;
  border-radius: 2px;
}

.scale__bar span:nth-child(1) { background: var(--act-1); border-radius: var(--r-pill) 2px 2px var(--r-pill); }
.scale__bar span:nth-child(2) { background: var(--act-2); }
.scale__bar span:nth-child(3) { background: var(--act-3); }
.scale__bar span:nth-child(4) { background: var(--act-4); }
.scale__bar span:nth-child(5) { background: var(--act-5); }
.scale__bar span:nth-child(6) { background: var(--act-6); border-radius: 2px var(--r-pill) var(--r-pill) 2px; }

.scale__ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: var(--s-xs);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.scale figcaption {
  margin-top: 10px;
  font-size: var(--s-sm);
  color: var(--fg);
}

/* ---------- Who it's for ---------- */

.who {
  display: grid;
  gap: 0;
}

.who li {
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.who li:last-child {
  border-bottom: 1px solid var(--line);
}

.who p {
  margin-top: 4px;
  color: var(--muted);
}

/* ---------- Worth a closer look ---------- */

.worth__row {
  display: grid;
  gap: 8px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.worth__row:last-child {
  border-bottom: 1px solid var(--line);
}

.worth__row p {
  max-width: 40rem;
  color: var(--muted);
}

.worth__body {
  display: grid;
  gap: 10px;
}

.worth__row a {
  color: var(--accent-text);
}

.worth__row a:hover {
  color: var(--fg);
}

@media (min-width: 768px) {
  .worth__row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: baseline;
  }
}

/* ---------- In the app ---------- */

/* Phones: a swipeable row on small screens, one row of five on wide ones. */
.gallery__scroller {
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
}

.gallery__scroller:focus-visible {
  outline-offset: -2px;
}

.gallery__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 240px);
  gap: 20px;
}

.gallery__item {
  scroll-snap-align: start;
}

.gallery__cap {
  margin-top: 14px;
  font-size: var(--s-sm);
  color: var(--fg);
}

.gallery__note {
  margin-top: 4px;
  text-align: left;
}

@media (min-width: 1024px) {
  .gallery__scroller {
    margin-inline: 0;
    padding: 4px 0 32px;
    overflow: visible;
  }

  .gallery__list {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ---------- Call to action ---------- */

.cta {
  padding-block: clamp(4rem, 10vw, 8rem) clamp(5rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
}

.cta__inner > * {
  max-width: 40rem;
}

.cta__line {
  width: 64px;
  margin-bottom: 32px;
  background: linear-gradient(90deg, rgba(155, 208, 138, 0.3), var(--accent));
}

.cta h2 {
  margin-bottom: 14px;
}

.cta p {
  color: var(--muted);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.cta__back {
  font-size: var(--s-sm);
  color: var(--muted);
}

.cta__back:hover {
  color: var(--fg);
}
