/* Nuzzle Labs site
   Soft, rounded shapes because the products are things children hold. Color carries meaning:
   teal = the child speaking, pink = the toy speaking, sunshine yellow = actions to take. */

/* Self-hosted variable fonts (latin subset, SIL Open Font License) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/bricolage-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/figtree-latin-var.woff2") format("woff2");
}

:root {
  --paper: #F3F6FB;
  --paper-2: #E7ECF5;
  --panel: #FFFFFF;
  --ink: #1D2340;
  --ink-2: #4A5170;
  --ink-3: #7A809A;
  --line: #D9DFEA;
  --sun: #FFC83D;
  --sun-deep: #F2B312;
  --sun-soft: #FFF2CC;
  --berry: #D93A6F;
  --pink: #F7B9CC;
  --pink-soft: #FFE6EE;
  --sea: #1F8A9E;
  --sea-deep: #146A7A;
  --sea-soft: #DDF0F3;
  --danger: #B42A4F;
  --danger-soft: #FCE3EA;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* 1.25 modular scale on a 17px base */
  --t-xs: 0.8125rem;
  --t-sm: 0.9rem;
  --t-base: 1.0625rem;
  --t-md: 1.1875rem;
  --t-lg: 1.5rem;
  --t-xl: clamp(2rem, 1.3rem + 2vw, 3rem);
  --t-hero: clamp(2.6rem, 1.4rem + 4vw, 4.6rem);

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; text-wrap: balance; }
h1, h2 { font-weight: 750; letter-spacing: -0.025em; }
h3 { font-weight: 680; letter-spacing: -0.01em; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  z-index: 10;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---- Buttons and links ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-sun { background: var(--sun); color: var(--ink); }
.btn-primary:hover, .btn-sun:hover { background: var(--sun-deep); }
.btn-primary:disabled { background: var(--line); color: var(--ink-3); cursor: progress; }
.btn-quiet { min-height: 40px; padding: 0 18px; border-color: var(--line); background: var(--panel); font-size: var(--t-sm); }
.btn-quiet:hover { border-color: var(--ink-3); }

.text-link {
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { color: var(--ink); text-decoration-color: var(--berry); }

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: auto; height: 32px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .header-inner { gap: 10px; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-left: auto;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--t-sm);
    font-weight: 600;
    cursor: pointer;
  }
  .nav-toggle[aria-expanded="true"] { background: var(--paper-2); }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; font-size: var(--t-base); color: var(--ink); }
  .site-nav a + a { border-top: 1px solid var(--line); }
  .header-login { flex: none; }
}
.show-sm { display: none; }
@media (max-width: 420px) {
  .brand img { height: 26px; }
  .header-login { padding: 0 16px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
}
/* Pages without the menu button (privacy, 404): push the login button right */
.header-inner > .brand + .header-login { margin-left: auto; }

/* ---- Hero ---- */

.hero { padding: clamp(44px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.hero h1 { font-size: var(--t-hero); line-height: 1.02; }
.lede { margin-top: 24px; max-width: 32em; color: var(--ink-2); font-size: var(--t-md); line-height: 1.6; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 32px;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---- Playset: the toy and its conversation (the hero's centerpiece) ---- */

.playset {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px 24px;
  align-items: start;
  padding: clamp(20px, 3vw, 30px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 60px -36px rgba(29, 35, 64, 0.45);
}
.toy {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, var(--pink-soft) 0 58%, transparent 59%);
}
.toy svg { width: 100%; height: auto; }
.toy-mouth rect { transform-box: fill-box; transform-origin: center; }
.playset.is-speaking .toy-mouth rect { animation: talk 0.36s ease-in-out infinite alternate; }
.playset.is-speaking .toy-mouth rect:nth-child(2) { animation-delay: 0.12s; }
.playset.is-speaking .toy-mouth rect:nth-child(3) { animation-delay: 0.22s; }
.playset.is-speaking .toy-mouth rect:nth-child(4) { animation-delay: 0.06s; }
@keyframes talk { from { transform: scaleY(0.35); } to { transform: scaleY(1.15); } }

.scenes { display: flex; flex-wrap: wrap; gap: 8px; }
.scene-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.scene-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.scene-btn[aria-pressed="true"] { border-color: var(--sun); background: var(--sun-soft); color: var(--ink); }

.convo { margin-top: 18px; min-height: 15.5rem; }
.scene { display: grid; gap: 10px; }
.bubble {
  max-width: 88%;
  padding: 11px 16px;
  border-radius: 20px;
  line-height: 1.5;
}
.bubble-kid {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--sea);
  color: #fff;
  font-weight: 600;
}
.bubble-toy {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--pink-soft);
  color: var(--ink);
}
.why {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: var(--t-sm);
}
.why::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun-deep);
  transform: translateY(-1px);
}
/* Typing dots while the toy "thinks" */
.bubble-typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.bubble-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--berry);
  opacity: 0.35;
  animation: dot 0.9s ease-in-out infinite;
}
.bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 50% { opacity: 1; transform: translateY(-2px); } }
.bubble.is-new { animation: pop 0.28s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.97); } }

.playset figcaption {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--ink-3);
  font-size: var(--t-xs);
}

