/* CatBite Labs: Nibby's unboxing.
   A violet box opens, lime tissue paper, an obsidian foam insert, a newsletter card. */

:root {
  --obsidian: #0e0e11;
  --foam: #111116;
  --violet: #7b42ff;
  --violet-hi: #8d5bff;
  --deep: #4b1a99;
  --lime: #b8ff2c;
  --paper: #f4f4f6;
  --muted: #a9a7b8;
  --warn: #ff9c8a;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --text: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
  --gutter: clamp(18px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; color-scheme: dark; scrollbar-color: var(--violet) var(--obsidian); }
body { margin: 0; background: var(--obsidian); color: var(--paper); font: 400 1.0625rem/1.6 var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
::selection { background: var(--lime); color: var(--obsidian); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 8px; border: 3px solid var(--obsidian); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.tissue :focus-visible { outline-color: var(--obsidian); }

.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { left: -9999px; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 14px; background: var(--lime); color: var(--obsidian); font-weight: 700; transform: translateY(-160%); border-radius: 8px; }
.skip:focus { transform: none; }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gutter); background: rgba(14, 14, 17, 0.94); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 900 1.45rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.brand-name span { color: var(--muted); font-weight: 800; }
.lang { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; }
.lang-opt { appearance: none; border: 0; background: none; color: var(--muted); font: 700 0.8rem var(--text); letter-spacing: 0.06em; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.lang-opt:hover { color: var(--paper); }
.lang-opt.active { background: var(--paper); color: var(--obsidian); }

/* ---------- display type: shipping-label capitals ---------- */
.h-big { margin: 0 0 0.35em; font: 900 clamp(2.9rem, 7.4vw, 6rem)/0.92 var(--display); letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance; }
.h-ink { color: var(--obsidian); }
.body { max-width: 52ch; margin: 0 0 1.2rem; font-size: 1.125rem; }
.small { margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; }

/* ---------- hero: the box ---------- */
.hero { min-height: 100svh; padding: 92px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 64px); max-width: 1360px; margin: 0 auto; }
.hero-copy { order: -1; }
.h1-a { display: block; color: var(--paper); }
.h1-b { display: block; color: var(--lime); }
.lede { max-width: 46ch; margin: 0 0 1.6rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #e6e4ee; }

.scene { --open: 0.35; --pop: 0.55; position: relative; display: grid; place-items: end center; padding: 30% 0 0; }
/* soft violet bloom behind the box so black Nibby reads against the dark ground */
.scene::before { content: ''; position: absolute; left: -10%; right: -10%; top: 0; bottom: 0; background: radial-gradient(closest-side at 50% 42%, rgba(123, 66, 255, 0.42), rgba(75, 26, 153, 0.12) 65%, transparent); pointer-events: none; }
.scene::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: -26px; height: 44px; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent); z-index: 0; }
.box { position: relative; width: min(100%, 560px); aspect-ratio: 1.5 / 1; z-index: 1; }
.box-front { position: absolute; inset: 0; z-index: 4; overflow: hidden; border-radius: 10px 10px 16px 16px; background-color: var(--violet); background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 16px); box-shadow: 0 32px 40px -24px rgba(0, 0, 0, 0.8); }
.tape { position: absolute; left: -2%; right: -2%; top: 15%; height: 17%; display: flex; align-items: center; gap: 1.6em; padding: 0 1.4em; overflow: hidden; white-space: nowrap; background: var(--lime); color: var(--obsidian); font: 900 clamp(0.9rem, 2.1vw, 1.3rem)/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.5); }
.tape span { display: inline-flex; align-items: center; gap: 1.6em; }
.tape span::after { content: ''; width: 0.4em; height: 0.4em; background: var(--obsidian); transform: rotate(45deg); }
.box-mark { position: absolute; left: 50%; top: 40%; width: 30%; translate: -50% 0; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3)); }
.box-label { position: absolute; left: 6%; bottom: 7%; margin: 0; font: 900 clamp(1.3rem, 3.6vw, 2.1rem)/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; color: #fff; }
.box-fine { position: absolute; right: 6%; bottom: 7.5%; margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 800 clamp(0.8rem, 1.8vw, 1rem)/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.box-inside { position: absolute; left: 4%; right: 4%; bottom: calc(100% - 2px); height: calc(5% + var(--open) * 18%); z-index: 1; background: #1b0d3a; border-radius: 8px 8px 0 0; }
.box-nibby { position: absolute; left: 50%; bottom: 96%; z-index: 2; width: 96%; max-width: none; height: auto; translate: -50% calc((1 - var(--pop)) * 110%); filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45)); transition: translate 0.12s linear; }
.box-lid { position: absolute; left: 1%; right: 1%; bottom: calc(100% - 1px); height: 64%; z-index: 0; background: color-mix(in srgb, var(--violet-hi) calc((1 - var(--open)) * 100%), var(--deep)); clip-path: polygon(0 100%, 100% 100%, calc(100% - (3% + var(--open) * 8%)) calc(100% - (9% + var(--open) * 91%)), calc(3% + var(--open) * 8%) calc(100% - (9% + var(--open) * 91%))); transition: clip-path 0.12s linear; }

/* ---------- email form ---------- */
.notify { position: relative; display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.notify-input { flex: 1 1 240px; min-width: 0; height: 58px; padding: 0 20px; background: var(--paper); color: var(--obsidian); border: 3px solid var(--paper); border-radius: 14px; font: 500 1.0625rem var(--text); caret-color: var(--violet); transition: border-color 0.2s var(--ease); }
.notify-input::placeholder { color: #5d5b6a; }
.notify-input:hover { border-color: var(--lime); }
.notify-input[aria-invalid='true'] { border-color: var(--warn); }
.notify-btn { height: 58px; padding: 0 28px; cursor: pointer; background: var(--violet); color: #fff; border: 3px solid var(--violet); border-radius: 14px; font: 900 1.25rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.55); transition: transform 0.18s var(--ease), background 0.18s, box-shadow 0.18s var(--ease); }
.notify-btn:hover { background: var(--violet-hi); border-color: var(--violet-hi); transform: translateY(-2px); box-shadow: 0 16px 26px -8px rgba(0, 0, 0, 0.6); }
.notify-btn:active { transform: translateY(1px); }
.notify-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.form-msg { flex-basis: 100%; min-height: 1.5em; margin: 2px 0 0; font-size: 0.95rem; font-weight: 700; }
.form-msg.is-error { color: var(--warn); text-decoration: underline wavy; text-underline-offset: 0.25em; }
.form-msg.is-ok { color: var(--lime); }
.notify.is-sent .notify-input, .notify.is-sent .notify-btn { opacity: 0.5; }

/* ---------- tissue paper: parts laid out ---------- */
.tissue { position: relative; margin-top: 44px; padding: clamp(72px, 10vw, 130px) var(--gutter) clamp(72px, 10vw, 130px); background-color: var(--lime); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .045' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 -.015'/%3E%3C/filter%3E%3Crect width='640' height='640' filter='url(%23c)'/%3E%3C/svg%3E"); color: var(--obsidian); }
.tissue::before, .tissue::after { content: ''; position: absolute; left: 0; right: 0; height: 22px; background-repeat: repeat-x; background-size: 44px 22px; }
.tissue::before { top: -21px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22'%3E%3Cpath d='M0 22L22 0L44 22Z' fill='%23B8FF2C'/%3E%3C/svg%3E"); }
.tissue::after { bottom: -21px; z-index: 2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22'%3E%3Cpath d='M0 0L22 22L44 0Z' fill='%23B8FF2C'/%3E%3C/svg%3E"); }
.tissue-copy { max-width: 1100px; margin: 0 auto; }
.tissue .h-big { font-size: clamp(3.2rem, 9.5vw, 6rem); }
.tissue .body { color: var(--obsidian); }
/* ---------- foam insert ---------- */
.foam { position: relative; padding: clamp(96px, 12vw, 150px) var(--gutter) clamp(72px, 10vw, 120px); background-color: var(--foam); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.foam-head { max-width: 1200px; margin: 0 auto 8px; }
.foam-head .body { color: #dcdae6; }
.slots { display: grid; grid-template-columns: 1.15fr 0.7fr 1.15fr; gap: 18px; max-width: 1200px; margin: 0 auto; }
.slot { position: relative; min-height: clamp(280px, 32vw, 400px); padding: 22px; overflow: hidden; display: grid; border-radius: 26px; background: #08080b; box-shadow: inset 0 16px 30px rgba(0, 0, 0, 0.75), inset 0 -1px 0 rgba(255, 255, 255, 0.06); }
.slot-name { position: relative; z-index: 2; margin: 0; align-self: start; font: 900 clamp(2rem, 3.4vw, 2.8rem)/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.slot-art { position: absolute; left: 50%; top: 50%; width: 96%; height: auto; max-width: none; translate: -50% -52%; filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.5)); }
.slot-empty { background: transparent; box-shadow: none; border: 3px dashed rgba(184, 255, 44, 0.5); }
.slot-empty .slot-name { color: var(--lime); }
.ticket { position: absolute; left: 16px; bottom: 16px; z-index: 3; margin: 0; padding: 9px 14px 9px 30px; max-width: calc(100% - 32px); background: var(--paper); color: var(--obsidian); border-radius: 4px; transform: rotate(-2deg); font: 500 0.75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; box-shadow: 0 10px 14px -6px rgba(0, 0, 0, 0.7); }
.ticket::before { content: ''; position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #08080b; }
.ticket b { display: block; font-weight: 500; }
.ticket span { display: block; opacity: 0.8; }

/* ---------- newsletter: a speech bubble from Nibby ---------- */
.news-wrap { padding: clamp(72px, 10vw, 130px) var(--gutter) clamp(80px, 11vw, 140px); overflow: hidden; }
.news { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-areas: "cat bubble" "facts facts"; gap: 28px clamp(8px, 2vw, 28px); align-items: end; max-width: 1200px; margin: 0 auto; }
.news > * { min-width: 0; }
.news-nibby { grid-area: cat; position: relative; width: min(100%, 420px); aspect-ratio: 739 / 675; justify-self: center; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45)); }
.pose-body { position: absolute; left: 14.9%; top: 0; width: 85.1%; height: auto; animation: pose-bob 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.pose-tail { position: absolute; left: 2.3%; top: 10.4%; width: 18.7%; height: auto; transform-origin: 100% 100%; animation: pose-tail 2.2s ease-in-out infinite; }
@keyframes pose-bob { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, 0.985); } }
@keyframes pose-tail { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .pose-body, .pose-tail { animation: none; } }
.bubble { grid-area: bubble; position: relative; padding: clamp(26px, 4vw, 52px); background: var(--lime); color: var(--obsidian); border-radius: 44px 44px 44px 8px; box-shadow: 0 32px 40px -24px rgba(0, 0, 0, 0.8); }
.bubble::before { content: ''; position: absolute; left: -26px; bottom: 34px; width: 34px; height: 30px; background: var(--lime); clip-path: polygon(100% 0, 100% 100%, 0 70%); }
.bubble :focus-visible { outline-color: var(--obsidian); }
.news-kicker { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; background: var(--obsidian); color: var(--lime); font: 700 0.8125rem/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.news-h { margin: 0 0 12px; font: 900 clamp(2.6rem, 5.6vw, 4.4rem)/0.94 var(--display); text-transform: uppercase; }
.news-p { margin: 0 0 24px; max-width: 46ch; font-size: 1.125rem; line-height: 1.55; }
.notify-news { position: relative; margin-bottom: 40px; padding: 6px; background: #fff; border: 3px solid var(--obsidian); border-radius: 999px; gap: 6px; flex-wrap: nowrap; align-items: stretch; }
.notify-news .notify-input { flex: 1 1 auto; min-width: 0; height: 48px; background: transparent; border: 0; border-radius: 999px; padding: 0 18px; color: var(--obsidian); }
.notify-news .notify-btn { height: 48px; border-radius: 999px; background: var(--obsidian); color: #fff; padding: 0 24px; box-shadow: none; }
.notify-news .notify-btn:hover { background: #26262e; }
.notify-news .form-msg { position: absolute; top: 100%; left: 14px; right: 0; flex-basis: auto; margin: 8px 0 0; color: var(--obsidian); }
.notify-news .form-msg.is-error, .notify-news .form-msg.is-ok { color: var(--obsidian); }
.news-facts { grid-area: facts; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.news-facts li { padding: 10px 18px; border: 2px solid rgba(244, 244, 246, 0.28); border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.news-facts a { text-decoration: underline; text-underline-offset: 0.2em; }
.fine { margin: 0; font-size: 0.9rem; }
.fine a { font-weight: 700; text-decoration: underline; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 22px var(--gutter) 28px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9rem; color: var(--muted); }
.foot-links { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a:hover { color: var(--paper); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 76px; gap: 10px; min-height: auto; }
  .scene { order: -1; width: min(100%, 380px); justify-self: center; padding-top: 30%; }
  .hero-copy { order: 0; }
  .slots { grid-template-columns: 1fr; }
  .slot { min-height: 300px; }
  .slot-empty { min-height: 150px; }
  .news { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cat" "bubble" "facts"; }
  .news-nibby { width: min(80%, 300px); }
  .bubble { border-radius: 36px 36px 8px 36px; }
  .bubble::before { left: auto; right: 48px; bottom: auto; top: -22px; width: 34px; height: 24px; clip-path: polygon(0 100%, 100% 100%, 30% 0); }
}
@media (max-width: 480px) {
  .notify-btn { flex: 1 1 100%; }
  .brand-name { font-size: 1.25rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
