/* The home page (0.50), on top of site.css's colours and text. The colours
   are the app's, from packages/tokens: change them there first. Nothing
   moves, as the website keeps still (0.48). */

:root {
  /* lagoon.660, the app icon and Today's cover. */
  --teal: #0b3f47;
  --on-teal: #ffffff;
  --on-teal-muted: #bfedef;
  /* action.subtle and action.onSubtle. */
  --subtle: #d9eeee;
  --on-subtle: #0b3f47;
  /* red.360: the gaps picture's panel, as gaps in care are red in the app. */
  --urgent-tint: #e05a50;
  --store-bg: #0c2427;
  --store-ink: #ffffff;
  /* The carers' colours, as in the logo. */
  --carer-1: #2a78d6;
  --carer-2: #e05e29;
  --carer-3: #009a67;
  --carer-4: #4a3aa7;
  --glow: 0.16;
  /* The app's soft shadows: cards, then buttons, then floating things. */
  --shadow-card: 0 1px 2px rgba(12, 36, 39, 0.05), 0 4px 16px rgba(12, 36, 39, 0.06);
  --shadow-button: 0 1px 2px rgba(12, 36, 39, 0.12), 0 3px 8px rgba(12, 36, 39, 0.14);
  --shadow-float: 0 2px 6px rgba(12, 36, 39, 0.14), 0 12px 32px rgba(12, 36, 39, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #0b3f47;
    --on-teal-muted: #bfedef;
    --subtle: #163a3f;
    --on-subtle: #bfedef;
    --store-bg: #e6f4f4;
    --store-ink: #061416;
    --carer-1: #7fb2f0;
    --carer-2: #f29a6e;
    --carer-3: #5fd3a5;
    --carer-4: #b9b0f5;
    --glow: 0.12;
    /* Dark mode has no shadows, as in the app. */
    --shadow-card: none;
    --shadow-button: none;
    --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-contrast: more) {
  :root {
    --subtle: var(--surface);
    --on-subtle: var(--ink);
    --glow: 0;
  }
}

/* Layout ------------------------------------------------------------------ */

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* A narrow section keeps the page's left edge, with a shorter line. */
.narrow > * {
  max-width: 46rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 64rem) {
  .wrap {
    padding-inline: 2rem;
  }
}

.home h1,
.home h2,
.home h3 {
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.home h2 {
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

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

/* Body text wraps without leaving one word on its own line. */
.home p {
  text-wrap: pretty;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 2;
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  min-height: 3rem;
  padding: 0.5rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  box-shadow: var(--shadow-button);
  cursor: pointer;
}

.button-quiet {
  background: var(--subtle);
  color: var(--on-subtle);
}

.button:hover {
  filter: brightness(0.95);
}

/* The header ------------------------------------------------------------- */

.masthead {
  padding-block: 1rem;
}

/* With large text, Sign in moves under the logo rather than squeezing it. */
.masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand {
  min-width: 0;
}

.brand img {
  width: 12.5rem;
  max-width: 100%;
}

.masthead .button {
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .brand img {
    width: 15.35rem;
  }
}

/* Sign in's note, until the web app is here. */
.note {
  max-width: min(26rem, calc(100% - 2rem));
  border: 0;
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-float);
}

.note::backdrop {
  background: rgba(6, 20, 22, 0.45);
}

.note h2 {
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
}

.note p {
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}

/* Browsers too old for pop-ups leave the note out, rather than showing it on
   the page. */
@supports not selector(:popover-open) {
  .note {
    display: none;
  }
}

/* The opening ------------------------------------------------------------ */

.hero {
  padding-block: 1rem 2.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

/* Lets the words shrink to the screen with large text, rather than pushing
   the column past it. */
.hero-grid > * {
  min-width: 0;
}

@media (min-width: 56rem) {
  .hero {
    padding-block: 2rem 4rem;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
  }
}

/* Capped by the screen's width, so "juggling." still fits with large text. */
.home h1 {
  font-size: min(clamp(2.6rem, 1.5rem + 5vw, 4.75rem), 15vw);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

/* In the text colour, as teal is kept for what you can press. */
.home .tagline {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

/* Who it's for, under the name rather than in a label above it: in the text
   colour, between the bold tagline and the softer lede. */
.audience {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3rem);
  max-width: 34rem;
  margin: 0 0 0.75rem;
}

.lede {
  color: var(--ink-muted);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3rem);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.hero-picture {
  margin: 0;
  justify-self: center;
  width: min(100%, 26rem);
}

@media (min-width: 56rem) {
  .hero-picture {
    width: min(100%, 36rem);
  }
}

/* Where the store badges will go -------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: min(10.5rem, 100%);
  min-height: 3.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--store-bg);
  color: var(--store-ink);
  box-shadow: var(--shadow-button);
  line-height: 1.15;
}

.store-logo {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  fill: currentColor;
}

.store-text {
  display: flex;
  flex-direction: column;
}

.store-small {
  font-size: 0.8rem;
  opacity: 0.85;
}

.store-name {
  font-size: 1.25rem;
  font-weight: 700;
}

/* In short --------------------------------------------------------------- */

.promise-list {
  list-style: none;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
  padding-block: 0 2rem;
}

@media (min-width: 52rem) {
  .promise-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-weight: 600;
  line-height: 1.4;
}

.promise-list svg {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.25rem;
  border-radius: 50%;
  background: var(--subtle);
  fill: none;
  stroke: var(--on-subtle);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Why --------------------------------------------------------------------- */

.why {
  padding-block: 2.5rem;
}

.why p {
  color: var(--ink-muted);
  font-size: 1.2rem;
}

/* What it does ------------------------------------------------------------- */

.features {
  padding-block: 1rem 2rem;
}

.feature {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-block: 2rem;
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3.5rem;
    padding-block: 3rem;
  }

  .feature:nth-of-type(even) {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .feature:nth-of-type(even) .feature-words {
    order: 2;
  }
}

.kicker {
  color: var(--action);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.feature h3 {
  font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.4rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}

.feature-words p:not(.kicker) {
  color: var(--ink-muted);
  font-size: 1.15rem;
  max-width: 32rem;
}

/* Each picture sits on a panel lightly tinted with one of the carers'
   colours: an even tint, not a glow. */
.feature-picture {
  --tint: var(--carer-1);
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 1.75rem 1rem;
  border-radius: 2rem;
  background: color-mix(in srgb, var(--tint) calc(var(--glow) * 60%), var(--surface));
  box-shadow: var(--shadow-card);
}

.feature-gaps .feature-picture {
  --tint: var(--urgent-tint);
}

.feature-tell .feature-picture {
  --tint: var(--carer-4);
}

.feature-guides .feature-picture {
  --tint: var(--carer-3);
}

.feature-hours .feature-picture {
  --tint: var(--carer-2);
}

.feature-look .feature-picture {
  --tint: var(--action);
}

.feature-picture img {
  width: 100%;
  max-width: 34rem;
}

/* One phone on its own is tall, so it's narrower. */
.feature-picture img[width='760'] {
  max-width: 18rem;
}

/* Gaps in care is the one thing only All Hands shows, so it gets the full
   width and a bigger picture. */
@media (min-width: 56rem) {
  .feature-spotlight,
  .feature-spotlight:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .feature-spotlight:nth-of-type(even) .feature-words {
    order: 0;
  }

  .feature-spotlight .feature-words p {
    max-width: 40rem;
  }

  .feature-spotlight .feature-picture {
    padding-block: 2.5rem;
  }

  .feature-spotlight .feature-picture img {
    max-width: 52rem;
  }
}

/* Hours and the look come after the scheduling story, side by side. */
.feature-pair {
  display: grid;
}

@media (min-width: 56rem) {
  .feature-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .feature-pair .feature,
  .feature-pair .feature:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 1.5rem;
  }

  .feature-pair .feature:nth-of-type(even) .feature-words {
    order: 0;
  }

  .feature-pair .feature h3 {
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem);
  }

  .feature-pair .feature-picture img {
    max-width: 26rem;
  }

  .feature-pair .feature-picture img[width='760'] {
    max-width: 13.6rem;
  }
}

/* For carers ---------------------------------------------------------------- */

.carers {
  padding-block: 3rem;
  background: var(--subtle);
}

@media (prefers-contrast: more) {
  .carers {
    border-block: 2px solid var(--line);
  }
}

.section-lede {
  color: var(--ink-muted);
  font-size: 1.2rem;
  max-width: 40rem;
}

.cards {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 52rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-item {
  margin: 0;
  padding: 1.4rem 1.4rem 1.2rem;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card-item::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 0.4rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: var(--carer-1);
}

.card-item:nth-child(2)::before {
  background: var(--carer-2);
}

.card-item:nth-child(3)::before {
  background: var(--carer-3);
}

.card-item h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.card-item p {
  color: var(--ink-muted);
  margin: 0;
}

/* On the way -------------------------------------------------------------- */

.next {
  padding-block: 3rem;
}

.next-box {
  border: 2px dashed var(--line);
  border-radius: 1.5rem;
  padding: 1.5rem 1.25rem;
}

@media (min-width: 40rem) {
  .next-box {
    padding: 1.75rem 2rem;
  }
}

.next h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 0.5rem;
}

.next p:not(.kicker) {
  color: var(--ink-muted);
  font-size: 1.15rem;
  margin: 0;
}

/* Coming soon --------------------------------------------------------------- */

.closing {
  background: var(--teal);
  color: var(--on-teal);
  padding-block: 3.5rem;
  text-align: center;
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-mark {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
}

.closing h2 {
  color: inherit;
}

.closing p {
  color: var(--on-teal-muted);
  font-size: 1.15rem;
  max-width: 36rem;
}

.closing .stores {
  justify-content: center;
  margin: 0.75rem 0 1.75rem;
}

.closing .store {
  background: var(--on-teal);
  color: var(--teal);
  text-align: left;
}

.closing .invite {
  font-size: 1rem;
  margin: 0;
}

.closing .invite strong {
  color: var(--on-teal);
}

/* The footer ---------------------------------------------------------------- */

.site-footer {
  margin: 0;
  border: 0;
  padding-block: 1.5rem 2rem;
  color: var(--ink-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer-row p {
  margin: 0;
}

/* Windows' contrast themes draw no backgrounds, so outline what was a
   coloured shape. */
@media (forced-colors: active) {
  .button,
  .store,
  .promise-list li,
  .feature-picture,
  .card-item,
  .note {
    border: 1px solid CanvasText;
  }
}
