/* NiAnimo studio site. Colours and type: /nianimo/brand/BRAND.md */
@font-face {
  font-family: "Fredoka";
  src: url("/nianimo/fonts/fredoka-latin-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2d2a6e;
  --ink-soft: #5b5893;
  --coral: #ff6b57;
  --coral-text: #b93a28;
  --mint: #14a085;
  --mint-text: #0e7564;
  --cream: #fff8ef;
  --paper: #ffffff;
  --night: #17153a;
  --line: #e9e0d4;
  --radius: 22px;
  --display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral-text);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.35rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  flex-wrap: wrap;
}

.top .brand {
  display: inline-flex;
  line-height: 0;
}

.top .brand img {
  width: 168px;
  height: auto;
}

.top nav {
  display: flex;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
}

.top nav a {
  text-decoration: none;
  padding: 0.35rem 0.15rem;
}

.top nav a:hover,
.top nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--coral);
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem);
}

.hero .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  color: var(--coral-text);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  max-width: 14ch;
}

.hero .lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  max-width: 38rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.hero::after {
  content: "";
  position: absolute;
  right: 2%;
  top: 18%;
  width: clamp(120px, 22vw, 260px);
  aspect-ratio: 1;
  background: url("/nianimo/brand/nianimo-mark.svg") center / contain no-repeat;
  opacity: 0.95;
  pointer-events: none;
}

@media (max-width: 760px) {
  .hero::after {
    display: none;
  }
}

.cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  min-height: 48px;
}

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

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn.ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

/* Lines (Apps / Games) */
.lines {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.line {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.line img {
  height: 44px;
  width: auto;
  margin-bottom: 0.75rem;
}

.line p {
  margin: 0;
  color: var(--ink-soft);
}

/* Sections */
section {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  scroll-margin-top: 1rem;
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  max-width: 44rem;
}

.sec-head h2 img {
  display: block;
  height: clamp(44px, 7vw, 60px);
  width: auto;
}

.sec-head p {
  margin: 0;
  color: var(--ink-soft);
}

.band {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

/* App cards */
.apps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.app {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.app header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app header h3 {
  margin: 0;
}

.app .kind {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mint-text);
  font-weight: 600;
}

.app .ico {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--ink);
}

.app .ico svg {
  width: 32px;
  height: 32px;
}

.app p {
  margin: 0;
}

.app ul.facts {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.app .actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: center;
}

.app .note {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Game cards */
.games {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.game {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1.2rem;
  overflow: hidden;
}

.game::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-bottom: 0.8rem;
  background: var(--tile, var(--coral));
  box-shadow: inset 0 -6px 0 rgb(0 0 0 / 0.12);
}

.game:nth-child(5n + 1) {
  --tile: #ff6b57;
}
.game:nth-child(5n + 2) {
  --tile: #ffb938;
}
.game:nth-child(5n + 3) {
  --tile: #14a085;
}
.game:nth-child(5n + 4) {
  --tile: #6f8cff;
}
.game:nth-child(5n + 5) {
  --tile: #b46ee6;
}

.game h3 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

.game p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #ffe7e3;
  color: var(--coral-text);
}

/* Values */
.values {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.values li {
  border-top: 3px solid var(--ink);
  padding-top: 1rem;
}

.values h3 {
  font-size: 1.15rem;
}

.values p {
  margin: 0;
  color: var(--ink-soft);
}

/* Text pages (privacy, contact) */
.page {
  max-width: 46rem;
  padding-block: clamp(2rem, 6vw, 4rem);
}

.page h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.page h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-top: 2.5rem;
  scroll-margin-top: 1rem;
}

.page h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
}

.page .updated {
  color: var(--ink-soft);
  margin-top: -0.25rem;
}

.page .summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--mint);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

.page .toc {
  padding-left: 1.2rem;
}

.mail {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2rem);
  word-break: break-word;
}

/* Footer */
.foot {
  background: var(--night);
  color: var(--cream);
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-block: 2.5rem;
  font-size: 0.95rem;
}

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

.foot a:hover {
  color: #ffd0c8;
}

.foot img {
  width: 150px;
  height: auto;
  margin-bottom: 1rem;
}

.foot p {
  margin: 0.4rem 0;
  max-width: 60rem;
}

.foot nav {
  display: flex;
  gap: 1.25rem;
  margin: 1rem 0;
  font-family: var(--display);
  font-weight: 500;
}

.foot .fine {
  color: #c9c6e8;
}
