/* lorilo.app. Direction: colour chapters. Brand colours and faces come from the app (ui/theme/Theme.kt). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --ink: #12201b;
  --paper: #ffffff;
  --teal: #0e7c63;
  --teal-dark: #0a5c4a;
  --mint: #7fdcc0;
  --mint-pale: #e8fff6;
  --mint-step: #cdebdf;
  --sun: #ffc94d;
  --sun-pale: #fff1c9;
  --coral: #ff8a65;
  --ink-step: #1d302a;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, sans-serif;

  /* The five sizes on the page. */
  --s-hero: clamp(88px, 23vw, 330px);
  --s-head: clamp(40px, 5vw, 80px);
  --s-state: clamp(22px, 2.1vw, 32px);
  --s-body: clamp(18px, 1.4vw, 20px);
  --s-small: 15px;

  --margin: clamp(20px, 2.2vw, 32px);
  --gutter: clamp(16px, 1.7vw, 24px);
  --radius: 14px;
  --section: clamp(96px, 12vw, 176px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--s-body);
  line-height: 1.5;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.c-sun :focus-visible,
.c-mint-pale :focus-visible,
.c-paper :focus-visible,
.c-coral :focus-visible {
  outline-color: var(--ink);
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

/* ---- Chapter colours ---- */

.c-ink { background: var(--ink); color: var(--paper); }
.c-sun { background: var(--sun); color: var(--ink); }
.c-teal { background: var(--teal); color: var(--paper); }
.c-teal-dark { background: var(--teal-dark); color: var(--paper); }
.c-mint-pale { background: var(--mint-pale); color: var(--ink); }
.c-coral { background: var(--coral); color: var(--ink); }
.c-paper { background: var(--paper); color: var(--ink); }

/* ---- Links and the one button ---- */

.link {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--t-hover) ease;
}

/* The folder tab's shape, as the button's top corners. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-body);
  text-decoration: none;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}

.button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .button:hover { background: var(--teal-dark); }
}

/* ---- Top bar ---- */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px var(--margin) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--s-body);
  text-decoration: none;
}

.wordmark img {
  width: 34px;
  height: 34px;
}

.topbar__lang {
  justify-self: end;
}

/* The language switch: both languages always shown, the one you're reading filled in. */
.lang {
  --lang-on: var(--sun);
  --lang-on-ink: var(--ink);
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius);
  background: color-mix(in srgb, currentColor 16%, transparent);
}

.c-sun .lang,
.c-coral .lang,
.c-paper .lang,
.c-mint-pale .lang {
  --lang-on: var(--ink);
  --lang-on-ink: var(--paper);
}

.lang__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: calc(var(--radius) - 3px);
  color: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-small);
  text-decoration: none;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.lang__option[aria-current="page"] {
  background: var(--lang-on);
  color: var(--lang-on-ink);
}

@media (hover: hover) and (pointer: fine) {
  .lang__option:not([aria-current]):hover {
    background: color-mix(in srgb, currentColor 14%, transparent);
  }
}

/* ---- Hero: the folder stack ---- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

.hero__title,
.page-head__title {
  padding-inline: var(--margin);
  font-size: var(--s-hero);
  font-stretch: 75%;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow: clip;
}

.hero__title {
  margin-top: clamp(20px, 4svh, 48px);
  text-align: center;
}

.hero__line {
  display: inline-block;
}

.hero__lede {
  max-width: 46ch;
  margin: clamp(20px, 3svh, 32px) auto 0;
  padding-inline: var(--margin);
  font-size: var(--s-body);
  text-align: center;
}

.folders {
  --tab: 40px;
  --step: clamp(40px, 6.4svh, 64px);
  position: relative;
  flex: 1 0 auto;
  width: 86vw;
  min-height: max(42svh, calc(var(--tab) + 4 * var(--step) + 140px));
  margin: clamp(32px, 6svh, 72px) auto 0;
}

.folder {
  position: absolute;
  inset: calc(var(--tab) + var(--i) * var(--step)) 0 0 0;
  display: block;
  text-decoration: none;
  transition: transform var(--t-ui) var(--ease-out);
}

.folder__tab {
  position: absolute;
  bottom: 100%;
  left: var(--x);
  display: flex;
  align-items: center;
  height: var(--tab);
  padding: 0 30px;
  background: inherit;
  color: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-body);
  white-space: nowrap;
  text-decoration: none;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
}

.folder--front {
  padding: 32px;
}

/* The open folder holds the app itself: two real screens standing up out of it. */
.folder__screens {
  position: absolute;
  top: calc(-4 * var(--step));
  right: 32px;
  display: none;
  gap: 16px;
}

