/* Header tabs, careers, and the personality test. Builds on style.css. */

/* ---------- Header tabs & bundle banner ---------- */
.home-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: 10px; }
.home-link:hover .logo { transform: rotate(-8deg) scale(1.05); }
.logo { transition: transform .15s; }
.tabs { margin-left: auto; display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; }
.tabs a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 9px; display: flex; align-items: center; gap: 6px; }
.tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs .new { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; background: linear-gradient(135deg, #ff8a7a, #ffd166); color: #2a1a00; padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
@media (max-width: 520px) { .brand-name { display: none; } }

/* ---------- Careers ---------- */
.careers-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.careers-head h2 { margin: 0 0 4px; }
.careers-head p { margin: 0; }
.careers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.career { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg-2); animation: rise .35s ease both; }
.career h3 { margin: 10px 0 4px; }
.career p { margin: 0; color: var(--muted); font-size: 14px; }
.career .why { margin-top: 10px; color: var(--accent); font-weight: 600; font-size: 13px; }
.career-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; }
.career .field { text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.career .fit { background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 999px; }

/* ---------- Cross-sell ---------- */
.cross-sell { display: flex; gap: 24px; align-items: center; padding: 24px; margin: 20px 0; border-radius: 22px; background: linear-gradient(135deg, #fff1e6, #f3e8ff); color: #24123d; }
@media (prefers-color-scheme: dark) { .cross-sell { background: linear-gradient(135deg, #2c1d33, #1d1d3d); color: var(--ink); } }
.cross-sell h2 { margin: 0 0 6px; }
.cross-sell p { margin: 0 0 14px; }
.cross-egg { flex: none; width: 110px; height: 110px; display: grid; place-items: center; font-size: 64px; }
.cross-egg svg { width: 100%; height: 100%; animation: wobble 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@media (max-width: 520px) { .cross-sell { flex-direction: column; text-align: center; } }

/* ---------- Personality landing ---------- */
.p-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 40px 0 48px; }
.p-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.p-price { color: var(--muted); font-size: 14px; }
.p-hero-art { position: relative; height: 360px; }
.hero-critter { position: absolute; width: 46%; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .18)); animation: float 4s ease-in-out infinite; }
.hero-critter svg { width: 100%; height: auto; display: block; }
.hero-critter.h0 { left: 2%; top: 4%; }
.hero-critter.h1 { right: 2%; top: 0; animation-delay: -1s; }
.hero-critter.h2 { left: 12%; bottom: 0; animation-delay: -2s; }
.hero-critter.h3 { right: 8%; bottom: 4%; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }

.species-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.species { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.species span { color: var(--muted); font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.g-card { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; cursor: default; transition: transform .15s, box-shadow .15s; }
.g-card:hover, .g-card:focus { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow); outline: none; }
.g-card svg { width: 100%; max-width: 120px; height: auto; }
.g-card:hover svg { animation: bounce .6s ease; }
.g-card strong { font-size: 14px; line-height: 1.25; }
.g-species { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.g-tag { font-size: 12px; color: var(--muted); line-height: 1.35; max-height: 0; overflow: hidden; transition: max-height .25s; }
.g-card:hover .g-tag, .g-card:focus .g-tag { max-height: 80px; }
@media (hover: none) { .g-tag { max-height: none; } }

/* ---------- Personality test ---------- */
.egg-mini { width: 76px; height: 76px; }
.egg-mini svg { width: 100%; height: 100%; transform-origin: 50% 90%; }
.egg-mini.wobble svg { animation: wobble .6s ease; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 50% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
.hatch-msg { color: var(--muted); font-style: italic; margin: 10px 0 0; min-height: 1.6em; }
.p-card { text-align: center; padding: 40px 24px; }
.p-statement { font-family: var(--display); font-size: clamp(24px, 4.5vw, 34px); line-height: 1.25; margin: 0 auto 32px; max-width: 22ch; min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.p-statement.pop { animation: pop .3s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.scale-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg-2); border: 2px solid transparent; border-radius: 16px; padding: 14px 4px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s, border-color .12s, background .12s; }
.scale-btn .emoji { font-size: 34px; line-height: 1; transition: transform .15s; }
.scale-btn:hover { border-color: var(--accent); color: var(--ink); }
.scale-btn:hover .emoji { transform: scale(1.18) rotate(-6deg); }
.scale-btn.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.scale-btn.selected .emoji { transform: scale(1.25); }
@media (max-width: 480px) { .scale { gap: 6px; } .scale-btn { font-size: 11px; padding: 10px 2px 8px; } .scale-btn .emoji { font-size: 26px; } }

/* ---------- Free "top X%" teaser ---------- */
.teaser { display: flex; flex-direction: column; align-items: center; max-width: 420px; margin: 0 auto 16px; padding: 22px 20px 14px; border-radius: 18px; color: #fff; background: radial-gradient(120% 120% at 20% 0%, #7c6dff 0%, #4338ca 60%, #2a1f8f 100%); box-shadow: 0 12px 30px -12px #4338ca; animation: pop .5s cubic-bezier(.3, 1.5, .5, 1); }
.teaser-label, .teaser-sub { font-size: 14px; opacity: .85; font-weight: 600; }
.teaser-big { font-family: var(--display); font-size: clamp(48px, 12vw, 68px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.teaser-curve { width: 100%; height: 70px; margin-top: 10px; color: #fff; }
.preview-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.lock { display: flex !important; align-items: center; justify-content: center; gap: 8px; font-size: 15px !important; font-weight: 700; color: var(--ink); }
.lock span { background: var(--surface); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- Paywall egg ---------- */
.pw-egg { width: 150px; height: 150px; margin: 0 auto 20px; }
.pw-egg svg { width: 100%; height: 100%; animation: wobble 1.6s ease-in-out infinite; transform-origin: 50% 90%; }

/* ---------- Personality results ---------- */
.type-hero { --type-color: #8b8fff; display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; padding: 28px; margin-top: 16px; border-radius: 24px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--type-color) 55%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.type-hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 4px 0 8px; }
.type-hero .eyebrow { opacity: 1; color: var(--muted); }
.type-tag { font-size: 18px; margin: 0 0 14px; }
.type-critter svg { width: 100%; height: auto; display: block; }
.bounce { animation: hatch .8s cubic-bezier(.3, 1.6, .5, 1) both, float 4s ease-in-out .8s infinite; }
@keyframes hatch { from { transform: scale(.2) translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px) scale(1.04, .96); } 70% { transform: translateY(0) scale(.97, 1.03); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 600px) { .type-hero { grid-template-columns: 1fr; text-align: center; } .type-critter { max-width: 200px; margin: 0 auto; } .chips { justify-content: center; } }

.trait { margin: 18px 0 22px; }
.trait-head { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.trait-head span:last-child { text-align: right; }
.trait-head .on { color: var(--accent); }
.trait-name { color: var(--ink); text-align: center; }
.trait-bar { position: relative; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent) 45%, var(--accent-soft))); }
.trait-dot { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.trait p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 28px; margin: 10px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ticks.warn li::before { content: "!"; background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.job-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.job { background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 8px 14px; border-radius: 12px; }
.buddy { display: flex; gap: 20px; align-items: center; }
.buddy h2 { margin: 0 0 6px; }
.buddy p { margin: 0; }
.buddy-critter { flex: none; width: 110px; }
.buddy-critter svg { width: 100%; height: auto; }

@media (max-width: 860px) {
  .p-hero { grid-template-columns: 1fr; }
  .p-hero-art { height: 280px; max-width: 420px; width: 100%; margin: 0 auto; }
  .species-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Upsell pop-up ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 30, .55); backdrop-filter: blur(4px); animation: fade .25s ease; }
.modal-sheet { position: relative; width: min(100%, 440px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px 22px 16px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); animation: sheet-in .4s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; z-index: 1; }
.up-teaser { display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; padding: 18px 16px; border-radius: 18px; background: radial-gradient(120% 120% at 20% 0%, #7c6dff 0%, #4338ca 60%, #2a1f8f 100%); }
.up-teaser > span { font-size: 14px; font-weight: 600; opacity: .9; }
.up-teaser strong { font-family: var(--display); font-size: clamp(40px, 11vw, 54px); line-height: 1.05; letter-spacing: -.02em; }
.up-generic { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 18px; background: var(--accent-soft); }
.up-generic-icon { font-size: 34px; }
.modal h2 { text-align: center; font-size: 22px; margin: 18px 0 12px; }
.up-list { list-style: none; padding: 0; margin: 0 0 14px; }
.up-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: 15px; color: var(--muted); }
.up-list li strong { color: var(--ink); }
.up-list li > span { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); font-size: 18px; }
.up-bonus { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; margin-bottom: 16px; background: linear-gradient(135deg, #fff1e6, #f3e8ff); color: #24123d; border: 2px dashed #c4a8ff; }
@media (prefers-color-scheme: dark) { .up-bonus { background: linear-gradient(135deg, #2c1d33, #1d1d3d); color: var(--ink); border-color: #5b4a99; } }
.up-bonus strong { display: block; font-size: 16px; }
.up-bonus p { margin: 2px 0 0; font-size: 13.5px; opacity: .85; }
.up-free { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(135deg, #ff8a7a, #ffd166); color: #2a1a00; padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; }
.up-critters { flex: none; display: flex; width: 96px; }
.up-critters svg { width: 48px; height: auto; margin-right: -16px; }
.up-critters svg:nth-child(2) { transform: translateY(-8px); }
.modal .btn.block { margin-top: 6px; }
.modal .fine { text-align: center; font-size: 12.5px; margin: 8px 0 0; }

@media (max-width: 640px) {
  .modal { place-items: end center; padding: 0; }
  .modal-sheet { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; padding: 18px 16px calc(12px + env(safe-area-inset-bottom)); animation: sheet-up .4s cubic-bezier(.2, 1, .3, 1); }
  .modal-sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -6px auto 12px; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .modal h2 { font-size: 20px; margin: 14px 0 8px; }
  .up-list li { padding: 6px 0; font-size: 14.5px; }
}

/* ---------- Site footer with disclaimer ---------- */
.site-foot { max-width: 760px; margin: 0 auto; padding: 8px 20px calc(110px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 12px; line-height: 1.55; opacity: .8; }
.site-foot p { margin: 0 0 6px; }
body[data-screen="test"] .site-foot, body[data-screen="p-test"] .site-foot { display: none; }
@media (min-width: 641px) { .site-foot { padding-bottom: 32px; } }
