/* Lenanimo — site styles. The palette joins the two first apps: Colimo's cream, apricot and garden greens,
   Nautilo's coral, pearl and lagoon. Contrast ratios (WCAG): ink/cream 12.2, ink-soft/cream 5.9,
   terracotta/cream 5.4, paper/terracotta 5.7. Apricot, coral, honey and blush are never used for text.
   Each app card takes its own colours from apps.css, generated from apps.json. Fonts: Fredoka for titles
   (as on Nautilo's site), Nunito for text, both self-hosted under the SIL Open Font License. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --cream: #fdf6ea;
  --cream-deep: #f5e7cf;
  --paper: #fffdf8;
  --ink: #2a3042;
  --ink-soft: #5a5f70;
  --terracotta: #a8482a;
  --terracotta-deep: #8a3a21;
  --apricot: #f2a766;
  --coral: #ff9a7a;
  --blush: #f8dcd2;
  --honey: #f4c152;
  --lagoon: #14606b;
  --line: #ead9bd;
  --radius: 28px;
  --shadow: 0 14px 40px rgba(42, 48, 66, 0.1);
  --wrap: 1120px;
  --title: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe 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: 88px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--title);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

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

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

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

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* MARK: Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 246, 234, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(234, 217, 189, 0.6);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-top: env(safe-area-inset-top);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo__mark {
  width: 38px;
  height: 38px;
  flex: none;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo__mark {
  transform: rotate(-200deg);
}

.logo__word {
  font-family: var(--title);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.logo--small .logo__mark {
  width: 32px;
  height: 32px;
}

.logo--small .logo__word {
  font-size: 1.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link,
.nav__lang {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav__link:hover {
  color: var(--terracotta);
  background: rgba(242, 167, 102, 0.14);
}

.nav__lang {
  border: 2px solid var(--line);
  margin-left: 0.35rem;
  padding-inline: 0.75rem;
}

.nav__lang:hover {
  color: var(--ink);
  border-color: var(--apricot);
}

/* MARK: Hero */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgba(248, 220, 210, 0.8), transparent 70%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(220, 241, 236, 0.75), transparent 70%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagoon);
  background: rgba(220, 241, 236, 0.9);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--terracotta);
  text-decoration: underline wavy var(--apricot);
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: none;
}

.lead {
  margin-top: 1.25rem;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34em;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.9rem;
  min-height: 56px;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--paper);
  font-family: var(--title);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 8px 0 var(--terracotta-deep), 0 16px 30px rgba(168, 72, 42, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  color: var(--paper);
  transform: translateY(2px);
  box-shadow: 0 6px 0 var(--terracotta-deep), 0 12px 24px rgba(168, 72, 42, 0.22);
}

.button:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 var(--terracotta-deep), 0 6px 14px rgba(168, 72, 42, 0.2);
}

.hero__scene {
  position: relative;
  aspect-ratio: 1 / 0.86;
  width: 100%;
  max-width: 540px;
  justify-self: center;
}

.hero__blob {
  position: absolute;
  inset: 8% 2% 4% 4%;
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
  background: linear-gradient(150deg, #ffe9d6 0%, #fbd6c8 45%, #d9efe8 100%);
  box-shadow: inset 0 -18px 40px rgba(255, 255, 255, 0.5);
}

.hero__colimo,
.hero__nautilo {
  position: absolute;
  filter: drop-shadow(0 14px 14px rgba(42, 48, 66, 0.14));
}

.hero__colimo {
  width: 50%;
  left: 0;
  bottom: 6%;
  animation: bob 5.5s ease-in-out infinite;
}

.hero__nautilo {
  width: 56%;
  right: 0;
  bottom: 14%;
  animation: bob 4.6s ease-in-out -1.8s infinite;
}

.hero__bubble {
  position: absolute;
  top: 4%;
  right: 8%;
  padding: 0.6rem 1rem;
  border-radius: 22px;
  background: var(--paper);
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(1rem, 2.1vw, 1.3rem);
  color: var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(4deg);
  animation: pop 6s ease-in-out infinite;
}

.hero__bubble::after {
  content: "";
  position: absolute;
  left: 26%;
  bottom: -10px;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border-radius: 0 0 6px 0;
  transform: rotate(45deg) skew(10deg, 10deg);
}

.sparkle {
  position: absolute;
  fill: var(--honey);
  animation: twinkle 3.2s ease-in-out infinite;
}

.sparkle--1 {
  width: 30px;
  top: 14%;
  left: 12%;
}

.sparkle--2 {
  width: 20px;
  top: 30%;
  left: 42%;
  animation-delay: -1.1s;
}

.sparkle--3 {
  width: 24px;
  bottom: 4%;
  right: 6%;
  animation-delay: -2.2s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1.5deg);
  }
}

@keyframes pop {
  0%,
  82%,
  100% {
    transform: rotate(4deg) scale(1);
  }
  88% {
    transform: rotate(-2deg) scale(1.08);
  }
  94% {
    transform: rotate(6deg) scale(0.98);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.7) rotate(20deg);
  }
}

/* MARK: The word */

.word {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.word__card {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 3rem);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(-0.8deg);
  border-left: 6px solid var(--apricot);
}

.word__title {
  font-size: 1rem;
  font-family: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagoon);
  margin-bottom: 0.6rem;
}

.word__entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.8rem;
}

.word__term {
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--terracotta);
  line-height: 1.1;
}