.folder__shot {
  width: clamp(150px, 12vw, 200px);
  height: auto;
  aspect-ratio: 402 / 874;
  background: var(--ink);
}

@media (min-width: 1200px) {
  .folder__screens { display: flex; }
}

/* Narrower, the screens sit inside the open folder under the button and run off the bottom with it. */
@media (max-width: 1199px) {
  .folder__screens {
    position: static;
    display: flex;
    margin-top: 28px;
  }

  .folder__shot {
    width: min(40vw, 220px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .folder:not(.folder--front):hover,
  .folder:not(.folder--front):focus-visible {
    transform: translateY(-10px);
  }
}

/* ---- How it works: one card, four fields ---- */

.how {
  position: relative;
}

.how__title {
  position: absolute;
  z-index: 1;
  top: 28px;
  left: var(--margin);
  font-size: var(--s-state);
  line-height: 1.1;
}

.how__fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.field {
  position: relative;
  min-height: 84svh;
  padding: 28px var(--margin);
}

.field__card {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 300px;
  margin-left: -150px;
}

.field .ui {
  min-height: 214px;
}

.field__clause {
  position: absolute;
  right: var(--margin);
  bottom: 28px;
  left: var(--margin);
  max-width: 15ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-state);
  line-height: 1.12;
}

.field .ui {
  transition: transform 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .field:hover .ui { transform: translateY(-6px); }
}

/* ---- Try it: input half, output half ---- */

.try {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90svh;
}

.try__in,
.try__out {
  padding: 24svh var(--margin) calc(var(--s-head) + 96px);
}

.try__in {
  padding-left: calc(var(--margin) + (100vw - 2 * var(--margin)) / 12);
}

.try__out {
  display: flex;
  justify-content: center;
}

.try__label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
}

.try__say {
  display: block;
  width: min(34ch, 100%);
  padding: 18px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink-step);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-state);
  line-height: 1.2;
  resize: none;
  caret-color: var(--sun);
}

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

.try__examples-label {
  margin-top: 28px;
  color: var(--mint);
}

.try__examples li + li {
  margin-top: 4px;
}

.try__example {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--paper);
  text-align: left;
  cursor: pointer;
}

.try__fragment {
  width: min(480px, 100%);
}

.try__title {
  position: absolute;
  right: var(--margin);
  bottom: 32px;
  left: var(--margin);
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
  font-size: var(--s-head);
  line-height: 1;
  pointer-events: none;
}

.try__say-word {
  color: var(--paper);
}

.try__keep-word {
  color: var(--ink);
  text-align: right;
}

/* ---- Every screen: index with preview ---- */

.screens {
  padding: var(--section) var(--margin);
}

.screens__title {
  font-size: var(--s-head);
  line-height: 1;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.index {
  position: relative;
}

.index__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--gutter);
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: opacity var(--t-hover) ease;
}

.index__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--s-state);
  line-height: 1.15;
}

.index__note {
  font-size: var(--s-body);
}

.index__thumb {
  display: none;
}

.index__frame {
  overflow: hidden;
  background: var(--ink);
}

.index__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .index {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    align-items: start;
  }

  .index__list {
    grid-column: 1 / span 8;
  }

  .index__name {
    font-size: var(--s-head);
    line-height: 1.05;
  }

  .index__row {
    padding: 4px 0 10px;
  }

  .index__frame {
    position: sticky;
    top: 24px;
    grid-column: 10 / span 3;
    aspect-ratio: 603 / 1311;
    max-height: calc(100svh - 48px);
    justify-self: end;
    width: 100%;
  }

  .index__list:has(.index__row:hover, .index__row:focus-visible) .index__row:not(:hover, :focus-visible),
  .index__list:not(:has(.index__row:hover, .index__row:focus-visible)) .index__row:not(.is-current) {
    opacity: 0.4;
  }
}

/* Without a pointer to aim with, every row shows its own screen, in a grid that wraps. */
@media (max-width: 899px) {
  .index__frame {
    display: none;
  }

  .index__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px var(--gutter);
  }

  .index__row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0;
    cursor: default;
  }

  .index__thumb {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background: var(--ink);
  }
}

@media (max-width: 599px) {
  .index__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .index__note {
    font-size: var(--s-small);
  }
}

