/* ============================================================
   PawTalk web — shared styles
   Style: claymorphism (soft 3D, chunky, playful)
   Brand: Paw Orange #F97316 · Fredoka (display) / Nunito (body)
   ============================================================ */

:root {
  --orange: #f97316;
  --orange-deep: #ea580c;
  --orange-soft: #fb923c;
  --rust: #9a3412;
  --ink: #431407;
  --body: #7c2d12;
  --muted: #a16244;
  --bg: #fff7ed;
  --bg-accent: #ffedd5;
  --card: #fffdf9;
  --card-border: rgba(154, 52, 18, 0.10);
  --clay-shadow:
    0 10px 24px -8px rgba(154, 52, 18, 0.18),
    0 2px 6px rgba(154, 52, 18, 0.06),
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(154, 52, 18, 0.05);
  --clay-shadow-sm:
    0 4px 12px -4px rgba(154, 52, 18, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 6px var(--orange);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --orange: #fb923c;
    --orange-deep: #f97316;
    --orange-soft: #fdba74;
    --rust: #fdba74;
    --ink: #fef3ec;
    --body: #e7d5ca;
    --muted: #b8988a;
    --bg: #1c1512;
    --bg-accent: #2a1e17;
    --card: #292019;
    --card-border: rgba(253, 186, 116, 0.14);
    --clay-shadow:
      0 12px 28px -10px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 -3px 6px rgba(0, 0, 0, 0.25);
    --clay-shadow-sm:
      0 4px 12px -4px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --focus-ring: 0 0 0 3px var(--bg), 0 0 0 6px var(--orange);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 108px; }

body {
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

p + p { margin-top: 0.9em; }

a { color: var(--orange-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }

:is(a, button, summary, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}

::selection { background: var(--orange); color: #fff; }

/* ---------- floating background paws ---------- */

.paw-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.paw-field svg {
  position: absolute;
  color: var(--orange);
  opacity: 0.07;
  animation: paw-drift 16s ease-in-out infinite alternate;
}
@keyframes paw-drift {
  from { transform: translateY(0) rotate(var(--tilt, -12deg)); }
  to   { transform: translateY(-26px) rotate(calc(var(--tilt, -12deg) + 10deg)); }
}

/* ---------- floating navbar ---------- */

.nav-wrap {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  justify-content: center;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 1024px;
  padding: 10px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow: var(--clay-shadow-sm);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo:hover { color: var(--orange-deep); }
.nav-logo .paw-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--orange-soft), var(--orange-deep));
  box-shadow:
    0 4px 10px -2px rgba(234, 88, 12, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
.nav a.nav-link {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--body);
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}
.nav a.nav-link:hover { background: var(--bg-accent); color: var(--ink); }
.nav a.nav-link[aria-current="page"] {
  background: linear-gradient(145deg, var(--orange-soft), var(--orange-deep));
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 3px 8px -2px rgba(234, 88, 12, 0.5);
}

/* ---------- layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: 1024px;
  margin: 0 auto;
  padding: 132px 20px 40px;
}

.page-hero { text-align: center; padding: 24px 0 40px; }
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-accent);
  border: 1px solid var(--card-border);
  color: var(--rust);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--clay-shadow-sm);
}
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 20px 0 14px; font-weight: 600; }
.page-hero .sub { max-width: 620px; margin: 0 auto; font-size: 1.1rem; color: var(--muted); }

/* ---------- clay card ---------- */

.clay {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--clay-shadow);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--orange-soft), var(--orange-deep));
  box-shadow:
    0 8px 18px -4px rgba(234, 88, 12, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 5px rgba(154, 52, 18, 0.25);
}
.btn-primary:hover { box-shadow: 0 10px 22px -4px rgba(234, 88, 12, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 5px rgba(154, 52, 18, 0.25); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 4px 10px -3px rgba(234, 88, 12, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.btn-secondary {
  color: var(--rust);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--clay-shadow-sm);
}
.btn-secondary:hover { background: var(--bg-accent); }
.btn-secondary:active { transform: translateY(2px); }

/* ---------- footer ---------- */

footer {
  position: relative;
  z-index: 1;
  max-width: 1024px;
  margin: 24px auto 0;
  padding: 28px 20px 44px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
footer a { color: var(--rust); font-weight: 700; text-decoration: none; }
footer a:hover { color: var(--orange-deep); text-decoration: underline; }

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card);
  color: var(--rust);
  cursor: pointer;
  box-shadow: var(--clay-shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 250ms ease, transform 250ms ease, background-color 200ms ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--bg-accent); }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .nav a.nav-link { padding: 9px 13px; font-size: 0.88rem; }
  .nav-logo span { display: none; }
  main { padding-top: 116px; }
}
