/* Fairy Doors website: the app's chunky storybook look. Thick ink outlines, hard shadows,
   rounded shapes, flat colours. No web fonts: the system's rounded font where there is one. */

:root {
  --ink: #2B1B4D;
  --line: #2B1B4D;
  --text: #2B1B4D;
  --soft: rgba(43, 27, 77, 0.72);
  --paper: #FFF8EC;
  --card: #FFFFFF;
  --yellow: #FFD23F;
  --pink: #FF7EB6;
  --teal: #2FB5A7;
  --purple: #6C3CE1;
  --orange: #FF8A3D;
  --mint: #C9F0EA;
  --sky: #BDE6FF;
  --grass: #9AD873;
  --red: #E5484D;
  --link: #6C3CE1;
  --outline: 3px;
  --drop: 4px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #FFF8EC;
    --soft: rgba(255, 248, 236, 0.78);
    --paper: #24173F;
    --card: #33245A;
    --line: #120A24;
    --link: #FFD23F;
    --mint: #2C5E5A;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 4.4vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--link); font-weight: 800; text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 12px; }

/* The picture at the top, with the name on a tilted yellow sign. */
.hero {
  position: relative;
  /* The scene is 440 by 300; on wide screens the sky and hills carry on past its sides. */
  height: clamp(270px, 68vw, 520px);
  overflow: hidden;
  background: #BDE6FF;
}
.hero svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sign {
  position: absolute;
  top: clamp(16px, 3vw, 34px);
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  margin: 0;
  padding: 8px 22px 10px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--ink);
  background: var(--yellow);
  border: var(--outline) solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 var(--drop) 0 var(--ink);
  white-space: nowrap;
}

/* The page's words sit on a sheet of paper tucked up over the grass. */
.sheet {
  position: relative;
  margin-top: -30px;
  background: var(--paper);
  border-top: var(--outline) solid var(--line);
  border-radius: 30px 30px 0 0;
  padding: 28px 20px 8px;
}
.wrap { max-width: 760px; margin: 0 auto; }
main:not(.sheet) > .wrap { padding: 0 20px; }
.small-hero svg.art.icon { width: min(130px, 36vw); }

.lead { font-size: 1.15rem; color: var(--soft); }

.card {
  background: var(--card);
  border: var(--outline) solid var(--line);
  border-radius: 22px;
  box-shadow: 0 var(--drop) 0 var(--line);
  padding: 18px 20px;
}

section { margin: 40px 0; }
.card > p:last-child, .card > :last-child { margin-bottom: 0; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 22px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--yellow);
  border: var(--outline) solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--ink);
}
.soon svg { width: 22px; height: 22px; flex: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 22px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  background: #FFFFFF;
  border: var(--outline) solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--ink);
}
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

/* How it works: three numbered steps. */
/* Room above each card for its number, which sits over the top edge. */
.steps { display: grid; gap: 36px; grid-template-columns: 1fr; padding: 0; margin: 34px 0 0; list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; padding-top: 26px; }
.steps .num {
  position: absolute; top: -18px; left: 18px;
  width: 42px; height: 42px; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800; color: var(--ink);
  border: var(--outline) solid var(--ink); border-radius: 50%;
}
.steps .pic { height: 92px; display: grid; place-items: center; margin-bottom: 8px; }
.steps .pic svg { height: 92px; width: auto; }
.steps p { margin: 0; color: var(--soft); }

/* The promise list, with coloured round badges like the app's. */
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.promises li { display: flex; gap: 14px; align-items: flex-start; font-weight: 800; }
.badge {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 2.5px solid var(--ink); border-radius: 50%;
}
.badge svg { width: 20px; height: 20px; }
.promises span.text { padding-top: 6px; }

/* Stickers: the fairy at her door, slightly tilted. */
.stickers { display: flex; justify-content: center; gap: clamp(10px, 3vw, 26px); flex-wrap: wrap; margin: 22px 0 8px; }
.sticker { width: clamp(88px, 25vw, 150px); height: auto; }
.sticker:nth-child(1) { transform: rotate(-5deg); }
.sticker:nth-child(2) { transform: rotate(3deg) translateY(-6px); }
.sticker:nth-child(3) { transform: rotate(-2deg); }

.two { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }
.two .card h3 { display: flex; gap: 10px; align-items: center; }

footer {
  margin-top: 48px;
  padding: 26px 20px 40px;
  border-top: 2px solid rgba(127, 110, 160, 0.3);
  text-align: center;
  color: var(--soft);
  font-size: 0.95rem;
}
footer nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* Smaller pages: the chip page, privacy, not found. */
.small-hero { text-align: center; padding: 40px 20px 10px; }
.small-hero svg.art { width: min(280px, 70vw); height: auto; }
.center { text-align: center; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p { color: var(--soft); }
.prose .card { margin: 0 0 18px; }
.prose .card h2 { margin-top: 0; }
.prose .card p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  .float { animation: float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .float.later { animation-delay: -2s; }
  @keyframes float { 50% { transform: translateY(-8px); } }

  /* The welcome scene moves as it does in the app. */
  .scene .spin { animation: spin 52s linear infinite; transform-origin: 369.6px 108px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .scene .drift { animation: drift 26s ease-in-out infinite alternate; }
  .scene .drift.d1 { animation-duration: 34s; animation-delay: -9s; }
  .scene .drift.d2 { animation-duration: 20s; animation-delay: -4s; }
  @keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(22px); } }
  .scene .sway { animation: sway 7s ease-in-out infinite alternate; }
  @keyframes sway { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
  .scene .glow { animation: glow 3.5s ease-in-out infinite alternate; }
  @keyframes glow { from { opacity: .6; } to { opacity: 1; } }
  .scene .bob { animation: bob 2.9s ease-in-out infinite; }
  .scene .bob.later { animation-duration: 2.4s; animation-delay: -1s; }
  @keyframes bob { 50% { transform: translateY(-5px); } }
  .scene .twinkle { animation: twinkle 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .scene .t1 { animation-delay: -.5s; } .scene .t2 { animation-delay: -1.1s; } .scene .t3 { animation-delay: -.8s; } .scene .t4 { animation-delay: -1.4s; }
  @keyframes twinkle { from { opacity: .3; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
}

/* badge colours (from build.py) */
[data-c="#BDE6FF"] { background: #BDE6FF; }
[data-c="#C9F0EA"] { background: #C9F0EA; }
[data-c="#FF7EB6"] { background: #FF7EB6; }
[data-c="#FF8A3D"] { background: #FF8A3D; }
[data-c="#FFD23F"] { background: #FFD23F; }
