/* =========================================================
   MAKERLY — global stylesheet
   Playful, celebratory, warm-parchment aesthetic
   ========================================================= */

:root {
  --teal: #008080;
  --teal-dark: #006666;
  --teal-soft: #e0f2f1;
  --teal-ring: #b2dfdb;
  --amber: #E08B3C;
  --amber-dark: #C3732A;
  --amber-soft: #f8e4cd;
  --body: #3B2A22;
  --head: #241813;
  --muted: #6E5A4E;
  --bg: #F5EFE4;
  --bg-alt: #EFE7D6;
  --card: #FBF7EE;
  --border: #E2D6C5;
  --pink: #E86A92;       /* playful accent 1 */
  --plum: #7A3F8C;       /* playful accent 2 */
  --lime: #9FB341;       /* playful accent 3 */
  --shadow-sm: 0 4px 14px -8px rgba(36,24,19,.2);
  --shadow-md: 0 16px 30px -18px rgba(36,24,19,.28);
  --shadow-lg: 0 30px 60px -28px rgba(36,24,19,.35);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--teal-dark); }

h1,h2,h3 { font-family: var(--serif); color: var(--head); letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(42px, 5.4vw, 72px); font-weight: 600; }
h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; }
h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 600; }
p { line-height: 1.65; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 720px) { .container { padding: 0 22px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--teal);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--teal); border-radius: 2px;
}

/* pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid rgba(178,223,219,.6);
}
.pill::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(0,128,128,.18); }
.pill.amber { background: var(--amber-soft); color: var(--amber-dark); border-color: rgba(224,139,60,.3); }
.pill.amber::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(224,139,60,.18); }

/* italic accent word */
.italic-accent { font-style: italic; color: var(--amber); font-weight: 700; position: relative; white-space: nowrap; }
.italic-accent::after {
  content:''; position:absolute; left:2%; right:2%; bottom:2px; height:3px;
  background: var(--amber); border-radius: 3px; opacity: .85;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans);
  padding: 15px 24px; border-radius: 12px; cursor: pointer;
  border: none; text-decoration: none;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 22px -10px rgba(0,128,128,.55), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0,128,128,.6), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-secondary { background: transparent; color: var(--amber); border: 1.5px solid var(--amber); }
.btn-secondary:hover { background: var(--amber); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: var(--teal-soft); color: var(--teal-dark); border: 1px solid var(--teal-ring); }
.btn-ghost:hover { background: var(--teal-ring); transform: translateY(-2px); }
.btn svg { transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }

