/* Coconana Studios
   Lichen ground, moss ink, the logo as the one loud thing on the page.
   Light by default; dark follows the visitor's system setting. */

:root {
  --ground: #e4e9dd;   /* lichen */
  --ink:    #16211a;   /* moss, nearly black */
  --muted:  #55635a;   /* bark */
  --fern:   #2c6a43;   /* links on hover, focus ring */
  --gutter: clamp(20px, 5vw, 64px);
  --round: ui-rounded, "SF Pro Rounded", "Varela Round", system-ui, sans-serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1712;   /* forest at night */
    --ink:    #e3e9dc;
    --muted:  #93a497;
    --fern:   #8fc59f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--fern); }
:focus-visible { outline: 2px solid var(--fern); outline-offset: 4px; border-radius: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* The logo, drawn in the current ink colour through a mask,
   so it follows light and dark mode without a second file. */
.logo,
.mark {
  display: block;
  background: var(--ink);
  -webkit-mask: url(/logo.svg) center / contain no-repeat;
          mask: url(/logo.svg) center / contain no-repeat;
}
.mark {
  -webkit-mask-image: url(/favicon.svg);
          mask-image: url(/favicon.svg);
}

/* Start page: the logo, large and slightly above centre, two quiet lines below */
.home main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 6vh var(--gutter) 6vh;
}
.home .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.8rem, 5vh, 3rem);
  text-align: center;
}
.home .logo {
  margin: 0;
  height: min(40vh, 420px, 72vw);
  aspect-ratio: 2176.83 / 2794.59;
  animation: arrive 1.4s cubic-bezier(.16, .8, .24, 1) both;
}
.home .intro {
  max-width: 33rem;
  font: 400 clamp(1rem, 2.2vw, 1.0625rem)/1.6 var(--round);
  color: var(--muted);
  text-wrap: pretty;
  animation: arrive 1.4s .3s cubic-bezier(.16, .8, .24, 1) both;
}
.home .intro p { margin: 0 0 .8rem; }
.home .intro p:first-child { color: var(--ink); }
.home .intro p:last-child { margin-bottom: 0; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .home .logo, .home .intro { animation: none; }
}

/* Footer: one quiet line */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding: 1.4rem var(--gutter) 1.6rem;
  font: 400 .875rem/1.4 var(--round);
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 1.6rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
@media (max-width: 34rem) {
  .site-footer { flex-direction: column-reverse; align-items: center; text-align: center; }
}

/* Legal pages */
.legal {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}
.legal .bar { padding: 1.6rem 0 clamp(3rem, 10vh, 6rem); }
.legal .bar a {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font: 600 1rem/1 var(--round);
  text-decoration: none;
}
.legal .bar .mark { width: 2.4rem; height: 2.4rem; }
.legal h1 {
  margin: 0 0 2.5rem;
  font: 600 clamp(2.1rem, 6vw, 3.2rem)/1.08 var(--round);
  letter-spacing: -.015em;
}
.legal h2 {
  margin: 2.6rem 0 .5rem;
  font: 600 1.06rem/1.35 var(--round);
}
.legal p,
.legal ul { margin: 0 0 1rem; max-width: 38rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--ink); }
.legal em { font-style: normal; font-size: .875rem; }

/* 404 */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}
.notfound .mark { width: 5.5rem; height: 5.5rem; }
.notfound h1 { margin: .6rem 0 0; font: 600 1.6rem/1.2 var(--round); }
.notfound p { margin: 0; color: var(--muted); }
