/* Tvoj Biznis potpis — brand tokens from the existing site, mobile-first. */

:root {
  color-scheme: only light;

  /* Taken from dragimarjanovic.com by reading the live site's computed
     styles, not by eye: headings are Playfair Display, body is Poppins,
     buttons are #6a626e with #57465d as the deeper purple, and the soft
     section background is #f5e7ea. */
  --cream: #FBF7F2;
  --blush: #F5E7EA;      /* her section background */
  --lilac: #DAD0EC;      /* her light accent tint */
  --purple: #57465D;     /* her deep purple — selected states, buttons */
  --purple-soft: #EFE9F2;/* purple at low opacity, for selected fills */
  --mauve: #6A626E;      /* her secondary text / button colour */
  --ink: #221C1A;
  --gold: #C29B4A;
  --gold-text: #8A6A1F;
  --hairline: rgba(87, 70, 93, .14);

  /* Her real brand fonts. Both cover Croatian diacritics — verified by
     rendering č ć đ š ž rather than trusting document.fonts.check, which
     reports false negatives for unloaded subsets. */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --panel-width: 30rem;
}

*, *::before, *::after { box-sizing: border-box; }

/* .screen and .quiz-header both set their own `display`, which has the same
   specificity as the UA [hidden] rule and would otherwise win as the
   later-declared author style, leaving "hidden" elements visible. */
[hidden] { display: none !important; }

html {
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--ink);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul { margin: 0 0 1em; padding-left: 1.2em; }

a { color: var(--purple); }

button { font-family: inherit; }

/* Focus is always visible on anything interactive; never suppressed there. */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Headings receive programmatic focus on every screen change so assistive
   tech announces the navigation (see showScreen). They are not interactive,
   and mobile browsers treat that focus as :focus-visible — which drew a
   purple frame around the title. No outline for these; buttons and inputs
   keep theirs. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  outline: none;
}

/* Motion is opt-in: nothing transitions unless the visitor has no stated
   preference against it. */
@media (prefers-reduced-motion: no-preference) {
  .option,
  .btn,
  .progress-fill,
  .icon-btn {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, width .3s ease;
  }
  .screen { animation: bp-fade-in .25s ease both; }
  @keyframes bp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Header / progress ---------- */

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--blush); }
.icon-btn:disabled { visibility: hidden; }

.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--purple);
  border-radius: 999px;
}

.progress-count {
  margin: 0;
  min-width: 3.5em;
  text-align: right;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--mauve);
}

/* ---------- Layout ---------- */

main { flex: 1; display: flex; }

.screen {
  flex: 1;
  display: flex;
  width: 100%;
}

.panel {
  width: 100%;
  max-width: var(--panel-width);
  margin: 0 auto;
  padding: 32px 20px 44px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .panel { padding: 56px 24px 64px; }
}

/* ---------- Intro ---------- */

.intro-title {
  font-size: 2rem;
  margin-bottom: .5em;
}

.intro-body p { color: var(--ink); }

.intro-bullets {
  margin: 1.2em 0;
  padding-left: 1.1em;
  color: var(--mauve);
}
.intro-bullets li { margin-bottom: .4em; }

.intro-cta {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 1.2em 0;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--purple);
  margin: 0 0 .8em;
}

/* ---------- Questions ---------- */

.question-text {
  font-size: 1.5rem;
  margin-bottom: 1.1em;
}

/* The question number sits on its own line above the question, in her
   purple, so it is obvious the screen advanced. */
.question-number {
  display: block;
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--purple);
  margin-bottom: .35em;
}
.question-body { display: block; }

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 16px 18px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  cursor: pointer;
}

/* Hover ONLY on devices with a real pointer. On touch, :hover sticks after a
   tap: the next question's option renders under her finger already
   highlighted, which reads as "my answer carried over". Reported from a
   phone, and this is the cause. */
@media (hover: hover) and (pointer: fine) {
  .option:hover { border-color: var(--purple); background: var(--purple-soft); }
}

.option.is-selected {
  border-color: var(--purple);
  background: var(--purple-soft);
  box-shadow: inset 0 0 0 1px var(--purple);
}

.option[disabled] { cursor: default; }

.option-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.option.is-selected .option-mark {
  border-color: var(--purple);
  background: var(--purple);
}
.option-mark svg { opacity: 0; }
.option.is-selected .option-mark svg { opacity: 1; }

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  min-height: 50px;
  padding: 14px 22px;
  cursor: pointer;
}

.btn-block { width: 100%; }

