/* Ailu's pages (ailu.sophiedev.com): a sheet of paper on a dusk-blue desk, like the studio's
   site (sophiedev.com) in Ailu's own colours and fonts. The fonts are served from here, so a page
   asks nothing of any other host. */
@font-face {
  font-family: "Kalam";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Kalam_700Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Nunito_400Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Nunito_700Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito";
  font-weight: 800;
  font-display: swap;
  src: url("fonts/Nunito_800ExtraBold.ttf") format("truetype");
}

:root {
  color-scheme: light dark;
  --desk: #2f4560;
  --on-desk: #f3e9dc;
  --paper: #fdfcf9;
  --ink: #2b2a28;
  --ink-soft: #5f5a52;
  --rust: #b8481f;
  --rule: #e6dfd3;
  --hand: "Kalam", cursive;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #1a2636;
    --paper: #1d1b1a;
    --ink: #ede6da;
    --ink-soft: #b9b1a4;
    --rust: #f08a55;
    --rule: #3a3633;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--on-desk);
  font-family: var(--sans);
}
a {
  color: inherit;
}
a:focus-visible {
  outline: 3px solid #ffe066;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  padding-top: 28px;
}
.site-header a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.site-header img {
  width: 40px;
  height: 35px;
}
.site-header span {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: #f08a55;
}

main.wrap {
  padding-top: 28px;
  padding-bottom: 56px;
}

.sheet {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 44px clamp(22px, 6vw, 64px) 52px;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.22),
    0 24px 40px rgba(0, 0, 0, 0.18);
}
.label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sheet h1 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 58px);
  line-height: 1.15;
  color: var(--rust);
  margin: 8px 0 6px;
}
.sheet h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 36px 0 10px;
}
.sheet h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 22px 0 6px;
}
.sheet p,
.sheet li {
  font-size: 17px;
  line-height: 1.6;
}
.sheet ul,
.sheet ol {
  padding-left: 22px;
  margin: 8px 0 0;
}
.sheet p + p,
.sheet p + ul,
.sheet ul + p,
.sheet ol + p {
  margin-top: 12px;
}
.sheet li + li {
  margin-top: 6px;
}
.sheet a {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sheet .meta {
  color: var(--ink-soft);
}
.sheet .short {
  margin-top: 20px;
  padding: 18px 20px;
  border: 2px solid var(--rule);
  border-radius: 10px;
}
.sheet .short p + p {
  margin-top: 8px;
}
.sheet .todo {
  background: #ffe066;
  color: #2b2a28;
  padding: 0 4px;
}
.sheet table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
}
.sheet th,
.sheet td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
}
.sheet th {
  font-weight: 800;
}
@media (max-width: 560px) {
  .sheet table,
  .sheet tbody,
  .sheet tr,
  .sheet td,
  .sheet th {
    display: block;
  }
  .sheet thead {
    display: none;
  }
  .sheet td {
    border: 0;
    padding: 2px 0;
  }
  .sheet tr {
    border-bottom: 1px solid var(--rule);
    padding: 10px 0;
  }
  .sheet td:first-child {
    font-weight: 800;
  }
}

.site-footer {
  border-top: 1px solid rgba(243, 233, 220, 0.25);
}
.site-footer .wrap {
  padding-top: 20px;
  padding-bottom: 36px;
  display: flex;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(243, 233, 220, 0.9);
}
.site-footer nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer nav a[aria-current="page"] {
  text-decoration: none;
  font-weight: 800;
}

/* The home page: the line and Ailu on one sheet, three cards, a note at the end */
.home {
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.home .hero {
  display: flex;
  align-items: center;
  gap: 12px 32px;
  flex-wrap: wrap;
  transform: rotate(-0.6deg);
}
.hero-text {
  flex: 1 1 320px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 62px);
  line-height: 1.1;
}
.hero .lead {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.6;
}
.hero .soon {
  margin-top: 18px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 24px;
  color: var(--rust);
}
.hero-ailu {
  flex: 0 1 360px;
  width: 360px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-ailu {
    animation: breathe 4s ease-in-out infinite;
    transform-origin: 50% 100%;
  }
}
@keyframes breathe {
  50% {
    transform: scale(1.025, 0.985);
  }
}
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
}
.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 22px 22px 26px;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.22);
}
.card:nth-child(1) {
  transform: rotate(-1.6deg);
}
.card:nth-child(2) {
  transform: rotate(1.2deg);
}
.card:nth-child(3) {
  transform: rotate(-0.8deg);
}
.card-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin: 4px auto 10px;
  fill: none;
  stroke: var(--rust);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h2 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  color: var(--rust);
  text-align: center;
}
.card-text {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.55;
}
.home .note {
  position: relative;
  margin-top: 70px;
  text-align: center;
  transform: rotate(0.5deg);
}
.note-peek {
  position: absolute;
  left: 50%;
  top: -96px;
  width: 130px;
  height: auto;
  transform: translateX(-50%);
}
.home .note h2 {
  margin: 18px 0 8px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  color: var(--rust);
}
.note-text {
  max-width: 520px;
  margin: 0 auto;
}