/* ---- Private: the statement ---- */

.private {
  padding: var(--section) var(--margin);
}

.private {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(32px, 4vw, 56px) var(--gutter);
  align-items: start;
}

.private__title {
  grid-column: 1 / -1;
  max-width: 16ch;
  font-size: var(--s-head);
  line-height: 1;
}

.private__lead {
  grid-column: 1 / span 6;
  font-size: var(--s-state);
  line-height: 1.22;
}

.private__text {
  grid-column: 8 / span 5;
  max-width: 60ch;
}

.hl {
  padding: 0 0.1em;
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hl--sun { background: var(--sun); }
.hl--mint { background: var(--mint); }
.hl--coral { background: var(--coral); }

.hl--link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.18em;
}

/* ---- Questions: accordion of filled tiles ---- */

.faq {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: start;
  padding: var(--section) var(--margin);
}

.faq__title {
  position: sticky;
  top: 96px;
  grid-column: 1 / span 4;
  font-size: var(--s-head);
  line-height: 1;
}

.faq__list {
  display: grid;
  gap: 8px;
  grid-column: 5 / span 8;
}

.faq__item {
  border-radius: var(--radius);
  background: var(--mint-step);
  transition: background-color var(--t-ui) ease;
}

.faq__item[open] {
  background: var(--sun);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 16px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 6.5px;
  left: 0;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-ui) var(--ease-out);
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq__item[open] .faq__icon::after {
  transform: rotate(0deg);
}

.faq__answer {
  max-width: 52ch;
  padding: 0 24px 24px;
}

.faq__answer p + p {
  margin-top: 0.8em;
}

/* ---- Footer: the name first ---- */

.footer {
  padding: clamp(64px, 8vw, 112px) var(--margin) 32px;
}

/* The hero's size, set wide so the name returns at the full width. */
.footer__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--s-hero);
  font-stretch: 100%;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.footer__row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  margin-top: 72px;
}

.footer__places {
  grid-column: 1 / span 5;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-state);
  line-height: 1.3;
  color: var(--sun);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  grid-column: 7 / span 6;
  font-size: var(--s-small);
}

.footer__group {
  margin-bottom: 8px;
  color: var(--mint);
}

.footer__links li + li {
  margin-top: 6px;
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
  margin-top: 96px;
  font-size: var(--s-small);
}

/* ---- Inner pages ---- */

/* The title on the left, the app listening on the right, the plain words under the title. */
.page-head {
  --media: clamp(150px, 17vw, 250px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--gutter);
  align-items: start;
  padding: 0 var(--margin) clamp(48px, 7vw, 104px);
}

.page-head .topbar {
  grid-column: 1 / -1;
  padding-inline: 0;
}

.page-head__title {
  grid-column: 1;
  margin-top: clamp(32px, 7svh, 88px);
  padding-inline: 0;
  font-size: min(var(--s-hero), calc((100vw - 2 * var(--margin)) / (var(--fit) * 0.56)));
}

.page-head.has-media .page-head__title {
  font-size: min(var(--s-hero), calc((100vw - 2 * var(--margin) - var(--media) - var(--gutter)) / (var(--fit) * 0.56)));
}

.page-head__media {
  grid-column: 2;
  grid-row: 2 / span 2;
  width: var(--media);
  height: auto;
  margin-top: clamp(32px, 7svh, 88px);
  background: var(--ink);
}

.page-head__row {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--gutter);
  align-items: end;
  margin-top: clamp(28px, 4vw, 56px);
}

.page-head__lede {
  grid-column: 1 / span 5;
  font-size: var(--s-state);
  line-height: 1.22;
}

.page-head__email,
.page-head__date,
.page-head .button {
  grid-column: 6 / span 3;
  justify-self: end;
}

/* Support: the main screens, so a question has a picture to point at. */
.around {
  padding: var(--section) var(--margin);
}

.around__title {
  font-size: var(--s-head);
  line-height: 1;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.around__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.around__list img {
  width: 100%;
  margin-bottom: 14px;
  background: var(--ink);
}

.around__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--s-state);
  line-height: 1.15;
}

.policy {
  padding: var(--section) var(--margin);
}

