/* ---------- Tokens ---------- */
:root{
  --yellow: #FFCF33;
  --yellow-bright: #FFE066;
  --yellow-deep: #F5A800;
  --orange: #FF7A1A;
  --ink: #2A1F04;
  --ink-soft: #5A4A1E;
  --cream: #FFF9E8;
  --cream-2: #FFF3D1;
  --paper: #FFFDF6;
  --line: rgba(42,31,4,0.12);
  --shadow: 0 10px 30px rgba(42,31,4,0.14);
  --shadow-lg: 0 20px 50px rgba(42,31,4,0.22);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Chewy', cursive;
  --font-head: 'Fredoka', sans-serif;
  --font-body: 'Quicksand', sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  font-weight: 500;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
code{
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: rgba(42,31,4,0.08);
  padding: 0.1em 0.45em;
  border-radius: 6px;
  font-size: 0.9em;
}
kbd{
  font-family: var(--font-head);
  font-size: 0.78em;
  background: var(--ink);
  color: var(--yellow-bright);
  padding: 0.2em 0.55em;
  border-radius: 7px;
  border-bottom: 2px solid #000;
}

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow{
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--orange);
  background: rgba(255,122,26,0.12);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-3px); }
.btn:active{ transform: translateY(-1px); }

.btn-primary{
  background: var(--ink);
  color: var(--yellow-bright);
  box-shadow: 0 8px 0 #000, var(--shadow);
}
.btn-primary:hover{ box-shadow: 0 11px 0 #000, var(--shadow-lg); }
.btn-primary:active{ box-shadow: 0 5px 0 #000; }

.btn-outline{
  background: var(--yellow-bright);
  color: var(--ink);
  box-shadow: 0 8px 0 var(--yellow-deep), var(--shadow);
}
.btn-outline:hover{ box-shadow: 0 11px 0 var(--yellow-deep), var(--shadow-lg); }
.btn-outline:active{ box-shadow: 0 5px 0 var(--yellow-deep); }

.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover{ background: var(--ink); color: var(--yellow-bright); }

/* ---------- Nav ---------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,249,232,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin-right: auto;
}
.brand-duck{
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.15));
}
.nav-links{
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-head);
  font-weight: 500;
}
.nav-links a{
  position: relative;
  padding: 4px 0;
}
.nav-links a::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--orange);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-github{ padding: 0.6em 1.15em; font-size: 0.92rem; }
.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span{
  width: 24px; height: 3px;
  background: var(--ink);
  border-radius: 3px;
}
.nav-links-mobile{
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0 24px 18px;
}
.nav-links-mobile a{
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-weight: 500;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: calc(100vh - 71px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 40px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 90% at 50% -5%, rgba(255,224,102,0.85) 0%, rgba(255,207,51,0.4) 42%, transparent 78%),
    linear-gradient(180deg, #241a04 0%, #3a2a05 32%, var(--yellow-deep) 78%, var(--yellow) 100%);
  isolation: isolate;
}
.hero-rays{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180vmax;
  height: 180vmax;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255,207,51,0.16) 0deg 6deg, transparent 6deg 12deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, transparent 68%);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, transparent 68%);
  animation: spin 90s linear infinite;
  opacity: 0.8;
}
@keyframes spin{
  from{ transform: translate(-50%, -50%) rotate(0deg); }
  to{ transform: translate(-50%, -50%) rotate(360deg); }
}

.pill{
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255,253,246,0.14);
  color: var(--yellow-bright);
  border: 1px solid rgba(255,224,102,0.4);
  padding: 0.5em 1.1em;
  border-radius: 999px;
  margin-bottom: clamp(22px, 4.5vw, 40px);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.hero-title{
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 8vw, 5.6rem);
  line-height: 1;
  margin: 0 0 14px;
  margin-top: 1rem;
  color: var(--yellow-bright);
  text-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 14px 30px rgba(0,0,0,0.35);
  letter-spacing: 0.01em;
}
.hero-sub{
  max-width: 620px;
  margin: 0 auto 26px;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--cream-2);
  font-weight: 500;
}
.hero-sub em{ color: var(--yellow-bright); font-style: normal; font-weight: 700; }

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
  position: relative;
}
.hero-actions .btn-ghost{
  border-color: rgba(255,224,102,0.5);
  color: var(--yellow-bright);
}
.hero-actions .btn-ghost:hover{ background: var(--yellow-bright); color: var(--ink); }

.hero-note{
  margin-top: 16px;
  font-size: 0.88rem;
  color: rgba(255,249,232,0.65);
  position: relative;
  z-index: 2;
}
.hero-note a{ text-decoration: underline; text-underline-offset: 3px; }
.hero-note + .hero-note{ margin-top: 8px; }
.hero-note code{
  background: rgba(0,0,0,0.35);
  color: var(--yellow-bright);
  border: 1px solid rgba(255,224,102,0.35);
}

.hero-duck-wrap{
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 26px;
  position: relative;
  z-index: 2;
}
.hero-duck{
  width: clamp(130px, 15vw, 190px);
  animation: bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 25px rgba(0,0,0,0.35));
  transition: transform 0.15s ease;
}
.hero-duck-wrap:active .hero-duck{ transform: scale(0.92) rotate(-4deg); }
@keyframes bob{
  0%, 100%{ transform: translateY(0) rotate(-1.5deg); }
  50%{ transform: translateY(-16px) rotate(1.5deg); }
}

.quack-bubble{
  position: absolute;
  top: -6px;
  right: -18px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  background: var(--yellow-bright);
  padding: 4px 14px;
  border-radius: 999px 999px 999px 4px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.4) translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.quack-bubble.show{
  opacity: 1;
  transform: scale(1) translateY(0);
}

.float-duck{
  position: absolute;
  width: 90px;
  opacity: 0.9;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.3));
  animation: floaty 6s ease-in-out infinite;
  pointer-events: none;
}
.fd-1{ top: 16%; left: 8%; width: 80px; animation-delay: 0s; }
.fd-2{ top: 60%; left: 6%; width: 70px; animation-delay: 1.1s; }
.fd-3{ top: 22%; right: 9%; width: 95px; animation-delay: 0.5s; }
.fd-4{ top: 66%; right: 7%; width: 78px; animation-delay: 1.7s; }
.fd-5{ top: 42%; right: 20%; width: 56px; animation-delay: 2.3s; opacity: 0.65; }
@keyframes floaty{
  0%, 100%{ transform: translateY(0) rotate(-3deg); }
  50%{ transform: translateY(-22px) rotate(3deg); }
}

.scroll-cue{
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255,224,102,0.6);
  border-radius: 999px;
  z-index: 2;
}
.scroll-cue span{
  position: absolute;
  top: 6px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  background: var(--yellow-bright);
  border-radius: 50%;
  animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes scrolldot{
  0%{ top: 6px; opacity: 1; }
  70%{ top: 22px; opacity: 0; }
  100%{ top: 6px; opacity: 0; }
}

/* ---------- Section shells ---------- */
main > section{
  padding: 110px 24px;
  position: relative;
}
.section-head{
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head-left{ margin: 0 0 40px; text-align: left; }
.section-head h2{
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  font-weight: 600;
}
.section-head p{
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Features ---------- */
.features{ background: var(--paper); }
.feature-grid{
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card{
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--yellow-deep);
}
.duck-point{
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 8px 10px rgba(42,31,4,0.22));
  transition: transform 0.2s ease;
}
.feature-card:hover .duck-point{ transform: scale(1.08) rotate(-3deg); }
.feature-card h3{
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.feature-card p{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- To-Do ---------- */
.todo{ background: var(--cream-2); }
.todo-card{
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 48px;
  box-shadow: var(--shadow);
}
.todo-duck{
  position: absolute;
  top: -46px;
  right: 40px;
  width: 110px;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.2));
  animation: floaty 7s ease-in-out infinite;
}
.todo-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.todo-item{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 4px;
  border-top: 1px dashed var(--line);
}
.todo-item:first-child{ border-top: none; }
.check{
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  border-radius: 8px;
  border: 2.5px solid var(--yellow-deep);
  background: var(--cream);
}
.todo-item h3{
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin: 0 0 4px;
  font-weight: 600;
}
.todo-item p{
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Connect ---------- */
.connect{
  background: linear-gradient(180deg, var(--cream-2), var(--yellow) 130%);
  text-align: center;
}
.connect-inner{
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.connect-duck{
  width: 90px;
  margin: 0 auto 18px;
  animation: floaty 5.5s ease-in-out infinite;
}
.connect h2{
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 12px;
  font-weight: 600;
}
.connect p{
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 34px;
  line-height: 1.6;
}
.connect-links{
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-btn{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  background: var(--ink);
  color: var(--yellow-bright);
  padding: 0.85em 1.6em;
  border-radius: 999px;
  box-shadow: 0 8px 0 #000;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.social-btn:hover{ transform: translateY(-3px); box-shadow: 0 11px 0 #000; }
.social-btn:active{ transform: translateY(-1px); box-shadow: 0 5px 0 #000; }

/* ---------- Footer ---------- */
.footer{
  background: var(--ink);
  color: var(--cream-2);
  padding: 44px 24px 34px;
  text-align: center;
}
.footer-inner{ max-width: 640px; margin: 0 auto; }
.footer-brand{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--yellow-bright);
  margin-bottom: 10px;
}
.footer-duck{ width: 30px; }
.footer p{ margin: 0 0 10px; font-size: 0.9rem; opacity: 0.75; }
.footer a{ font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; opacity: 0.85; }
.footer a:hover{ opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .feature-grid{ grid-template-columns: repeat(2, 1fr); }
  .float-duck{ display: none; }
  main > section{ padding: 88px 24px; }
  .hero{ min-height: calc(100vh - 68px); padding: 44px 24px 40px; }
}

@media (max-width: 760px){
  .nav-links{ display: none; }
  .nav-github{ display: none; }
  .nav-toggle{ display: flex; }
  .nav-links-mobile.open{ display: flex; }

  main > section{ padding: 64px 20px; }
  .section-head{ margin-bottom: 40px; }
  .section-head-left{ margin-bottom: 30px; }

  /* Content is shorter than the viewport on tall phones, so forcing a
     near-full-height hero left big empty gaps above/below it. Let it
     size to its content instead. */
  .hero{
    min-height: auto;
    padding: 40px 20px 48px;
  }
  .hero-actions{ gap: 12px; }
  .hero-actions .btn{ width: 100%; justify-content: center; }
  .hero-duck-wrap{ margin-top: 22px; }

  .todo-card{ padding: 32px 22px; }
  .todo-duck{ display: none; }
  .feature-grid{ grid-template-columns: 1fr; gap: 16px; }
  .feature-card{ padding: 24px 20px; }

  .connect p{ margin-bottom: 26px; }
}

@media (max-width: 420px){
  .hero-title{ font-size: 2.5rem; }
  .btn{ padding: 0.8em 1.2em; font-size: 0.92rem; }
}

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