@media (max-width: 560px) {
  .playset { grid-template-columns: 1fr; }
  .toy { width: 130px; margin: 0 auto; }
  .convo { min-height: 18rem; }
  .bubble { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .playset.is-speaking .toy-mouth rect, .bubble.is-new, .bubble-typing span { animation: none; }
}

/* ---- Sections ---- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--paper-2); }
.section h2 { font-size: var(--t-xl); line-height: 1.08; }
.section-head { display: grid; gap: 14px; max-width: 40em; }
.section-head p { color: var(--ink-2); font-size: var(--t-md); }

/* What we make: two product families get the weight, services sit underneath */
.families {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
}
.family { padding: clamp(24px, 3.4vw, 40px); border-radius: 24px; }
.family-talk { background: var(--sea-soft); }
.family-plush { background: var(--pink-soft); }
.family h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; }
.family p { margin-top: 12px; color: var(--ink-2); max-width: 32em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: var(--t-sm);
  font-weight: 600;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 36px;
}
.services article { padding: 4px 28px 4px 0; }
.services article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.services h3 { font-size: var(--t-md); }
.services p { margin-top: 8px; color: var(--ink-2); }

@media (max-width: 820px) {
  .families { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; gap: 20px; }
  .services article, .services article + article { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Customization layers: stacked like the parts of a toy, outside in */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
}
.split-head p { margin-top: 16px; max-width: 26em; color: var(--ink-2); font-size: var(--t-md); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.layers { display: grid; gap: 12px; }
.layer {
  position: relative;
  padding: 20px 22px 20px 30px;
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}
.layer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.layer-look::before { background: var(--pink); }
.layer-character::before { background: var(--sun); }
.layer-content::before { background: var(--sea); }
.layer-hardware::before { background: var(--ink); }
.layer:nth-child(2) { margin-left: 14px; }
.layer:nth-child(3) { margin-left: 28px; }
.layer:nth-child(4) { margin-left: 42px; }
.layer h3 { font-size: var(--t-lg); line-height: 1.2; }
.layer p { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 560px) { .layer:nth-child(n) { margin-left: 0; } }

/* Process steps are a real sequence, so they're numbered */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(24px, 4vw, 48px);
  margin-top: 48px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--sun);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 750;
}
.steps h3 { font-size: var(--t-lg); line-height: 1.2; }
.steps p { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Child safety */
.section-safety { background: var(--sea-soft); }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rules > div { padding: 22px 24px; border-radius: 18px; background: var(--panel); }
.rules dt { font-family: var(--display); font-size: var(--t-md); font-weight: 680; }
.rules dd { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 620px) { .rules { grid-template-columns: 1fr; } }

/* Partners */
.partners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: 40px;
}
.partners li { padding-top: 18px; border-top: 3px solid var(--ink); }
.partners h3 { font-size: var(--t-lg); line-height: 1.2; }
.partners p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 760px) { .partners { grid-template-columns: 1fr; } }

/* Contact */
.contact { padding: clamp(64px, 9vw, 104px) 0; background: var(--ink); color: var(--paper); }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.contact h2 { font-size: var(--t-xl); line-height: 1.08; }
.contact-body p { color: #C8CCE0; font-size: var(--t-md); }
.contact-body .btn { margin-top: 26px; }
.contact :focus-visible { outline-color: var(--sun); }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--ink-3);
  font-size: var(--t-sm);
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }
.disclaimer { max-width: 60em; margin-top: 16px; color: var(--ink-3); font-size: var(--t-xs); }

/* ---- Login ---- */

.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { padding: 24px var(--gutter); }
.auth-main { flex: 1; display: grid; place-items: center; padding: 24px var(--gutter) 80px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(24px, 5vw, 40px);
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.auth-card h1 { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.3rem); line-height: 1.1; }
.auth-sub { margin-top: 10px; color: var(--ink-2); }
.auth-form { display: grid; gap: 18px; margin-top: 28px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 700; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:hover { border-color: var(--ink-3); }
.field input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px var(--sea-soft); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.auth-form .btn { width: 100%; margin-top: 6px; }

.form-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--t-sm);
  font-weight: 600;
}
.form-error:empty { display: none; }

.auth-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.auth-note a { color: var(--ink); text-underline-offset: 3px; }

/* ---- Partner portal ---- */

.portal-main { padding: clamp(40px, 7vw, 80px) 0 96px; }
.portal-head h1 { font-size: var(--t-xl); line-height: 1.1; }
.portal-head p { margin-top: 8px; color: var(--ink-2); }
.account { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: var(--t-sm); color: var(--ink-2); }
.empty {
  margin-top: 40px;
  padding: clamp(28px, 5vw, 48px);
  border: 2px dashed var(--line);
  border-radius: 24px;
  background: var(--panel);
}
.empty h2 { font-size: var(--t-lg); line-height: 1.25; }
.empty p { max-width: 36em; margin-top: 10px; color: var(--ink-2); }
.empty .btn { margin-top: 24px; }
@media (max-width: 520px) { #account-email { display: none; } }

/* ---- Long-form text (privacy) ---- */

.prose { max-width: calc(40em + 2 * var(--gutter)); padding-top: clamp(48px, 8vw, 88px); padding-bottom: 96px; }
.prose h1 { font-size: var(--t-xl); line-height: 1.1; }
.prose-meta { margin-top: 8px; color: var(--ink-3); font-size: var(--t-sm); }
.prose h2 { margin-top: 44px; font-size: var(--t-lg); }
.prose p { margin-top: 12px; color: var(--ink-2); line-height: 1.7; }
.prose-meta + p { margin-top: 32px; }
.prose a { color: var(--sea-deep); text-underline-offset: 3px; }
.prose code { font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--paper-2); color: var(--ink); }

/* ---- 404 ---- */

.notfound { padding: 120px 0; }
.notfound h1 { font-size: var(--t-xl); line-height: 1.1; }
.notfound p { margin-top: 12px; color: var(--ink-2); }
.notfound .btn { margin-top: 28px; }