/* App store buttons */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 12px;
  background: #1a1410; color: #fff; text-decoration: none;
  transition: transform .2s, box-shadow .25s;
}
.appstore:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -18px rgba(26,20,16,.55); }
.appstore .appstore-icon svg { width: 26px; height: 26px; fill: #fff; }
.appstore .s { font-size: 10px; opacity: .8; letter-spacing: 0.02em; }
.appstore .b { font-size: 16px; font-weight: 700; font-family: var(--sans); line-height: 1.1; }

/* ========== NAV ========== */
.nav-wrap {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav-wrap.scrolled { border-color: var(--border); background: color-mix(in oklab, var(--bg) 95%, transparent); }
.nav {
  max-width: 1240px; margin: 0 auto;
  padding: 18px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--head);
  letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--teal);
  display: grid; place-items: center; color: #fff;
  font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 18px;
  box-shadow: 0 4px 14px -6px rgba(0,128,128,.6);
  position: relative; overflow: hidden;
}
.brand-mark::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.25) 50%, transparent 60%);
  animation: shimmer 5s ease-in-out infinite;
}
.brand-logo { height: 56px; width: auto; display: block; }
.footer .brand-logo { height: 60px; }
@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a { color: inherit; text-decoration: none; transition: color .2s; position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--head); }
.nav-links a.active::after {
  content:''; position:absolute; left:0; right:0; bottom:-2px; height:2px; background: var(--amber); border-radius:2px;
}
.nav-links a.nav-cta {
  font-size: 14px; font-weight: 700; color: #fff !important;
  text-decoration: none; padding: 10px 18px; border-radius: 10px;
  background: var(--teal); margin-left: 8px;
  transition: background .2s, box-shadow .2s;
  animation: navCtaWiggle 4s ease-in-out 2s infinite;
  transform-origin: center;
}
.nav-links a.nav-cta:hover { background: var(--teal-dark); color: #fff !important; box-shadow: 0 10px 22px -10px rgba(0,128,128,.55); animation-play-state: paused; }
.nav-links a.nav-cta.active::after { display: none; }
@keyframes navCtaWiggle {
  0%, 84%, 100% { transform: translateY(0) rotate(0); }
  86% { transform: translateY(-2px) rotate(-3deg); }
  88% { transform: translateY(0) rotate(3deg); }
  90% { transform: translateY(-2px) rotate(-3deg); }
  92% { transform: translateY(0) rotate(2deg); }
  94% { transform: translateY(-1px) rotate(-1deg); }
  96% { transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a.nav-cta { animation: none; }
}

.nav-burger { display: none; width:38px; height:38px; border-radius:10px; background: var(--card); border:1px solid var(--border); align-items:center; justify-content:center; cursor:pointer; }
.nav-burger svg { width:18px; height:18px; stroke: var(--head); fill: none; stroke-width: 2; }

.nav-mobile {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 16px 22px 22px; flex-direction: column; gap: 10px;
}
.nav-mobile a { color: var(--head); text-decoration: none; padding: 10px 4px; border-bottom: 1px dashed var(--border); font-size: 15px; font-weight: 500; }
.nav-mobile .btn { margin-top: 8px; }

@media (max-width: 880px) {
  .nav { padding: 16px 22px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-mobile.open { display: flex; }
}

/* ========== FOOTER ========== */
.footer {
  background: var(--head);
  color: rgba(255,255,255,.8);
  padding: 80px 0 40px;
  margin-top: 120px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 18px, transparent 18px 30px);
  opacity: .7;
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 60px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--amber); }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .blurb { font-size: 14px; line-height: 1.65; max-width: 320px; margin-bottom: 20px; }
.newsletter { display: flex; gap: 8px; max-width: 340px; }
.newsletter input {
  flex: 1; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #fff; font: 400 14px var(--sans);
}
.newsletter input::placeholder { color: rgba(255,255,255,.4); }
.newsletter input:focus { outline: none; border-color: var(--amber); background: rgba(255,255,255,.12); }
.newsletter button { padding: 12px 18px; border-radius: 10px; background: var(--amber); color: #fff; font: 600 14px var(--sans); border: none; cursor: pointer; transition: background .2s; }
.newsletter button:hover { background: var(--amber-dark); }
.footer-bottom {
  padding-top: 30px; display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,.5); flex-wrap: wrap; gap: 14px;
}
.footer-bottom a { color: inherit; text-decoration: none; margin-left: 18px; }
.footer-bottom a:hover { color: var(--amber); }

@media (max-width: 880px) {
  .footer { padding: 60px 0 30px; margin-top: 80px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

.reveal-left { opacity: 0; transform: translateX(-36px); transition: opacity .9s, transform .9s; }
.reveal-left.in { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(36px); transition: opacity .9s, transform .9s; }
.reveal-right.in { opacity: 1; transform: translateX(0); }

/* ========== PAGE HEADER (inner pages) ========== */
.page-head {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-head::before,
.page-head::after {
  content:''; position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5;
}
.page-head::before { width: 320px; height: 320px; background: var(--teal-soft); top: -120px; right: -60px; }
.page-head::after  { width: 260px; height: 260px; background: var(--amber-soft); bottom: -140px; left: -60px; }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { max-width: 800px; margin-top: 16px; }
.page-head p.lead {
  font-size: 18px; color: var(--muted); max-width: 640px; margin-top: 20px; line-height: 1.6;
}

/* ========== SHARED PATTERN ELEMENTS ========== */
.stitch {
  border-top: 1.5px dashed var(--border);
  width: 100%; opacity: .7; margin: 0;
}
.doodle-scatter {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.doodle-scatter span {
  position: absolute; font-size: 28px; opacity: .12;
  animation: doodleFloat 8s ease-in-out infinite;
}
@keyframes doodleFloat {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 8deg)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
}
