/* =========================================================================
   DÁRKOVÁ POUKÁZKA — wizard ve stylu Rituals (struktura dle giftcard.rituals.com)
   Single-file aplikace pro iframe (Shoptet).
   KONFIGURACE a integrační body viz <script> dole (CONFIG, MOCK_MODE).
   ========================================================================= */
:root {
  --bar: #1e1a16; /* tmavý header / footer                 */
  --bg: #f5f1ea; /* hlavní plocha — teplá krémová         */
  --surface: #ffffff;
  --ink: #2a2521; /* primární text                         */
  --label: #5f564c; /* popisky polí                          */
  --muted: #8b8073; /* sekundární text                       */
  --eyebrow: #9a8a77; /* verzálkové sekce „KROK X ZE 3"        */
  --accent: #8c6f5c; /* hnědo-taupe akcent (odkazy, pill)     */
  --accent-d: #735746;
  --line: #dad0c2; /* jemné linky / okraje                  */
  --cta-off: #c2bbb0; /* neaktivní CTA                         */
  --ok: #5a7a5c;
  --err: #a85543;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 16.5px;
  line-height: 1.55;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- HEADER (tmavý) ---------- */
.topbar {
  background: var(--bar);
  color: #efe9e0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.topbar .back {
  position: absolute;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #efe9e0;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.topbar .back.show {
  opacity: 0.92;
  pointer-events: auto;
}
.topbar .back:hover {
  opacity: 1;
}
.topbar .mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
}
.topbar .bag {
  position: absolute;
  right: 20px;
  opacity: 0.85;
}

/* ---------- LAYOUT ---------- */
.page {
  padding: 40px 20px 0;
}
.col {
  margin: 0 auto;
}
.col.wide {
  max-width: 760px;
}
.col.narrow {
  max-width: 460px;
}

h1.title {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(27px, 4.6vw, 36px);
  line-height: 1.12;
  text-align: center;
  margin: 0 0 16px;
}
.lede {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  margin: 0 auto 36px;
  max-width: 56ch;
}

/* ---------- KROK 1: mřížka motivů ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 22px;
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.theme {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.theme .img {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  border-radius: 3px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  outline: 1px solid transparent;
  outline-offset: 0;
  transition:
    outline-color 0.2s ease,
    box-shadow 0.2s ease;
}
.theme:hover .img {
  box-shadow: 0 8px 26px -12px rgba(42, 37, 33, 0.4);
}
.theme:focus-visible .img {
  outline: 2px solid var(--accent);
}
.theme[aria-pressed="true"] .img {
  outline: 2px solid var(--ink);
}
.theme .check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(30, 26, 22, 0.55);
  color: #fff;
  display: none;
  place-items: center;
  font-size: 20px;
}
.theme[aria-pressed="true"] .check {
  display: grid;
}
.theme .cap {
  display: block;
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink);
}

/* dlaždice nahrání vlastní fotky */
.theme.upload .img {
  border: 1px dashed #c9beae;
  display: grid;
  place-items: center;
}
.theme.upload .cam {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
}

/* ---------- KROK 2: jeden sloupec ---------- */
.preview {
  width: 78%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 3/2;
  border-radius: 3px;
  background: #cdbfa6 center/cover no-repeat;
  box-shadow: 0 10px 30px -16px rgba(42, 37, 33, 0.5);
}
.change {
  display: block;
  margin: 14px auto 30px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.change:hover {
  color: var(--accent-d);
}

.field {
  margin-bottom: 22px;
}
.field > label {
  display: block;
  font-size: 15.5px;
  color: var(--label);
  margin-bottom: 8px;
}
.req {
  color: var(--accent);
}

.input,
.select,
textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.input::placeholder,
textarea::placeholder {
  color: #b3a99b;
  font-style: italic;
}
.input:focus,
.select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140, 111, 92, 0.14);
}
textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: #b3a99b;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%238B8073' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.select.filled {
  color: var(--ink);
}
.count {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* eyebrow sekce */
.section {
  text-align: center;
  margin: 40px 0 22px;
}
.section .step {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.section .name {
  font-family: var(--body);
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-d);
  margin-top: 5px;
}

/* video drop-zone */
.dropzone {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 34px 20px;
  text-align: center;
}
.dropzone .vico {
  font-size: 30px;
  color: #c9beae;
}
.dropzone .pill {
  display: inline-block;
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 11px 26px;
  border-radius: 30px;
  transition: background 0.2s;
}
.dropzone .pill:hover {
  background: var(--accent-d);
}
.dropzone .picked {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink);
  display: none;
}
.dropzone.has .picked {
  display: block;
}
.vhint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

/* ---------- CTA ---------- */
.cta {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  padding: 17px;
  border-radius: 2px;
  margin-top: 34px;
  transition:
    background 0.2s,
    opacity 0.2s;
}
.cta:hover:not(:disabled) {
  background: #000;
}
.cta:disabled {
  background: var(--cta-off);
  cursor: not-allowed;
}
.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.undercta {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 16px;
}

/* ---------- hlášky ---------- */
.note {
  font-size: 14px;
  padding: 12px 15px;
  border-radius: 3px;
  margin-top: 18px;
  display: none;
}
.note.show {
  display: block;
}
.note.err {
  background: #f8eae5;
  color: var(--err);
  border: 1px solid #e7ccc2;
}
.note.info {
  background: #efe7da;
  color: var(--accent-d);
  border: 1px solid var(--line);
}
.spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rot 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 9px;
}
@keyframes rot {
  to {
    transform: rotate(360deg);
  }
}
.skeleton .img {
  background: linear-gradient(90deg, #ece4d6, #f4eee3, #ece4d6);
  background-size: 200% 100%;
  animation: sh 1.3s infinite;
}
@keyframes sh {
  to {
    background-position: -200% 0;
  }
}

/* ---------- děkovací obrazovka ---------- */
.done {
  text-align: center;
  padding: 8px 0 10px;
}
.done .seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 22px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.summary {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px 20px;
  font-size: 15px;
  margin: 26px 0;
}
.summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.summary .row:last-child {
  border-bottom: none;
}
.summary .row span:first-child {
  color: var(--muted);
}

/* ---------- footer ---------- */
.footer {
  background: var(--bar);
  color: #b7aea1;
  margin-top: 60px;
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.footer .emblem {
  font-family: var(--serif);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: #efe9e0;
  font-size: 14px;
  margin-bottom: 8px;
}

.hidden {
  display: none !important;
}
