/* ============================================================
   QRocodilla — Scan · Track · Redirect
   Palette + type tokens drawn from the mascot logo.
   ============================================================ */
:root {
  /* color */
  --orange:      #ff6a1a;
  --orange-600:  #f2570b;
  --orange-700:  #d9480b;
  --peach:       #ffd9b8;
  --cream:       #fff7f0;
  --cream-2:     #ffefe3;
  --ink:         #19181d;
  --ink-2:       #34313a;
  --muted:       #6f6a74;
  --white:       #ffffff;
  --line:        #f0e2d6;

  /* type */
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  /* shape */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;

  /* sticker shadow */
  --shadow:   0 14px 30px -16px rgba(217, 72, 11, .35);
  --shadow-h: 0 22px 44px -18px rgba(217, 72, 11, .5);
  --ring:     3px solid var(--ink);

  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); }

/* ambient QR field behind everything */
#qr-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
}

main, .nav, .footer { position: relative; z-index: 1; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: .6rem 1rem;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* ───────────────── buttons ───────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn--solid {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 6px 0 0 var(--ink);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 8px 0 0 var(--ink); background: var(--orange-600); }
.btn--solid:active { transform: translateY(3px); box-shadow: 0 2px 0 0 var(--ink); }
.btn--ghost {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 0 0 var(--ink);
}
.btn--ghost:hover { transform: translateY(-2px); box-shadow: 0 8px 0 0 var(--ink); background: var(--cream-2); }
.btn--ghost:active { transform: translateY(3px); box-shadow: 0 2px 0 0 var(--ink); }

/* ───────────────── brand / nav ───────────────── */
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.brand__qr { color: var(--orange); }
.brand__word { letter-spacing: -.02em; }
/* QR finder-pattern "eye" mark */
.brand__eye {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--ink);
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 6px var(--ink);
}
.brand__eye::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: var(--orange);
  border-radius: 2px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  border-bottom: 2px solid var(--ink);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links > a:not(.btn) { font-weight: 500; font-size: .98rem; position: relative; padding: .2rem 0; }
.nav__links > a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 3px;
  background: var(--orange);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav__links > a:not(.btn):hover::after { transform: scaleX(1); }
.nav__gh { padding: .55rem 1rem; font-size: .95rem; box-shadow: 0 4px 0 0 var(--ink); }
.nav__gh:hover { box-shadow: 0 6px 0 0 var(--ink); }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__toggle span { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 3px; margin: 5px 0; transition: .25s ease; }

/* ───────────────── shared section bits ───────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--orange-700);
}
.eyebrow__mark {
  width: 14px; height: 14px;
  border-radius: 3px;
  background: var(--orange);
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 4px var(--orange);
  outline: 2px solid var(--ink);
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5.5rem 1.5rem;
}
.section--alt {
  max-width: none;
  background: var(--ink);
  color: var(--white);
}
.section--alt .section__sub { color: #c9c3cf; }
.section__head { max-width: 640px; margin-bottom: 3rem; }
.section__title { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 600; margin: .7rem 0 .8rem; letter-spacing: -.02em; }
.section__sub { font-size: 1.12rem; color: var(--muted); }
.section__sub code { font-family: var(--font-mono); font-size: .9em; background: var(--cream-2); color: var(--orange-700); padding: .08em .4em; border-radius: 6px; }
.section__foot { margin-top: 2.5rem; color: var(--muted); font-size: 1.02rem; }
.section--alt .section__head { margin-inline: auto; text-align: center; }
.section--alt .eyebrow { color: var(--orange); }

/* ───────────────── hero ───────────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.5rem;
  align-items: center;
}
.hero__copy { max-width: 560px; }
.hero__title {
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 1rem 0 1.2rem;
}
.snap {
  color: var(--orange);
  position: relative;
  white-space: nowrap;
}
.snap::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  bottom: .04em;
  height: .22em;
  background: var(--peach);
  z-index: -1;
  border-radius: 4px;
}
.hero__lede { font-size: 1.18rem; color: var(--ink-2); max-width: 30rem; }

.chips { display: flex; align-items: center; gap: .7rem; list-style: none; padding: 0; margin: 1.6rem 0; flex-wrap: wrap; }
.chip {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: .35rem 1rem;
  box-shadow: 0 4px 0 0 var(--ink);
}
.chip--dot { width: 8px; height: 8px; padding: 0; border: 0; box-shadow: none; background: var(--orange); border-radius: 50%; }

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.4rem; }

.hero__stats { display: flex; gap: 2.4rem; margin: 0; padding-top: 1.6rem; border-top: 2px dashed var(--line); }
.hero__stats dt { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; color: var(--orange-700); line-height: 1; }
.hero__stats dd { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }

.hero__art { display: flex; justify-content: center; }
.mascot-card {
  position: relative;
  background: var(--white);
  border: var(--ring);
  border-radius: var(--r-xl);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  animation: float 6s ease-in-out infinite;
}
.mascot-card::before {
  /* sticker tab */
  content: "🐊 hi!";
  position: absolute;
  top: -18px; left: 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  background: var(--orange);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: .25rem .8rem;
  transform: rotate(-4deg);
}
.mascot-card img { width: min(460px, 78vw); height: auto; }