.policy__part {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.policy__part + .policy__part {
  margin-top: clamp(48px, 6vw, 80px);
}

.policy__heading {
  grid-column: 1 / span 4;
  font-size: var(--s-state);
  line-height: 1.12;
}

.policy__text {
  grid-column: 5 / span 5;
  max-width: 68ch;
}

.policy__text p + p {
  margin-top: 0.9em;
}

.policy__pic {
  grid-column: 11 / span 2;
  width: 100%;
  max-width: 220px;
  justify-self: end;
  background: var(--ink);
}

/* ---- Interface fragments: the app's own sticker look (borders and hard shadows belong to the product) ---- */

.ui {
  --ui-line: 2.5px solid var(--ink);
  position: relative;
  padding: 16px;
  border: var(--ui-line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink); /* taste-skill-ignore: the app's sticker shadow, inside data-ui fragments */
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
}

.ui p {
  text-wrap: wrap;
}

.ui mark {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--mint);
  color: inherit;
}

.ui__strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
}

.ui__muted {
  color: #3e4f48;
}

.ui__label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ui__grow {
  flex: 1;
  min-width: 0;
}

.ui__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: var(--ui-line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink); /* taste-skill-ignore: the app's sticker shadow, inside data-ui fragments */
}

.ui__btn {
  flex: none;
  padding: 6px 12px;
  border: var(--ui-line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: 13px;
}

.ui__btn--sun {
  background: var(--sun);
}

.ui__time {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d7eee5;
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 13px;
}

.ui__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ui__chip {
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--paper);
  font-weight: 600;
  font-size: 13px;
}

.ui__chip span {
  text-transform: uppercase;
}

.ui__chip--teal { background: var(--teal); }
.ui__chip--ink { background: var(--ink); }

.ui__caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--teal);
}

/* Listening */
.ui--listening {
  background: var(--paper);
}

.ui__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ui__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.ui__bubble {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
}

.ui__release {
  width: fit-content;
  margin: 16px auto 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Saved: the confirmation over Home's latest list */
.ui__toast {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 14px;
  border: var(--ui-line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink); /* taste-skill-ignore: the app's sticker shadow, inside data-ui fragments */
}

.ui__toast .ui__muted {
  font-size: 14px;
}

.ui--withyou .ui__row + .ui__label {
  margin-top: 16px;
}

/* Search */
.ui__field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: var(--ui-line);
  border-radius: 999px;
  font-weight: 600;
}

.ui__field svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.ui--search mark {
  background: var(--sun-pale);
}

/* The item screen, and the form when Lorilo needs the place */
.ui--item {
  padding: 22px;
}

.ui--item .ui__chips {
  margin: 0 0 18px;
}

.ui__heading {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

.ui__place-card {
  position: relative;
  margin: 14px 8px 22px 0;
  padding: 22px 22px 18px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--teal);
  box-shadow: 6px 6px 0 var(--ink); /* taste-skill-ignore: the app's sticker shadow, inside data-ui fragments */
  color: var(--paper);
  transform: rotate(-1.5deg);
}

