/* ============================================================
   GTM Process Survey — Greenly branded
   Tokens lifted from the Greenly Brand Design System.
   Pangea Medium (headings) + Inter (everything else).
   ============================================================ */

@font-face {
  font-family: "Pangea";
  src: url("assets/fonts/Pangea-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-25:#F5FDF7; --brand-50:#EAFAF0; --brand-100:#DEFAE7; --brand-200:#BEF4CF;
  --brand-300:#8CE9AB; --brand-400:#52D67E; --brand-500:#2FCE65; --brand-600:#1E9B48;
  --brand-700:#1B7A3B; --brand-800:#1A6133; --brand-900:#17502C; --brand-950:#072C15;

  --black-neutral:#031F18; --white:#FFFFFF;
  --neutral-25:#F9FBFA; --neutral-50:#F4F6F5; --neutral-100:#E8EDEB; --neutral-200:#D4DDDA;
  --neutral-300:#C7D1CE; --neutral-400:#A7B4B1; --neutral-500:#889C99; --neutral-600:#5E6E6B;
  --neutral-700:#455451; --neutral-800:#2B3B37; --neutral-900:#192E29; --neutral-950:#031F18;

  --blue-50:#EFF8FF; --blue-500:#2E90FA;
  --lime-50:#F5FCE4; --lime-100:#EAFAC9; --lime-200:#D8F58D; --lime-500:#C8F46A; --lime-700:#6E8E20;

  --error:#DE544F; --warning:#F89635;

  --font-display:"Pangea","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;

  --radius-sm:4px; --radius-md:6px; --radius-lg:8px; --radius-xl:12px; --radius-2xl:16px; --radius-pill:9999px;
  --shadow-card:0 0 0 1px var(--neutral-100),0 1px 2px rgba(3,31,24,0.03);
  --shadow-lg:0 8px 24px rgba(3,31,24,0.08),0 2px 6px rgba(3,31,24,0.05);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--neutral-700);
  background: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

h1,h2,h3 { font-family: var(--font-display); font-weight: 500; color: var(--black-neutral); letter-spacing: -0.01em; margin: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px);
}
.topbar img { height: 26px; display: block; }
.lang-toggle { display: inline-flex; border: 1px solid var(--neutral-200); border-radius: var(--radius-pill); overflow: hidden; }
.lang-toggle button {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  border: none; background: var(--white); color: var(--neutral-600);
  padding: 6px 14px; cursor: pointer; line-height: 1.1;
}
.lang-toggle button.active { background: var(--black-neutral); color: var(--white); }

/* ---------- Layout ---------- */
.wrap { max-width: 820px; margin: 0 auto; padding: clamp(24px,4vw,48px) clamp(16px,4vw,24px) 96px; }

.hero { margin-bottom: 32px; }
.hero .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 10px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; }
.hero p { font-size: 17px; color: var(--neutral-600); margin: 14px 0 0; max-width: 62ch; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-2xl);
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.card > .card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.idx {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-pill);
  background: var(--brand-50); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; margin-top: 2px;
}
.card h2 { font-size: 22px; line-height: 1.2; }
.card .desc { color: var(--neutral-600); font-size: 15px; margin: 8px 0 0; }
.card .where { font-size: 13px; color: var(--neutral-500); margin-top: 6px; }
.card .where b { color: var(--neutral-700); font-weight: 600; }

.badge-new {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  background: var(--lime-500); color: var(--lime-700);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius-pill);
}

/* ---------- Visual (screenshot) ---------- */
.shots { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 6px; }
.shot { flex: 1 1 240px; border: 1px solid var(--neutral-200); border-radius: var(--radius-lg); overflow: hidden; background: var(--neutral-25); }
.shot img { width: 100%; display: block; }
.shot .cap { font-size: 12px; color: var(--neutral-500); padding: 8px 10px; border-top: 1px solid var(--neutral-100); }
.shot .placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 130px; padding: 20px; color: var(--neutral-500); font-size: 13px;
  background: repeating-linear-gradient(135deg, var(--neutral-25), var(--neutral-25) 10px, var(--neutral-50) 10px, var(--neutral-50) 20px);
}

/* ---------- Questions ---------- */
.q { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--neutral-100); }
.q:first-of-type { border-top: none; }
.q .label { font-weight: 600; color: var(--black-neutral); font-size: 15px; margin-bottom: 10px; }
.q .label .req { color: var(--error); margin-left: 3px; }
.hint { font-size: 13px; color: var(--neutral-500); font-weight: 400; margin-left: 6px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  position: relative; cursor: pointer;
  border: 1px solid var(--neutral-200); border-radius: var(--radius-pill);
  padding: 8px 14px; font-size: 14px; color: var(--neutral-700);
  background: var(--white); transition: all .12s ease; user-select: none;
}
.opt:hover { border-color: var(--brand-400); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.checked { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-800); font-weight: 600; }
.opt.multi.checked { background: var(--brand-50); }

textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--neutral-800);
  border: 1px solid var(--neutral-200); border-radius: var(--radius-lg);
  padding: 10px 12px; resize: vertical; min-height: 64px; background: var(--white);
}
textarea:focus, input[type=text]:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

/* respondent card */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field .label { font-weight: 600; color: var(--black-neutral); font-size: 14px; margin-bottom: 8px; }
input[type=text] {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--neutral-800);
  border: 1px solid var(--neutral-200); border-radius: var(--radius-lg); padding: 10px 12px; background: var(--white);
}
.gy-select {
  width: 100%; max-width: 320px; font-family: var(--font-body); font-size: 14px; color: var(--neutral-800);
  border: 1px solid var(--neutral-200); border-radius: var(--radius-lg); padding: 10px 36px 10px 12px; background: var(--white);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6E6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.gy-select:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

/* ---------- Star rating ---------- */
.stars { display: flex; gap: 6px; }
.star { background: none; border: none; padding: 2px; cursor: pointer; line-height: 0; }
.star svg { fill: var(--neutral-200); transition: fill .1s ease, transform .1s ease; }
.star.on svg { fill: var(--brand-500); }
.star:hover svg { transform: scale(1.08); }
.stars-label { margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--brand-800); min-height: 20px; }
.stars-legend { margin-top: 4px; font-size: 12px; color: var(--neutral-500); }

.hidden { display: none !important; }

/* ---------- Missing-answer highlight ---------- */
.card-missing { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.q.missing .label { color: var(--error); }
.miss-flag { color: var(--error); font-weight: 600; font-size: 12px; }

/* ---------- Submit ---------- */
.footer-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--neutral-50) 60%, transparent); padding: 20px 0 8px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.1;
  border: none; border-radius: var(--radius-lg); padding: 14px 26px; cursor: pointer;
}
.btn-primary { background: var(--brand-500); color: var(--black-neutral); }
.btn-primary:hover { background: var(--brand-400); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.progress-note { font-size: 13px; color: var(--neutral-500); }

/* ---------- Toast / success ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--black-neutral); color: var(--white); padding: 12px 20px; border-radius: var(--radius-lg); font-size: 14px; box-shadow: var(--shadow-lg); z-index: 50; }
.toast.error { background: var(--error); }

.thanks { text-align: center; padding: 64px 24px; }
.thanks .check { width: 64px; height: 64px; border-radius: var(--radius-pill); background: var(--brand-50); color: var(--brand-600); display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 20px; }
.thanks h1 { font-size: 32px; margin-bottom: 12px; }
.thanks p { color: var(--neutral-600); }