@keyframes float {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50%      { transform: rotate(2deg) translateY(-12px); }
}

/* ───────────────── feature cards ───────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: var(--white);
  border: var(--ring);
  border-radius: var(--r-lg);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: var(--shadow-h); }
.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  background: var(--cream-2);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.32rem; font-weight: 600; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: 1rem; }
.card code { background: var(--cream-2); padding: .1em .35em; border-radius: 6px; font-size: .88em; color: var(--orange-700); }

/* ───────────────── QR types ───────────────── */
.types {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--maxw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.type {
  flex: 1 1 150px;
  max-width: 190px;
  background: #232128;
  border: 2.5px solid #45414d;
  border-radius: var(--r-md);
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.type:hover { transform: translateY(-5px); border-color: var(--orange); background: #2b2832; }
.type__ico { display: block; font-size: 1.8rem; margin-bottom: .55rem; }
.type__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.type__desc { display: block; font-size: .82rem; color: #a59fb0; margin-top: .15rem; }

/* ───────────────── design studio ───────────────── */
.studio { background: var(--cream-2); padding: 5.5rem 1.5rem; }
.studio__inner { max-width: var(--maxw); margin: 0 auto; }
.studio__head { margin-inline: auto; text-align: center; }

.studio__window {
  max-width: 880px;
  margin: 0 auto;
  background: var(--white);
  border: var(--ring);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.studio__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1rem;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}
.studio__name { margin-left: .5rem; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

.studio__panes { display: grid; grid-template-columns: 340px 1fr; }
.studio__preview {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2.4rem;
  background: radial-gradient(circle at 50% 42%, #fff 0%, var(--cream-2) 100%);
  border-right: 2px dashed var(--line);
}
.studio__preview canvas { width: 248px; height: 248px; }
.studio__live {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange-700);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .25rem .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.studio__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.studio__controls { padding: 1.8rem; display: flex; flex-direction: column; gap: 1.15rem; }
.ctrl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ctrl__label { font-family: var(--font-display); font-weight: 600; font-size: .92rem; width: 96px; flex: 0 0 auto; }
.opt {
  font-family: var(--font-mono);
  font-size: .74rem;
  padding: .3rem .7rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}
.opt.is-on { background: var(--orange); font-weight: 700; }
.opt--btn { background: var(--ink); color: var(--white); font-weight: 700; }
.sw { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ink); }
.toggle { width: 46px; height: 26px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); position: relative; flex: 0 0 auto; }
.toggle.is-on { background: var(--orange); }
.toggle span { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: left .2s ease; }
.toggle.is-on span { left: 22px; }
.ctrl__hint { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* ───────────────── install ───────────────── */
.install {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.6rem;
  align-items: start;
}
.terminal {
  background: var(--ink);
  border: var(--ring);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: #232128;
  border-bottom: 2px solid #000;
}
.terminal__dot { width: 12px; height: 12px; border-radius: 50%; background: #4b4753; }
.terminal__dot:nth-child(1) { background: var(--orange); }
.terminal__dot:nth-child(2) { background: var(--peach); }
.terminal__tabs { margin-left: auto; display: flex; gap: .4rem; }
.terminal__tab {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: #a59fb0;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: .25rem .8rem;
  cursor: pointer;
  transition: .15s ease;
}
.terminal__tab.is-active { color: var(--ink); background: var(--orange); font-weight: 700; }
.terminal__tab:not(.is-active):hover { color: var(--white); border-color: #45414d; }

.terminal__body { position: relative; }
.terminal__body pre {
  margin: 0;
  padding: 1.5rem 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.85;
}
.terminal__body code { color: #e9e4ef; }
.cmd { color: #fff; }
.cmd::before { content: "$ "; color: var(--orange); }
.cmt { color: #7e7889; }

.copy {
  position: absolute;
  top: .9rem; right: .9rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: .3rem .7rem;
  cursor: pointer;
  transition: .15s ease;
}
.copy:hover { background: var(--orange-600); }
.copy.is-copied { background: #9ae6b4; }

.env {
  background: var(--white);
  border: var(--ring);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.env h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: .4rem; }
.env > p { color: var(--muted); font-size: .98rem; }
.env code { background: var(--cream-2); padding: .1em .4em; border-radius: 6px; color: var(--orange-700); font-size: .86em; }
.env__list { list-style: none; padding: 0; margin: 1rem 0; }
.env__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .6rem 0;
  border-bottom: 1.5px dashed var(--line);
}
.env__list li:last-child { border-bottom: 0; }
.env__list span { font-size: .82rem; color: var(--muted); text-align: right; }
.env__note { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

.stackline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
}
.tag {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .25rem .8rem;
  font-weight: 700;
  color: var(--ink);
}

/* ───────────────── closer CTA ───────────────── */
.closer { padding: 2rem 1.5rem 6rem; }
.closer__card {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-600) 100%);
  border: var(--ring);
  border-radius: var(--r-xl);
  padding: 3.5rem 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.closer__card::before,
.closer__card::after {
  /* QR finder eyes in the corners */
  content: "";
  position: absolute;
  width: 64px; height: 64px;
  border: 10px solid rgba(25,24,29,.18);
  border-radius: 14px;
}
.closer__card::before { top: 18px; left: 18px; }
.closer__card::after { bottom: 18px; right: 18px; }
.closer__card h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 700; color: var(--ink); position: relative; }
.closer__card p { color: rgba(25,24,29,.78); font-size: 1.12rem; margin: .8rem auto 1.8rem; max-width: 30rem; position: relative; }
.closer__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }
.closer__card .btn--solid { background: var(--ink); color: var(--white); box-shadow: 0 6px 0 0 rgba(0,0,0,.35); }
.closer__card .btn--solid:hover { background: var(--ink-2); }
.closer__card .btn--ghost { box-shadow: 0 6px 0 0 rgba(0,0,0,.35); }

/* ───────────────── footer ───────────────── */
.footer {
  background: var(--ink);
  color: var(--white);
  padding: 3rem 1.5rem 2rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px solid #34313a;
}
.brand--footer { color: var(--white); }
.footer__tag { color: #a59fb0; font-size: .95rem; }
.footer__links { display: flex; gap: 1.4rem; }
.footer__links a { font-weight: 500; color: #d7d2dd; }
.footer__links a:hover { color: var(--orange); }
.footer__fine { max-width: var(--maxw); margin: 1.4rem auto 0; color: #7e7889; font-size: .85rem; text-align: center; }
.footer__fine a { color: var(--orange); font-weight: 600; }
.footer__fine a:hover { text-decoration: underline; }

/* ───────────────── scroll reveal ───────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ───────────────── responsive ───────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .mascot-card { transform: rotate(2deg) scale(.92); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .install { grid-template-columns: 1fr; }
  .studio__panes { grid-template-columns: 1fr; }
  .studio__preview { border-right: 0; border-bottom: 2px dashed var(--line); }

  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
    padding: 1.4rem 1.5rem 1.8rem;
    transform: translateY(-150%);
    transition: transform .3s ease;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__toggle { display: block; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .types { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { gap: 1.4rem; }
  .hero__stats dt { font-size: 1.8rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .section { padding: 4rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mascot-card { animation: none; }
}
