/* Coca-Cola · Advent u Zagrebu – mobilna aplikacija prema vizualima korak po korak
   Font: Better With (Regular 400, Medium 500, Bold 700) */
@font-face { font-family: "Better With"; src: url("/fonts/BetterWith-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Better With"; src: url("/fonts/BetterWith-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Better With"; src: url("/fonts/BetterWith-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: "Better With", system-ui, -apple-system, "Segoe UI", sans-serif;
  --red: #b00307;        /* tekst na bijelim gumbima */
  --bg-1: #ad0306;       /* sredina pozadine */
  --bg-2: #970204;       /* rubovi pozadine (odgovaraju rubovima vizuala) */
  --white: #fff;
  --soft: rgba(255, 255, 255, .78);
  --cam: #140c0b;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--white); background: var(--bg-2); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
button, input, label { font: inherit; }

.screen { display: none; min-height: 100dvh; max-width: 480px; margin: 0 auto; flex-direction: column; align-items: center;
  padding: calc(22px + var(--safe-t)) 22px 0; text-align: center; overflow-x: hidden; }
.screen.active { display: flex; }
.screen-red, .screen-welcome {
  background: radial-gradient(130% 70% at 50% 30%, var(--bg-1) 0%, #a00205 55%, var(--bg-2) 100%); }
body.has-banner .screen:not(.screen-camera) { padding-top: calc(48px + var(--safe-t)); }

.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tipografija */
.logo { align-self: flex-start; height: 28.8px; width: auto; margin: 4.2px 0 25px 3px; }   /* službeni logotip s ® (bez iskrica): ista širina natpisa i isti razmak kao prije */
.eyebrow { margin: 0 0 10px; font-weight: 500; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; }
.headline { margin: 0 0 14px; font-weight: 700; font-size: clamp(32px, 10vw, 40px); line-height: 1.04; text-transform: uppercase; letter-spacing: .005em; }
.title { margin: 0 0 22px; font-weight: 700; font-size: clamp(27px, 8.4vw, 33px); line-height: 1.12; text-wrap: balance; }
.lead { margin: 0 0 24px; font-size: 17px; line-height: 1.38; color: var(--white); text-wrap: balance; }
.fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--soft); text-align: left; }
.fine.center { text-align: center; }

/* gumbi */
.pill-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; max-width: 340px; min-height: 60px;
  padding: 0 52px; border: 0; border-radius: 999px; background: var(--white); color: var(--red); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px rgba(60, 0, 0, .28); transition: transform .08s ease, opacity .15s ease; }
.pill-btn .label { font-weight: 700; font-size: 18px; letter-spacing: .01em; text-transform: uppercase; }
.pill-btn .chev { position: absolute; right: 22px; }
.pill-btn .divider { width: 1.5px; height: 28px; background: currentColor; opacity: .55; }
.pill-btn:active { transform: scale(.985); }
.pill-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.pill-btn.small { min-height: 50px; padding: 0 24px; width: auto; }
.pill-btn.small .label { font-size: 15px; }
#btn-camera { justify-content: flex-start; padding-left: 34px; }
#btn-camera .label { flex: 1; text-align: left; }
.ghost-btn { width: 100%; max-width: 340px; min-height: 54px; margin-top: 14px; border: 2px solid var(--white); border-radius: 999px; background: transparent;
  color: var(--white); font-size: 19px; cursor: pointer; }
.ghost-btn:active { background: rgba(255,255,255,.1); }
#btn-share { display: flex; align-items: center; justify-content: center; gap: 12px; }
button.text-link { background: none; border: 0; font-size: 16px; color: var(--white); }
.text-link { margin-top: 14px; padding: 6px; color: var(--soft); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ukrasi izrezani iz vizuala: rubovi se stapaju s pozadinom */
.snow { display: block; width: calc(100% + 44px); max-width: none; margin: auto -22px 0; padding-top: 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%); mask-image: linear-gradient(180deg, transparent 0, #000 45%); }
.baubles-bottom { display: block; width: calc(100% + 44px); max-width: none; margin: auto -22px 0; padding-top: 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%); mask-image: linear-gradient(180deg, transparent 0, #000 30%); }

/* 1. dobrodošlica */
.screen-welcome { padding: 0; }
.welcome-hero { display: block; width: 100%; margin-top: var(--safe-t);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
body.has-banner .welcome-hero { margin-top: calc(30px + var(--safe-t)); }
.welcome-text { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 6px 24px 0; }
.welcome-text .eyebrow { font-size: 15px; letter-spacing: .2em; }
.screen-welcome .snow { width: 100%; margin: auto 0 0; }

/* 2. kamera */
.screen-camera { background: var(--cam); padding: 0; max-width: none; }
.cam-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; width: 100%; padding: calc(10px + var(--safe-t)) 16px 12px; }
.cam-top h2 { margin: 0; font-weight: 500; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
body.has-banner .cam-top { padding-top: calc(36px + var(--safe-t)); }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.round.big { width: 48px; height: 48px; }
.viewfinder { position: relative; flex: 1; width: 100%; min-height: 50dvh; background: #000; overflow: hidden; }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewfinder video.mirror { transform: scaleX(-1); }
.frame { position: absolute; inset: 7% 5%; pointer-events: none; }
.frame i { position: absolute; width: 28px; height: 28px; border: 2.5px solid rgba(255,255,255,.95); }
.frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 150px; color: #fff; text-shadow: 0 6px 28px rgba(0,0,0,.6); }
.cam-tap { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px; border: 0; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 15px; cursor: pointer; }
.cam-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; background: rgba(0,0,0,.7); }
.cam-error p { margin: 0; max-width: 300px; font-size: 16px; line-height: 1.45; }
.cam-bottom { display: grid; justify-items: center; gap: 12px; width: 100%; padding: 16px 20px calc(18px + var(--safe-b)); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; cursor: pointer; }
.chip .ic { width: 15px; height: 15px; }
.cam-tip { margin: 0; font-size: 16px; }
.cam-tip.warn { color: #ffd9a8; }
.cam-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; width: 100%; max-width: 360px; margin-top: 6px; }
.shutter { width: 80px; height: 80px; border-radius: 50%; border: 3px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fffaf2; transition: transform .1s; }
.shutter:active span { transform: scale(.92); }
.shutter:disabled { opacity: .5; }

/* 3. potvrda */
.photo-wrap { position: relative; max-width: 100%; border: 3px solid var(--white); border-radius: 20px; overflow: hidden; background: #2a0a0a;
  box-shadow: 0 14px 30px rgba(50, 0, 0, .35); }
.photo { display: block; max-width: 100%; max-height: 44dvh; width: auto; height: auto; }
.retake { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 0; border-radius: 999px;
  background: rgba(30, 30, 32, .82); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; backdrop-filter: blur(4px); }
.retake .ic { width: 20px; height: 20px; }
.consent { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: center; width: 100%; max-width: 340px; margin: 22px 0 20px; text-align: left;
  font-size: 17px; line-height: 1.3; cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 30px; height: 30px; margin: 0; border: 2.5px solid var(--white); border-radius: 8px;
  background: transparent; display: grid; place-content: center; cursor: pointer; }
.consent input::after { content: ""; width: 14px; height: 8px; border: 3px solid var(--red); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -2px); opacity: 0; }
.consent input:checked { background: var(--white); }
.consent input:checked::after { opacity: 1; }
.consent input:focus-visible { outline: 3px solid rgba(255,255,255,.5); outline-offset: 2px; }
#s-preview .fine { max-width: 340px; }

/* 4. izrada */
.baubles-hero { display: block; width: calc(100% + 44px); max-width: none; margin: -6px -22px 6px;
  -webkit-mask-image: radial-gradient(75% 72% at 50% 52%, #000 62%, transparent 100%); mask-image: radial-gradient(75% 72% at 50% 52%, #000 62%, transparent 100%); }
.steps { list-style: none; margin: 0 0 24px; padding: 0; width: 100%; max-width: 360px; text-align: left; }
.steps li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: center; padding: 7px 0; opacity: .55; transition: opacity .3s; }
.steps li + li::before { content: ""; position: absolute; left: 22px; top: -9px; width: 2px; height: 18px; background: rgba(255,255,255,.8); }
.steps .dot { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--white); display: grid; place-items: center; }
.steps b { display: block; font-weight: 700; font-size: clamp(14.5px, 4.25vw, 16.5px); line-height: 1.2; letter-spacing: -.005em; }
.steps span:not(.dot) { display: block; margin-top: 3px; font-size: clamp(13px, 3.75vw, 14.5px); line-height: 1.3; color: var(--soft); }
.steps li.now, .steps li.ok { opacity: 1; }
.steps li.ok .dot { background: var(--white); color: var(--red); }
.steps li.ok .dot .ic { display: none; }
.steps li.ok .dot::before { content: ""; width: 14px; height: 8px; border: 3.2px solid var(--red); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -2px); }
.steps li.now .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,255,255,.18); } }
.bar { position: relative; width: 100%; max-width: 360px; height: 40px; padding: 5px; border: 2.5px solid var(--white); border-radius: 999px; }
.bar .fill { display: block; height: 100%; width: 0; max-width: calc(100% - 66px); min-width: 24px; border-radius: 999px; background: var(--white); transition: width .8s ease; }
.bar .pct { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 17px; }

/* 5. gotova čestitka */
.video-wrap { position: relative; border: 3px solid var(--white); border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 14px 30px rgba(50, 0, 0, .35);
  margin-bottom: 22px; }
.result-video { display: block; height: min(50dvh, calc((100vw - 140px) * 16 / 9)); max-height: 520px; aspect-ratio: 9 / 16; width: auto; object-fit: cover; }
.result-video::cue { font-family: var(--font); font-weight: 700; font-size: 15px; background: rgba(0,0,0,.55); }
.play { position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 3px solid var(--white);
  background: rgba(40, 20, 15, .45); color: var(--white); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(3px); }
.play .ic { width: 34px; height: 34px; margin-left: 4px; fill: currentColor; stroke: none; }
.video-wrap.playing .play { display: none; }

/* greška */
#s-error .lead { max-width: 330px; }

.demo-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: calc(7px + var(--safe-t)) 10px 7px; background: #ffd34d; color: #3a2a00;
  text-align: center; font-weight: 700; font-size: 11px; line-height: 1.2; letter-spacing: .06em; }

/* stranica za dijeljenje (/v/:id) */
body.share .screen { display: flex; gap: 16px; padding-bottom: 32px; background: radial-gradient(130% 70% at 50% 30%, var(--bg-1), var(--bg-2)); }
body.share .brand { margin: 8px 0 4px; font-weight: 700; font-size: 32px; }
body.share .result-video { border: 3px solid var(--white); border-radius: 20px; }
body.share .btn { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 340px; min-height: 58px; border-radius: 999px;
  background: var(--white); color: var(--red); font-weight: 700; font-size: 18px; text-transform: uppercase; text-decoration: none; }
body.share .fine { text-align: center; }

@media (min-width: 560px) { body { background: #5e0103; } .screen { box-shadow: 0 0 40px rgba(0,0,0,.35); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
