/* ==========================================================
   Underhill Adventures – shared styles
   ========================================================== */
:root {
  --forest: #24503A;
  --forest-deep: #183829;
  --forest-soft: #3E7350;
  --moss: #7FA36B;
  --gold: #E3A72F;
  --amber: #C9821B;
  --amber-deep: #8F5A0E;
  --cream: #FBF5E6;
  --paper: #FFFDF7;
  --parchment: #F4E8CC;
  --bark: #6B4C3B;
  --ink: #2B2A22;
  --muted: #5B574A;
  --berry: #B4533A;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 6px rgba(43, 42, 34, .08);
  --shadow: 0 10px 30px rgba(36, 80, 58, .12), 0 2px 6px rgba(43, 42, 34, .06);
  --shadow-lg: 0 24px 60px rgba(24, 56, 41, .22);
  --font-display: "Fredoka", "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --paper-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  background-image: var(--paper-tex);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--forest); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--forest); }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; box-shadow: 0 0 0 6px #FBE7B6; border-radius: 10px; }
.ua-dark :focus-visible { outline-color: #FFE76A; box-shadow: 0 0 0 6px #000; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 999; font-weight: 800; }
.skip-link:focus { top: 12px; }

/* Icons */
.icon { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -.22em; flex: none; }

/* Buttons */
.btn {
  --bg: var(--gold); --fg: var(--forest-deep); --edge: var(--amber-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: .01em;
  padding: .85em 1.5em; min-height: 52px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  color: var(--fg); background: var(--bg);
  box-shadow: 0 4px 0 var(--edge), 0 10px 20px rgba(143, 90, 14, .2);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 6px 0 var(--edge), 0 14px 24px rgba(143, 90, 14, .24); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 4px 10px rgba(143, 90, 14, .2); }
.btn-green { --bg: var(--forest); --fg: #fff; --edge: var(--forest-deep); }
.btn-ghost { --bg: var(--paper); --fg: var(--forest); --edge: #D9C8A0; }
.btn-small { font-size: .95rem; min-height: 42px; padding: .55em 1.1em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 253, 247, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 130, 27, .25);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { font-weight: 700; color: var(--forest); text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.nav a:not(.btn):hover { background: var(--parchment); }

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; color: var(--amber-deep); background: #FBE7B6; padding: 6px 14px; border-radius: 999px; font-size: .95rem; margin-bottom: 14px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.section-head p { color: var(--muted); font-size: 1.15rem; }

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(201, 130, 27, .14); }

/* Footer */
.site-footer { background: var(--forest-deep); color: #E9E2CC; padding: 0 0 36px; position: relative; margin-top: 40px; }
.site-footer .treeline { display: block; width: 100%; height: 70px; margin-top: -69px; color: var(--forest-deep); }
.site-footer a { color: #F5D58A; display: inline-block; padding-block: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 30px; }
.footer-grid h3 { color: #F5D58A; font-size: 1.15rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-logo { background: var(--cream); border-radius: 16px; padding: 10px 14px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 46px; width: auto; }
.footer-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; font-size: .9rem; color: #BFC9B8; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.placeholder-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #FBE7B6; color: var(--amber-deep); padding: 2px 8px; border-radius: 6px; vertical-align: middle; }

/* Character art */
.char-img { object-fit: contain; filter: drop-shadow(0 10px 14px rgba(43, 42, 34, .16)); }
.is-placeholder { opacity: .96; }

/* Animations */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes bounce { 0%,100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-22px) scale(1.04, .97); } 55% { transform: translateY(0) scale(1.05, .94); } 75% { transform: translateY(-8px); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes breathe { 0%,100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
@keyframes twinkle { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.anim-float { animation: float 4.5s ease-in-out infinite; }
.anim-sway { animation: sway 5s ease-in-out infinite; transform-origin: 50% 100%; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav a.nav-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer { display: none; }
}

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }
