/* Inglese con Alice - survey. The same faces, colours and shapes as the site
   and Lo Specchio: Modak for the brand and the title, Schibsted Grotesk for
   everything else; white page in the light, and the phone's dark mode. */

@font-face {
  font-family: 'Modak';
  src: url('/fonts/modak.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #FFFFFF;
  --paper-rgb: 255,255,255;
  --ink: #1F2330;
  --ink-rgb: 31,35,48;
  --card: #FFFFFF;
  --pastel-a: #E4E8EF;
  --pastel-b: #F4DFE6;
  --tint-a: var(--pastel-a);
  --tint-b: var(--pastel-b);
  --line: rgba(var(--ink-rgb),0.25);
  --ok: #3F6F4F;
  --bad: #A04836;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161F;
    --paper-rgb: 20,22,31;
    --ink: #F3F4F8;
    --ink-rgb: 243,244,248;
    --card: #1C1F2A;
    --tint-a: color-mix(in srgb, var(--pastel-a) 30%, var(--paper));
    --tint-b: color-mix(in srgb, var(--pastel-b) 30%, var(--paper));
    --ok: #8FC9A3;
    --bad: #E08A76;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
header.brand-row {
  max-width: 560px; margin: 0 auto; padding: 20px 16px 4px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'Modak', cursive; font-weight: 400; font-size: 26px; letter-spacing: .035em;
}
.brand-dot {
  width: .62em; height: .62em; border-radius: 50%;
  background: var(--tint-a); border: 2.5px solid var(--ink); flex: none;
}
.disp span { display: inline-block; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
#app {
  max-width: 560px; margin: 10px auto 40px; padding: 30px 24px 34px;
  background: var(--tint-b);
  border-radius: 38px 52px 44px 58px / 52px 40px 56px 42px;
  animation: blob-soft 18s ease-in-out infinite;
}
@keyframes blob-soft {
  0%,100% { border-radius: 38px 52px 44px 58px / 52px 40px 56px 42px; }
  25%     { border-radius: 56px 40px 58px 42px / 44px 56px 40px 54px; }
  50%     { border-radius: 42px 58px 40px 56px / 56px 42px 52px 44px; }
  75%     { border-radius: 54px 44px 56px 38px / 42px 54px 44px 56px; }
}
@media (prefers-reduced-motion: reduce) { #app { animation: none; } }
#sito_web { position: absolute; left: -9999px; top: -9999px; }
h1 {
  font-family: 'Modak', cursive; font-weight: 400;
  font-size: clamp(36px, 10vw, 44px); line-height: 1.1; letter-spacing: .035em; word-spacing: .08em; margin: .3em 0 .4em;
}
h2 {
  font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin: .8em 0 .7em;
}
.dots { display: flex; gap: 6px; margin: 12px 0 8px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); }
.dots span.on { background: var(--ink); border-color: var(--ink); }
.q { margin-bottom: 22px; }
.q label.qlabel { display: block; font-weight: 600; margin-bottom: 8px; }
.q input[type=text], .q input[type=tel], .q input[type=email], .q input[type=date] {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
}
.q textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  resize: vertical; line-height: 1.45;
}
/* The dropdown that takes typing: a text box with a list under it. */
.combo { position: relative; }
.combo input[type=text] {
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 21px) 20px, calc(100% - 15px) 20px; background-size: 6px 6px; background-repeat: no-repeat;
}
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; margin: 0; padding: 4px; list-style: none;
  max-height: 264px; overflow-y: auto; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.combo-list[hidden] { display: none; }
.combo-list li { padding: 10px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li:hover, .combo-list li.on { background: var(--tint-a); font-weight: 600; }
.q input:focus, .q textarea:focus { outline: none; border-color: var(--ink); }
/* A required question left empty when Next is pressed. */
.q.missing > .qlabel, .q .scale-name.missing { color: var(--bad); }
.q.missing { outline: 2px solid var(--bad); outline-offset: 8px; border-radius: 10px; }
.q input.other { margin-top: 8px; }
.q .example { margin: -2px 0 10px; opacity: .8; font-style: italic; }
.q .scale-name { margin: 12px 0 6px; }
.q input[type=range] { width: 100%; accent-color: var(--ink); margin: 4px 0 0; }
.q .slider-value { font-weight: 700; font-size: 1.35rem; min-height: 1.5em; }
button.opt.off { opacity: .45; cursor: default; }
.q input[type=date] { -webkit-appearance: none; appearance: none; min-height: 46px; }
.intro { margin: -6px 0 18px; opacity: .8; }
button.opt {
  display: block; width: 100%; text-align: left; margin: 6px 0; padding: 12px 14px;
  font-size: 1rem; font-family: inherit; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); cursor: pointer;
}
button.opt.sel { border: 2px solid var(--ink); background: var(--tint-a); font-weight: 600; padding: 11.5px 13.5px; }
.scale-row { display: flex; gap: 8px; }
.scale-row button.opt { flex: 1; text-align: center; margin: 0; }
.nav { display: flex; gap: 10px; margin-top: 28px; }
.nav button {
  padding: 13px 24px; font-size: 1.05rem; font-family: inherit; font-weight: 600;
  border-radius: 999px; cursor: pointer;
}
#btn-avanti { background: var(--ink); color: var(--paper); border: 2px solid var(--ink); flex: 1; }
#btn-indietro { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.branch-gate button {
  display: block; width: 100%; margin: 10px 0; padding: 18px; font-size: 1.1rem;
  font-family: inherit; color: var(--ink); font-weight: 600;
  border: 1.5px solid var(--ink); border-radius: 18px; background: var(--card); cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.branch-gate button:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.branch-gate small { font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .branch-gate button { transition: none; } }
.err { color: var(--bad); margin-top: 10px; }
#grazie { text-align: center; padding: 40px 0; }
#grazie .big { font-size: 2.4rem; }

.lang-btn {
  margin-left: auto; font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: .02em; background: var(--paper); color: var(--ink); border: 2px solid var(--ink);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.lang-btn[hidden] { display: none; }
select.lang-btn { -webkit-appearance: none; appearance: none; text-align: center; text-align-last: center; }

.test-stem { font-size: 1.15rem; line-height: 1.4; }
.test-result { text-align: center; margin: 18px 0 6px; }
.test-level { font-family: 'Modak', cursive; font-weight: 400; font-size: 64px; letter-spacing: .035em; line-height: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px 10px; }
.tags[hidden] { display: none; }
button.opt.tag { display: inline-block; width: auto; margin: 0; padding: 6px 12px; font-size: .92rem; border-radius: 999px; }
button.opt.tag.sel { padding: 5.5px 11.5px; }