.word__ipa {
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.word__kind {
  font-style: italic;
  color: var(--ink-soft);
}

.word__defs {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.7rem;
  font-size: 1.1rem;
}

.word__defs li::marker {
  font-family: var(--title);
  font-weight: 600;
  color: var(--terracotta);
}

.word__example {
  display: block;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

/* MARK: Sections */

.section-title {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.15rem;
  max-width: 36em;
  margin: 0.8rem auto 0;
}

/* MARK: Apps */

.apps {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  background: var(--paper);
  border-radius: 48px 48px 0 0;
}

.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.app:focus-within {
  box-shadow: 0 0 0 3px var(--app-deep);
}

.app__art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.8rem 1.5rem 0.4rem;
  min-height: 250px;
}

.app__art::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--app-accent);
  opacity: 0.3;
  top: 50%;
  left: 50%;
  translate: -50% -46%;
}

.app__art img {
  position: relative;
  width: min(78%, 280px);
  filter: drop-shadow(0 12px 12px rgba(42, 48, 66, 0.12));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app:hover .app__art img {
  transform: scale(1.05) rotate(-2deg);
}

.app__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.6rem clamp(1.4rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
  flex: 1;
}

.app__mascot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--app-deep);
}

.app__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(42, 48, 66, 0.15);
}

.app__name {
  font-size: 2.2rem;
}

.app__link {
  color: var(--ink);
  text-decoration: none;
}

.app__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.app__link:hover {
  color: var(--ink);
}

.app__link:focus-visible {
  outline: none;
}

.app__tagline {
  font-family: var(--title);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--app-deep);
}

.app__pitch {
  color: var(--ink-soft);
}

.app__highlights {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.98rem;
}

.app__highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.app__check {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.1rem;
  padding: 3px;
  border-radius: 50%;
  background: var(--app-deep);
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.app__tags li {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-deep);
  background: rgba(255, 253, 248, 0.75);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.app__soon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.app__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--honey);
  box-shadow: 0 0 0 4px rgba(244, 193, 82, 0.3);
  flex: none;
}

.app__badges {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.app__badge img {
  height: 44px;
  width: auto;
}

.app__cta {
  margin-top: auto;
  padding-top: 0.6rem;
  font-family: var(--title);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--app-deep);
}

.app__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.app:hover .app__arrow {
  transform: translateX(6px);
}

.app__note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: -0.4rem;
}

.egg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  padding: 2rem 1.8rem;
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.egg__art {
  width: 150px;
  height: 150px;
}

.egg__eyes {
  animation: peek 4s ease-in-out infinite;
}

.egg__title {
  font-size: 1.6rem;
  color: var(--ink);
}

.egg p {
  max-width: 22em;
}

@keyframes peek {
  0%,
  40%,
  100% {
    transform: translateX(0);
  }
  50%,
  60% {
    transform: translateX(-6px);
  }
  70%,
  80% {
    transform: translateX(6px);
  }
}

/* MARK: Idea */

.idea {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.idea__lead {
  max-width: 40em;
}

.idea__grid {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.2rem;
}

.value {
  background: var(--paper);
  border-radius: 24px;
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: 0 1px 0 var(--line);
}

.value__icon {
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 16px;
  background: var(--blush);
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.9rem;
}

.value:nth-child(3n + 2) .value__icon {
  background: #dcf1ec;
  stroke: var(--lagoon);
}

.value:nth-child(3n) .value__icon {
  background: #e9f1dc;
  stroke: #2f5a3d;
}

.value__title {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.value p {
  color: var(--ink-soft);
}

.facts {
  list-style: none;
  margin: clamp(1.6rem, 3vw, 2.2rem) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
  font-weight: 700;
}

.facts__icon {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 5px;
  border-radius: 50%;
  background: #fdf0d5;
  fill: none;
  stroke: #7a4a12;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* MARK: Studio */

.studio {
  padding: 0 0 clamp(3rem, 7vw, 5.5rem);
}

.studio__inner {
  max-width: 760px;
  text-align: center;
  display: grid;
  gap: 1rem;
  font-size: 1.12rem;
}

.studio__inner .section-title {
  margin-bottom: 0.3rem;
}

.studio__mail {
  font-weight: 800;
  white-space: nowrap;
}

/* MARK: Footer */

.site-footer {
  background: var(--cream-deep);
  padding: 2.8rem 0 calc(1.6rem + env(safe-area-inset-bottom));
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}

.site-footer__brand p {
  margin-top: 0.8rem;
}

.site-footer__title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--ink-soft);
}

.site-footer li a:hover {
  color: var(--terracotta);
}

.site-footer__copy {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

/* MARK: Documents */

.doc {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.doc__inner {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-bottom: 1.4rem;
}

.doc h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.6rem;
}

.doc p,
.doc ul {
  margin: 0 0 0.9rem;
}

.doc li + li {
  margin-top: 0.3rem;
}

.doc__back {
  font-weight: 700;
  margin-bottom: 1rem;
}

.doc__back a {
  text-decoration: none;
}

.doc__lead {
  font-size: 1.2rem;
  font-weight: 700;
}

.doc__updated {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.doc__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
}

.doc__table th,
.doc__table td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.doc__table tr:last-child th,
.doc__table tr:last-child td {
  border-bottom: 0;
}

.doc__table th {
  width: 36%;
  font-weight: 800;
}

.doc--center {
  text-align: center;
}

.doc--center .doc__inner {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}

.lost {
  width: 190px;
  transform: scaleX(-1);
}

.todo {
  background: #fff2b3;
  border-radius: 4px;
  padding: 0 0.25rem;
}

/* MARK: Small screens */

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

  .hero__text {
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .hero__scene {
    max-width: 440px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .nav__link {
    display: none;
  }

  .doc__table th,
  .doc__table td {
    display: block;
    width: auto;
  }

  .doc__table th {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

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

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