/* =========================================================
   CAM: tiny cute chameleon, lightly judgmental
   Edit text in index.html. Replace visuals in assets/images.
   ========================================================= */

/* Design Tokens */
:root {
  --bg: #fafafa;
  --white: #ffffff;
  --text: #111111;
  --secondary: #777777;
  --line: #ececec;
  --pink: #ff4fa3;
  --green: #7ed957;
  --gold: #f5c542;
  --display: "Fredoka", "Nunito Sans", "Inter", Arial, sans-serif;
  --body: "Nunito Sans", "Inter", Arial, sans-serif;
  --ui: "Inter", "Nunito Sans", Arial, sans-serif;
  --max-width: 1200px;
  --radius-xl: 38px;
  --radius-lg: 26px;
  --shadow-soft: 0 18px 58px rgba(17, 17, 17, 0.08);
  --shadow-glow: 0 24px 70px rgba(126, 217, 87, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 79, 163, 0.12), transparent 25%),
    radial-gradient(circle at 12% 28%, rgba(126, 217, 87, 0.16), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "CAM CAM CAM CAM CAM CAM";
  color: rgba(17, 17, 17, 0.025);
  font-family: var(--display);
  font-size: 13vw;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.88;
  transform: rotate(-6deg) translate(-8vw, 13vh);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

/* Shared Layout */
.shell {
  width: min(calc(100% - 36px), var(--max-width));
  margin-inline: auto;
}

.section-pad {
  padding: 112px 0;
}

.system-hint,
.code-note {
  margin: 0;
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.system-hint {
  margin-bottom: 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading-left {
  margin-inline: 0;
  text-align: left;
}

.section-heading h2,
.judgement h2,
.why h2,
.social h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(3rem, 6.8vw, 7.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

/* Loading Screen */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 520ms ease, visibility 520ms ease;
}

.loader div {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 34px 42px;
  box-shadow: var(--shadow-soft);
}

.loader p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.loader p:last-child {
  color: var(--secondary);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Floating Meta */
.floating-meta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 13px;
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

/* Top Navigation */
.top-nav {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  width: min(calc(100% - 28px), var(--max-width));
  align-items: center;
  justify-content: space-between;
  margin: 14px auto -70px;
  padding: 10px;
  border: 1px solid rgba(236, 236, 236, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  width: 48px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.top-nav nav {
  display: flex;
  gap: 3px;
}

.top-nav nav a {
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.top-nav nav a:hover {
  background: var(--bg);
  color: var(--text);
}

/* Buttons */
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  cursor: pointer;
  font-family: var(--ui);
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px) scale(1.03);
}

.button-primary {
  background: var(--text);
  color: var(--white);
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--white);
}

/* Hero Section */
.hero {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
  padding: 132px 0 76px;
}

.hero-copy {
  display: grid;
  min-height: clamp(500px, 52vw, 620px);
  align-content: center;
  padding: clamp(8px, 2vw, 24px) 0;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(6.2rem, 16.2vw, 13.4rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.72;
}

.hero-statement {
  max-width: 700px;
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: clamp(1.78rem, 3.55vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.hero-soft-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin-bottom: 22px;
}

.hero-soft-note span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 9px 12px;
  color: var(--secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-actions,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-actions {
  margin-bottom: 16px;
}

.hero-meta {
  margin-bottom: 16px;
}

.hero-meta a,
.hero-meta div {
  display: grid;
  gap: 4px;
  min-width: 136px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 14px;
}

.hero-meta span,
.social-links span {
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta strong,
.social-links strong {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.hero-visual-wrap {
  position: relative;
  display: flex;
  min-height: clamp(500px, 52vw, 620px);
  align-items: center;
  justify-content: flex-end;
}

.background-whisper {
  position: absolute;
  top: 4px;
  right: -8px;
  z-index: -1;
  margin: 0;
  color: rgba(17, 17, 17, 0.04);
  font-family: var(--display);
  font-size: clamp(4rem, 9.5vw, 8.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.86;
  text-align: right;
}

/* Visual Placeholders */
.cam-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 25% 18%, rgba(126, 217, 87, 0.28), transparent 28%),
    radial-gradient(circle at 76% 72%, rgba(255, 79, 163, 0.16), transparent 30%),
    linear-gradient(145deg, #ffffff, #f5f5f5);
}

.cam-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 80%);
}

.hero-visual {
  width: min(100%, 520px);
  min-height: clamp(410px, 43vw, 500px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease;
  transform: rotate(1.6deg);
}

.hero-visual:hover {
  box-shadow: var(--shadow-glow);
  transform: scale(1.015) rotate(-0.8deg);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.visual-label,
.visual-face,
.visual-caption {
  position: absolute;
  z-index: 1;
}

.visual-label {
  top: 22px;
  left: 22px;
  color: var(--secondary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-face {
  top: 50%;
  left: 50%;
  font-family: var(--display);
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  transform: translate(-50%, -50%);
}

.visual-caption {
  right: 22px;
  bottom: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 11px;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

/* Meet Section */
.profile-card {
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 38px;
  box-shadow: var(--shadow-soft);
}

.profile-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.profile-card div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.profile-card div:first-child {
  padding-top: 0;
}

.profile-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-card dt {
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-card dd {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: right;
}

/* Mood Cards */
.mood-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mood-card {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 16px;
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.045);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.mood-card:hover,
.mood-card.is-picked {
  border-color: rgba(126, 217, 87, 0.58);
  box-shadow: var(--shadow-glow);
  transform: translateY(-7px) scale(1.025);
}

.mood-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.mood-card-wide {
  grid-column: span 2;
}

.card-visual {
  min-height: 220px;
  margin-bottom: 22px;
  border-radius: 22px;
}

.card-visual::before {
  opacity: 0.3;
}

.mood-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mood-card-large .card-visual {
  min-height: 500px;
}

.mood-card h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.72rem, 3vw, 3.05rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.mood-card p {
  margin: 0;
  color: var(--secondary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.42;
}

/* Judgement Section */
.judgement-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 79, 163, 0.12), transparent 24%),
    var(--white);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.judge-question,
.judge-answer {
  border-radius: 28px;
  padding: clamp(24px, 3.2vw, 38px);
}

.judge-question {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 197, 66, 0.16), transparent 28%),
    var(--bg);
}

.judge-question h2 {
  max-width: 600px;
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 5.4vw, 5.9rem);
  line-height: 0.96;
}

.question-note {
  max-width: 360px;
  margin: 0 0 26px;
  color: var(--secondary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.judge-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.judge-controls input {
  min-width: min(100%, 320px);
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 0 20px;
  color: var(--text);
  font-weight: 700;
  outline: none;
}

.judge-controls input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(126, 217, 87, 0.16);
}

.judge-answer {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 420px;
  align-content: center;
  border: 1px solid rgba(126, 217, 87, 0.32);
  background:
    radial-gradient(circle at 80% 20%, rgba(126, 217, 87, 0.24), transparent 30%),
    radial-gradient(circle at 18% 86%, rgba(255, 79, 163, 0.1), transparent 26%),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.judge-answer::before {
  position: absolute;
  right: -26px;
  bottom: -20px;
  content: "CAM";
  color: rgba(17, 17, 17, 0.035);
  font-family: var(--display);
  font-size: clamp(7rem, 16vw, 15rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.75;
}

.answer-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-bottom: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.78);
  padding: 8px 12px;
  color: var(--secondary);
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.judge-response {
  position: relative;
  z-index: 1;
  margin: 0;
  width: fit-content;
  font-family: var(--display);
  font-size: clamp(3rem, 6.6vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.92;
  background: linear-gradient(120deg, var(--text) 0%, var(--pink) 42%, var(--green) 78%, var(--gold) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 18px 44px rgba(255, 79, 163, 0.12);
}

/* Why Section */
.why {
  max-width: 930px;
}

.why-copy {
  display: grid;
  gap: 26px;
  margin-top: 36px;
}

.why-copy p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5.4vw, 5.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.why-copy p:nth-child(2) {
  color: var(--secondary);
  transform: translateX(5vw);
}

/* Social Section */
.social {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: stretch;
  padding: 0 0 112px;
}

.social > div:first-child,
.social-links {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 34px;
  box-shadow: 0 12px 42px rgba(17, 17, 17, 0.045);
}

.social p:not(.system-hint, .code-note) {
  margin: 0 0 22px;
  color: var(--secondary);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

.social-links {
  display: grid;
  gap: 14px;
}

.social-links a,
.social-links div {
  display: grid;
  gap: 6px;
  border-radius: 24px;
  background: var(--bg);
  padding: 22px;
}

.social-links strong {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

/* Final Section */
.final-section {
  display: grid;
  min-height: 92vh;
  place-items: center;
  padding: 110px 20px;
  background:
    radial-gradient(circle at 42% 22%, rgba(126, 217, 87, 0.25), transparent 28%),
    radial-gradient(circle at 62% 75%, rgba(255, 79, 163, 0.19), transparent 30%),
    #111111;
  color: var(--white);
  text-align: center;
}

.final-inner {
  display: grid;
  justify-items: center;
}

.final-section h2 {
  margin: 0 0 30px;
  font-family: var(--display);
  font-size: clamp(3.6rem, 9.5vw, 9.3rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.button-final {
  background: var(--white);
  color: var(--text);
}

.final-section footer {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 680ms ease, transform 680ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.judge-response.is-changing {
  animation: soft-pop 320ms ease;
}

@keyframes soft-pop {
  50% {
    transform: scale(1.015);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

  .hero {
    padding-top: 128px;
  }

  .hero-copy,
  .hero-visual-wrap {
    min-height: auto;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual-wrap {
    justify-content: center;
  }

  .hero-visual {
    width: min(100%, 640px);
    min-height: 520px;
    transform: rotate(0.8deg);
  }

  .mood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mood-card-large,
  .mood-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 26px), var(--max-width));
  }

  .section-pad {
    padding: 82px 0;
  }

  .top-nav {
    top: 10px;
    width: min(calc(100% - 20px), var(--max-width));
  }

  .hero h1 {
    letter-spacing: -0.048em;
  }

  .hero-statement {
    font-size: clamp(1.65rem, 8.2vw, 3.25rem);
  }

  .hero-visual {
    min-height: 390px;
    transform: none;
  }

  .profile-card,
  .judgement-card,
  .social > div:first-child,
  .social-links {
    padding: 26px;
  }

  .judgement-card {
    padding: 12px;
  }

  .judge-question,
  .judge-answer {
    min-height: auto;
    padding: 24px;
  }

  .judge-question h2 {
    font-size: clamp(2.35rem, 11vw, 4rem);
  }

  .judge-response {
    font-size: clamp(2.65rem, 13vw, 4.9rem);
  }

  .profile-card div {
    display: block;
  }

  .profile-card dd {
    margin-top: 6px;
    text-align: left;
  }

  .mood-grid {
    grid-template-columns: 1fr;
  }

  .mood-card-large,
  .mood-card-wide {
    grid-column: span 1;
  }

  .mood-card-large .card-visual,
  .card-visual {
    min-height: 250px;
  }

  .why-copy p:nth-child(2) {
    transform: none;
  }

  .floating-meta {
    right: 10px;
    bottom: 10px;
  }
}
