/* Crumb & Tumble — shared site styles
   Builds on tokens.css. Fonts, buttons, nav, footer, form basics.
*/

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;500;600;700&family=Caveat:wght@500;700&display=swap');

body {
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--sage);
  color: var(--paper);
  box-shadow: 0 4px 0 var(--sage-deep);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--sage-deep); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sage-deep); }

.btn-coral { background: var(--coral); color: var(--paper); box-shadow: 0 4px 0 #D98B79; }
.btn-coral:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #D98B79; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 12px 24px;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-pill-mustard { background: var(--mustard); color: var(--ink); box-shadow: 0 4px 0 #C9A84E; }
.btn-pill-mustard:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #C9A84E; }

/* Playful-direction CTA: thick ink underline, slight wobble */
.btn-bouncy {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 28px;
  font-size: 16px;
  border-radius: var(--r-pill);
  box-shadow: 0 5px 0 #000, 0 8px 20px rgba(0,0,0,.15);
  animation: wobble 4s ease-in-out infinite;
  transform-origin: center;
}
.btn-bouncy:hover { transform: translateY(-2px) rotate(-2deg); }
@keyframes wobble {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

/* Ink-outline button variant — pairs with pk-block cards */
.btn-ink-outline {
  background: var(--paper);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px 22px;
}
.btn-ink-outline:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-ink-outline:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  /* Matches the cream backing of the logo artwork for a seamless lockup */
  background: #FFF5EC;
  border-bottom: 1px solid var(--coral-tint);
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}
.nav-logo-img {
  display: block;
  height: 56px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .nav-logo-img { height: 46px; }
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  flex-wrap: nowrap;
}
@media (max-width: 1200px) {
  .nav { padding: 14px 20px; gap: 16px; }
  .nav-links { gap: 16px; font-size: 13px; }
  .nav-links .btn { padding: 8px 14px !important; font-size: 13px !important; }
}
@media (max-width: 1000px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links .nav-book-desktop { display: none; }
}

/* ─── Mobile nav toggle ─── */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px; right: 10px;
  height: 3px;
  background: var(--ink);
  border-radius: 3px;
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 68px 0 0 0;
  background: rgba(42, 37, 31, 0);
  visibility: hidden;
  transition: background .2s ease, visibility 0s linear .25s;
  z-index: 40;
}
.nav-drawer.is-open {
  background: rgba(42, 37, 31, .35);
  visibility: visible;
  transition: background .2s ease, visibility 0s;
}
.nav-drawer-inner {
  background: var(--cream-warm);
  border-bottom: 2.5px solid var(--ink);
  box-shadow: 0 12px 0 -2px var(--ink), 0 14px 30px rgba(0,0,0,.15);
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-drawer.is-open .nav-drawer-inner { transform: translateY(0); opacity: 1; }
.nav-drawer-inner a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 10px;
  border-bottom: 2px dashed color-mix(in oklab, var(--ink) 20%, transparent);
}
.nav-drawer-inner a:not(.btn):last-of-type { border-bottom: none; }
.nav-drawer-inner a.active { color: var(--coral); }
.nav-drawer-inner a.active::before {
  content: '• ';
  color: var(--coral);
}
.nav-drawer-book {
  margin-top: 14px;
  justify-content: center;
  text-align: center;
  padding: 14px 20px !important;
  font-size: 15px !important;
}

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .nav { padding: 14px 18px; }
}
@media (min-width: 1001px) {
  .nav-drawer { display: none; }
}
@media (max-width: 800px) {
  .footer { padding: 52px 24px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-credit { flex-direction: column; gap: 6px; text-align: center; margin-top: 36px; }
}
@media (max-width: 520px) {
  .footer { padding: 44px 20px 24px; }
  .footer-grid { gap: 28px 18px; }
  .footer-grid img { height: 76px !important; }
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 6px 2px;
  transition: color .15s;
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6'><path d='M0 3 Q 7.5 0 15 3 T 30 3 T 45 3 T 60 3' fill='none' stroke='%23F4A896' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 60px 6px;
}

/* ─── Footer ─── */
.footer {
  background: var(--sage-tint);
  color: var(--ink);
  padding: 80px 48px 40px;
  position: relative;
  overflow: hidden;
}
.footer a { color: var(--ink); text-decoration: none; opacity: .85; }
.footer a:hover { opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.footer h4 {
  color: var(--sage-deep);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: .85;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-credit {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--sage) 32%, transparent);
  font-size: 14px;
  opacity: .7;
  display: flex;
  justify-content: space-between;
}

/* ─── Decorative motifs ─── */
.wavy-line {
  display: block;
  width: 100%;
  height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'><path d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%236E9B96' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 120px 12px;
}

.star-sticker {
  width: 40px;
  height: 40px;
  display: inline-block;
}

/* Blob shapes used as background decor or image masks */
.blob-1 { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
.blob-2 { border-radius: 42% 58% 71% 29% / 44% 63% 37% 56%; }
.blob-3 { border-radius: 38% 62% 63% 37% / 47% 42% 58% 53%; }
.blob-4 { border-radius: 73% 27% 44% 56% / 49% 65% 35% 51%; }

/* Tape sticker */
.tape {
  position: absolute;
  width: 80px;
  height: 24px;
  background: color-mix(in oklab, var(--mustard) 80%, white);
  opacity: .75;
  transform: rotate(-4deg);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Section headings */
.eyebrow {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--coral);
  display: inline-block;
  line-height: 1;
  margin-bottom: 8px;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* Image placeholder — for stock photos not yet styled */
.photo {
  background-color: var(--cream-deep);
  background-size: cover;
  background-position: center;
}

/* Cards */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
}

/* Form basics */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 16px;
  border: 1.5px solid color-mix(in oklab, var(--ink) 15%, transparent);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  transition: border .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage);
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  background: var(--cream-deep);
  color: var(--ink);
}
.chip-coral { background: var(--coral-tint); color: #A15740; }
.chip-sage { background: var(--sage-tint); color: var(--sage-deep); }
.chip-mustard { background: var(--mustard-tint); color: #8A6B1A; }
.chip-lilac { background: var(--lilac-tint); color: #6F5A8A; }
.chip-pink { background: var(--pink-tint); color: #A05560; }
.chip-sky { background: var(--sky-tint); color: #3E6D96; }