.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: #453750; color: #fff; }
.btn-primary:disabled {
  background: var(--hairline);
  color: var(--mauve);
  cursor: not-allowed;
}

.intro-panel .btn { margin-top: 8px; }

/* ---------- Result & email form ---------- */

.result-heading { font-size: 1.75rem; }

.result-line {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  color: var(--ink);
}
.result-line strong { color: var(--purple); font-weight: 600; }

.email-prompt {
  margin-top: 1.4em;
  font-family: var(--font-heading);
  font-size: 1.125rem;
}

.email-form {
  /* no divider and no visible label: the box sits directly under the
     "Upiši e-mail…" prompt, per her request */
  margin-top: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

/* Kept in the DOM for screen readers — the input still needs a label — but
   not shown; the prompt sentence is the visual label. */
.field-label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.field-input {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
}
.field-input:focus-visible { border-color: var(--purple); }
.field-input[aria-invalid="true"] { border-color: #B3453D; }

.field-error,
.form-error {
  margin: 0;
  font-size: .875rem;
  color: #B3453D;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  color: var(--mauve);
  cursor: pointer;
}

.consent-checkbox {
  flex: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--purple);
}

.consent-copy a { color: var(--purple); }

/* ---------- Confirmation ---------- */

.confirmation-heading { font-size: 1.75rem; }
.confirmation-body { color: var(--mauve); }

/* ---------- Small screens tightened, large screens roomier ---------- */

@media (max-width: 380px) {
  .panel { padding-left: 16px; padding-right: 16px; }
  .option { padding: 14px 16px; }
}

/* The two lines Dragica marked "Font web naslovi" — set in Playfair, larger
   and in her purple, so they read as statements rather than body copy. */
.intro-lead {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.35;
  color: var(--purple);
  margin: 1.1em 0 1em;
}

/* "Tvoj Biznis potpis otkrit će ti:" had no rule of its own, so it sat flush
   against the paragraph above it while every other block had breathing room. */
.intro-reveal-heading {
  margin: 1.6em 0 .2em;
  font-weight: 600;
  color: var(--ink);
}

/* Her photo + name, on the intro and after she submits. Not decoration: it
   puts a face to the invitation and to the promise that the report is coming. */
.signoff {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2.2em;
  padding-top: 1.6em;
  border-top: 1px solid var(--hairline);
}
.signoff-photo {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
}
.signoff-text { min-width: 0; }
.signoff-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  color: var(--ink);
}
.signoff-title {
  margin: .1em 0 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--mauve);
}

/* Her photo at the top of the intro — the visual she asked for. Rounded to
   match the option cards, height-capped so the title stays visible on a
   phone without scrolling past a full-bleed square. */
.intro-hero {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  /* bottom-anchored: the notebook and pen stay in frame; the crop takes the
     top of the hair instead, per her request */
  object-position: 50% 100%;
  border-radius: var(--radius);
  margin-bottom: 1.4em;
}
@media (min-width: 640px) {
  .intro-hero { max-height: 340px; }
}

/* Title + tagline over the hero photo, per her 19.08 request: heading font
   (Playfair) and italic, both lines. White on a purple-tinted scrim that
   fades up from the bottom, so legibility never depends on the photo. */
.intro-hero-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.4em;
}
.intro-hero-wrap .intro-hero {
  border-radius: 0;      /* the wrapper clips the corners now */
  margin-bottom: 0;
  display: block;
}
.intro-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  /* bottom padding of ~2 line-heights lifts the title block up the photo,
     per her request; the scrim reaches higher so the text stays on it */
  padding: 18px 20px 68px;
  background: linear-gradient(to top,
    rgba(44, 33, 50, .68),
    rgba(44, 33, 50, .32) 52%,
    rgba(44, 33, 50, 0) 84%);
}
.intro-hero-overlay .intro-title {
  margin: 0 0 .6em;
  font-size: 2.125rem;
  line-height: 1.18;
  font-style: italic;
  color: #fff;
  letter-spacing: .01em;
  text-shadow: 0 1px 14px rgba(44, 33, 50, .35);
}
.intro-hero-overlay .intro-tagline {
  margin: 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .93);
  text-shadow: 0 1px 12px rgba(44, 33, 50, .35);
}
@media (min-width: 640px) {
  .intro-hero-overlay .intro-title { font-size: 2.75rem; }
}

/* The trade-mark sign: small, superscript, ink — not shouting in Playfair. */
.intro-title .tm {
  font-size: .4em;
  font-style: normal;
  vertical-align: .9em;
  letter-spacing: 0;
  margin-left: 1px;
  color: #fff;
}