.ui__place {
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 46px);
  font-stretch: 90%;
  line-height: 0.95;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ui__pill {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.ui__parrot {
  position: absolute;
  top: -38px;
  right: -14px;
  width: 72px;
  height: 72px;
  transform: rotate(10deg);
}

.ui__subhead {
  margin-bottom: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
}

.ui__form .ui__heading {
  margin-bottom: 14px;
}

.ui__input {
  min-height: 48px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: var(--ui-line);
  border-radius: 12px;
  font-weight: 600;
  font-size: 17px;
}

.ui__input--focus {
  box-shadow: 3px 3px 0 var(--ink); /* taste-skill-ignore: the app's sticker shadow, inside data-ui fragments */
}

/* ---- Tablet and phone ---- */

@media (max-width: 1279px) {
  .how__fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .field {
    min-height: max(64svh, 520px);
  }

  .private__lead {
    grid-column: 1 / span 7;
  }

  .private__text {
    grid-column: 1 / span 9;
  }
}

@media (max-width: 767px) {
  .folders {
    --tab: 32px;
    --step: 52px;
    width: 100%;
    min-height: max(48svh, calc(var(--tab) + 4 * var(--step) + 150px));
  }

  .folder__tab {
    padding: 0 22px;
    font-size: var(--s-small);
  }

  .folder:nth-child(1) .folder__tab { left: 4%; }
  .folder:nth-child(2) .folder__tab { left: auto; right: 4%; }
  .folder:nth-child(3) .folder__tab { left: 30%; }
  .folder:nth-child(4) .folder__tab { left: 4%; }
  .folder:nth-child(5) .folder__tab { left: auto; right: 4%; }

  .folder--front {
    padding: 24px var(--margin);
  }

  .folder--front .button {
    width: 100%;
  }

  .how__title {
    position: static;
    padding: 28px var(--margin) 0;
    background: var(--sun);
    font-size: var(--s-state);
  }

  .how__fields {
    grid-template-columns: 1fr;
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: 0;
    padding: 40px var(--margin) 56px;
  }

  .field__card,
  .field__clause {
    position: static;
    margin: 0;
  }

  .field__clause {
    order: -1;
    max-width: 18ch;
    font-size: 24px;
  }

  .field__card {
    width: min(300px, 100%);
  }

  .try {
    grid-template-columns: 1fr;
  }

  /* The heading's two halves sit either side of the edge where dark meets light. */
  .try {
    display: flex;
    flex-direction: column;
  }

  .try__in {
    padding: 48px var(--margin) 28px;
  }

  .try__out {
    padding: 28px var(--margin) 56px;
  }

  .try__title {
    position: static;
    display: contents;
    font-size: 11vw;
  }

  .try__say-word,
  .try__keep-word {
    display: block;
    padding: 0 var(--margin);
    font-family: var(--display);
    font-weight: 800;
    line-height: 1;
  }

  .try__say-word {
    order: 1;
    padding-bottom: 20px;
    background: var(--ink);
  }

  .try__keep-word {
    order: 2;
    padding-top: 20px;
    background: var(--paper);
    text-align: left;
  }

  .try__in { order: 0; }
  .try__out { order: 3; }

  .private__lead,
  .private__text {
    grid-column: 1 / -1;
  }

  .faq__title {
    position: static;
    grid-column: 1 / -1;
    font-size: 9vw;
  }

  .faq__list {
    grid-column: 1 / -1;
    gap: 6px;
  }

  .faq__item summary {
    min-height: 64px;
    padding: 14px 20px;
  }

  .faq__answer {
    padding: 0 20px 20px;
  }

  .footer__row {
    margin-top: 48px;
  }

  .footer__places {
    grid-column: 1 / -1;
    font-size: 24px;
  }

  .footer__links {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    margin-top: 32px;
  }

  .footer__legal {
    margin-top: 64px;
  }

  .page-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head.has-media .page-head__title {
    font-size: min(var(--s-hero), calc((100vw - 2 * var(--margin)) / (var(--fit) * 0.56)));
  }

  .page-head__media {
    grid-column: 1;
    grid-row: auto;
    order: 5;
    width: min(56vw, 240px);
    margin-top: 40px;
  }

  .page-head__lede,
  .page-head__email,
  .page-head__date,
  .page-head .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .around__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .policy__heading,
  .policy__text {
    grid-column: 1 / -1;
  }

  .policy__pic {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: min(56vw, 240px);
  }
}

/* ---- Motion: arrival, entrances, the moving picture ---- */

@media (prefers-reduced-motion: no-preference) {
  .js .hero__title,
  .js .page-head__title {
    overflow: clip;
  }

  .js [data-line] {
    transform: translateY(105%);
    animation: load-line var(--t-reveal) var(--ease-expo) 100ms forwards;
  }

  .js [data-load] {
    opacity: 0;
    transform: translateY(12px);
    animation: load-rise 500ms var(--ease-out) forwards;
    animation-delay: var(--d, 0ms);
  }

  .js .folder[data-load] {
    transform: translateY(48px);
    animation-duration: 900ms;
    animation-timing-function: var(--ease-expo);
    animation-delay: calc(520ms + var(--i) * 70ms);
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .ui__dot {
    animation: pulse 1.4s ease-in-out infinite;
  }

  .ui__caret {
    animation: blink 1.1s steps(1) infinite;
  }

  .index__frame img {
    animation: drift 14s var(--ease-soft) infinite alternate;
  }

  .index__frame.is-swapping img {
    opacity: 0.2;
  }

  .index__frame img {
    transition: opacity var(--t-ui) ease;
  }

  .ui__place-card.is-landing {
    animation: land 620ms var(--ease-expo);
  }
}

@keyframes load-line { to { transform: none; } }
@keyframes load-rise { to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { transform: scale(0.6); opacity: 0.5; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.035) translateY(-1%); } }
@keyframes land {
  from { transform: translateY(-28px) rotate(-5deg); opacity: 0; }
  to { transform: rotate(-1.5deg); opacity: 1; }
}

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