/* Shared base for both sites: fonts, colour tokens, type, buttons, glass panels,
   the sticky section nav, diamond socials, the forest canvas and accessibility basics.
   Each site adds its own layout in its styles.css. See DESIGN.md. */

@font-face {
  font-family: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/baloo2-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/baloo2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Akshar'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/akshar-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Akshar'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/akshar-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* brand */
  --lantern: #fff975;
  --blush: #ff9e9e;
  --rosewood: #db8181;
  --wine: #7a1818;
  /* supporting */
  --ink: #fff8ec;
  --ink-soft: rgba(255, 248, 236, 0.8);
  --glass-rgb: 22, 30, 13;               /* moss; the commissions site overrides with ember */
  --line: rgba(255, 249, 117, 0.55);
  --glow: 0 0 1rem rgba(255, 249, 117, 0.7);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 1rem;
  --radius-lg: 1.75rem;
  --font-display: 'Baloo 2', 'Akshar', system-ui, sans-serif;
  --font-body: 'Akshar', system-ui, sans-serif;
  --page: min(72rem, 100% - 2.5rem);     /* content width */
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: #1c2b14;
  color: var(--ink);
  font: 400 clamp(1.1rem, 0.98rem + 0.35vw, 1.3rem) / 1.5 var(--font-body);
}

/* The painting sits behind everything; the WebGL forest fades in over it when ready. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: center / cover no-repeat;  /* each site sets background-image (url() paths stay in its own CSS) */
  transform: scale(1.06);               /* matches the WebGL overscan so the fade-in doesn't jump */
}
.forest {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.forest.is-ready { opacity: 1; }

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; }
strong { font-weight: 700; }
[hidden] { display: none !important; }

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

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 0.4rem; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 0.6rem;
  background: var(--lantern); color: var(--wine); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Type ---------- */
/* Sticker headings: chunky rounded letters with a wine outline, like the wordmark and emotes. */
.sticker {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--lantern);
  text-shadow: 0 0.07em 0 var(--wine), 0 0.25em 0.6em rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}
@supports (paint-order: stroke fill) {
  .sticker { -webkit-text-stroke: 0.16em var(--wine); paint-order: stroke fill; }
}
.sticker--pink { color: var(--blush); }
.h2 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.7rem); }
.h3 { font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem); }
.prose p + p { margin-top: 0.9em; }
.prose { max-width: 38em; }
.lede { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.55rem 1.4rem 0.5rem;
  border: 3px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 700 1.1rem / 1 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease;
}
.btn--primary { background: var(--blush); color: var(--wine); }      /* 5.5:1 contrast */
.btn--lantern { background: var(--lantern); color: var(--wine); border-color: var(--lantern); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; }

/* ---------- Glass panels ---------- */
.panel {
  position: relative;
  border: 3px solid var(--lantern);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(var(--glass-rgb), 0.5), rgba(var(--glass-rgb), 0.68));
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 249, 117, 0.2);
}
@media (min-width: 737px) {
  .panel { -webkit-backdrop-filter: blur(6px) saturate(1.15); backdrop-filter: blur(6px) saturate(1.15); }
}

/* ---------- Sticky section nav ---------- */
.sitenav {
  position: sticky;
  top: 0.75rem;
  z-index: 50;
  display: flex;
  gap: 0.2rem;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin: 0 auto;
  padding: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--glass-rgb), 0.82);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.3);
}
.sitenav::-webkit-scrollbar { display: none; }
@media (min-width: 737px) {
  .sitenav { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.sitenav a {
  flex: none;
  padding: 0.5rem 1rem 0.4rem;
  border-radius: 999px;
  color: var(--ink);
  font: 700 1.05rem / 1 var(--font-display);
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}
.sitenav a[aria-current='true'] { background: var(--blush); color: var(--wine); }
section[id] { scroll-margin-top: 5rem; }

/* ---------- Diamond socials ---------- */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
.icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  transition: transform 200ms var(--ease-out), filter 200ms ease;
}
.icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blush);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.icon svg { position: relative; width: 48%; height: 48%; fill: var(--wine); }
.socials li:nth-child(odd) .icon::before { background: var(--lantern); }
.icon:active { transform: scale(0.94); }

/* ---------- Hover only where there's a real pointer ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 0 1rem rgba(255, 249, 117, 0.65); transform: translateY(-2px); }
  .btn:active { transform: scale(0.97); }
  .icon:hover { transform: translateY(-3px) scale(1.06); filter: drop-shadow(0 0 0.5rem rgba(255, 249, 117, 0.75)); }
  .sitenav a:not([aria-current='true']):hover { background: rgba(255, 249, 117, 0.16); }
}

/* ---------- Footer ---------- */
.footer {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  width: var(--page);
  margin: 0 auto;
  padding: 3rem 0 3.5rem;
  text-align: center;
  color: var(--ink-soft);
}
.footer a:not(.icon) { color: var(--lantern); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
