/* FLAIR The Wedding Code · Terminanfrage
   Navy und Ivory aus dem bisherigen Funnel. Schrift wie flair-fashion.it:
   Roboto, Light (300) fuer Text und Fragen, Medium (500) fuer Knoepfe,
   Thin Italic (100) fuer Zitat-Quellen. Handy zuerst. */

:root {
  --navy: #2c3345;
  --navy-2: #262c3c;
  --navy-3: #1d2230;
  --ivory: #f2f0eb;
  --stone: #e4e1da;
  --text: rgba(242, 240, 235, .88);
  --mist: rgba(242, 240, 235, .64);
  --faint: rgba(242, 240, 235, .40);
  --line: rgba(242, 240, 235, .16);
  --line-strong: rgba(242, 240, 235, .40);
  --err: #ebb9ab;
  --sans: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gut: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--navy);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(130% 70% at 50% -12%, #353d53 0%, rgba(53, 61, 83, 0) 60%) no-repeat top center / 100% 900px,
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  background-color: var(--navy);
  color: var(--ivory);
  font: 300 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

/* Zweisprachig: jede Textstelle steht doppelt, sichtbar ist nur die aktive Sprache */
html[data-lang="de"] [data-l="it"],
html[data-lang="it"] [data-l="de"] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

/* ---------- Geruest ---------- */

.app { min-height: 100vh; min-height: 100dvh; }

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--gut) calc(env(safe-area-inset-bottom, 0px) + 16px);
}

/* feines Korn, damit die Flaeche nicht digital-glatt wirkt */
.stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
.stage > * { position: relative; z-index: 1; }

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding-top: env(safe-area-inset-top, 0px);
}

.logo { justify-self: center; display: block; }
.logo img { height: 28px; width: auto; }

.back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: -6px;
  padding: 12px 6px;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
.back .arr { width: 16px; height: 10px; transition: transform .3s var(--ease); }
.back[hidden] { display: inline-flex; visibility: hidden; }
.back-spacer { display: block; }

.lang {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--faint);
}
.lang button {
  padding: 12px 3px;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: var(--faint);
  cursor: pointer;
  transition: color .2s;
}
.lang button[aria-pressed="true"] { color: var(--ivory); }
.lang button:focus-visible { outline: 1px solid var(--ivory); outline-offset: 2px; }

@media (hover: hover) {
  .back:hover, .lang button:hover { color: var(--ivory); }
  .back:hover .arr { transform: translateX(-3px); }
}

.progress { height: 1px; background: var(--line); overflow: hidden; }
.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ivory);
  transition: width .7s var(--ease);
}

.flow {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 30px 0 28px;
}

/* ---------- Schritte und Bewegung ---------- */

.step { display: flex; flex-direction: column; text-align: center; }
.step > .btn { align-self: center; }
.step[hidden] { display: none; }

.step.is-entering > *, .step.is-back > * {
  animation: rise .55s var(--ease) both;
}
.step.is-back > * { animation-name: fall; }
.step.is-entering > :nth-child(2), .step.is-back > :nth-child(2) { animation-delay: 40ms; }
.step.is-entering > :nth-child(3), .step.is-back > :nth-child(3) { animation-delay: 80ms; }
.step.is-entering > :nth-child(4), .step.is-back > :nth-child(4) { animation-delay: 120ms; }
.step.is-entering > :nth-child(n+5), .step.is-back > :nth-child(n+5) { animation-delay: 160ms; }
.step.is-leaving { animation: leave .17s ease-in both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fall { from { opacity: 0; transform: translateY(-10px); } }
@keyframes leave { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- Typografie ---------- */

.count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mist);
}

.kicker {
  margin: 0 0 8px;
  font-style: italic;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.35;
  color: var(--mist);
}

.q {
  margin: 0 0 26px;
  font-weight: 300;
  font-size: clamp(26px, 6.9vw, 38px);
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
  outline: none;
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
}
.q-big { font-size: clamp(40px, 11vw, 60px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 22px; }

.hint {
  margin: -14px auto 24px;
  max-width: 34em;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--mist);
  text-wrap: pretty;
}

/* ---------- Bildkacheln (Art der Trauung) ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tile {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(242, 240, 235, .045);
  color: var(--ivory);
  text-align: center;
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.step.is-entering .tile { animation: rise .6s var(--ease) both; animation-delay: calc(140ms + var(--i) * 55ms); }

.tile-img { position: relative; width: 64px; height: 64px; overflow: hidden; }
.tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) brightness(.9);
  transition: transform 1.1s var(--ease), filter .5s var(--ease);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: linear-gradient(180deg, rgba(29, 34, 48, 0) 38%, rgba(29, 34, 48, .88) 100%);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid rgba(242, 240, 235, .14);
  pointer-events: none;
  transition: inset .35s var(--ease), border-color .35s var(--ease);
}
.tile-label {
  position: relative;
  z-index: 2;
  padding: 10px 4px;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .01em;
}

.tick, .swatch-dot, .toggle-box, .consent-box { display: grid; place-items: center; }
.chk { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease); }

.tick {
  position: relative;
  justify-self: center;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(242, 240, 235, .55);
  background: rgba(29, 34, 48, .3);
  color: var(--navy);
  transition: background .25s, border-color .25s;
}

.tile[aria-pressed="true"]::before { inset: 4px; border-color: var(--ivory); }
.tile[aria-pressed="true"] { background: rgba(242, 240, 235, .1); }
.tile[aria-pressed="true"] .tick { background: var(--ivory); border-color: var(--ivory); }
.tile[aria-pressed="true"] .chk { opacity: 1; transform: none; }
.tile[aria-pressed="true"] img { filter: saturate(1) brightness(1); }
.tile:active { transform: scale(.985); }
.tile:focus-visible { outline: 1px solid var(--ivory); outline-offset: 3px; }

@media (hover: hover) {
  .tile:hover img { transform: scale(1.05); filter: saturate(1) brightness(1); }
  .tile:hover::before { border-color: rgba(242, 240, 235, .42); }
}

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .tile { display: block; aspect-ratio: 3 / 4; min-height: 0; background: var(--navy-3); }
  .tile-img { position: absolute; inset: 0; width: auto; height: auto; }
  .tile::after { display: block; }
  .tile-label { position: absolute; left: 10px; right: 10px; bottom: 14px; padding: 0; font-size: 14.5px; text-wrap: balance; }
  .tick { position: absolute; top: 10px; right: 10px; }
  .tile[aria-pressed="true"] { background: var(--navy-3); }
  .tile[aria-pressed="true"]::before { inset: 5px; }
}

/* ---------- Stofffarben ---------- */

.swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 6px;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: color .2s;
}
.step.is-entering .swatch { animation: rise .55s var(--ease) both; animation-delay: calc(120ms + var(--i) * 30ms); }

.swatch-dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 8px 18px -6px rgba(0, 0, 0, .45);
  transition: transform .35s var(--ease), box-shadow .3s var(--ease);
}
.swatch-dot .chk { width: 20px; height: 20px; }

.sw-schwarz    { background: radial-gradient(circle at 32% 26%, #4b4b52 0%, #17171b 52%, #08080a 100%); }
.sw-weiss      { background: radial-gradient(circle at 32% 26%, #ffffff 0%, #f1eee8 50%, #d6d1c6 100%); color: var(--navy); }
.sw-grau       { background: radial-gradient(circle at 32% 26%, #a9abb2 0%, #6e7179 52%, #45474d 100%); }
.sw-gruen      { background: radial-gradient(circle at 32% 26%, #4f7a61 0%, #28493a 52%, #142a20 100%); }
.sw-bordeaux   { background: radial-gradient(circle at 32% 26%, #8e3446 0%, #5a1626 52%, #30080f 100%); }
.sw-beige      { background: radial-gradient(circle at 32% 26%, #f1e7d4 0%, #d4c3a3 52%, #ac9672 100%); color: var(--navy); }
.sw-navy       { background: radial-gradient(circle at 32% 26%, #44507a 0%, #222b4a 52%, #10152a 100%); }
.sw-mittelblau { background: radial-gradient(circle at 32% 26%, #6f98d0 0%, #3a64a0 52%, #1f3d68 100%); }
.sw-offen {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--line-strong);
}

.swatch[aria-pressed="true"] { color: var(--ivory); }
.swatch[aria-pressed="true"] .swatch-dot {
  box-shadow: 0 0 0 3px var(--navy-2), 0 0 0 4px var(--ivory), 0 8px 18px -6px rgba(0, 0, 0, .45);
}
.swatch[aria-pressed="true"] .sw-offen { border-color: var(--ivory); border-style: solid; box-shadow: none; }
.swatch[aria-pressed="true"] .chk { opacity: 1; transform: none; }
.swatch:active .swatch-dot { transform: scale(.94); }
.swatch:focus-visible { outline: none; }
.swatch:focus-visible .swatch-dot { outline: 1px solid var(--ivory); outline-offset: 6px; }

@media (hover: hover) {
  .swatch:hover { color: var(--ivory); }
  .swatch:hover .swatch-dot { transform: translateY(-2px); }
}

/* ---------- Felder ---------- */

.fields { display: grid; gap: 24px; width: 100%; max-width: 460px; margin: 0 auto; }

.field { position: relative; display: block; }
.field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
}
.field-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 8px 0 9px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ivory);
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
  caret-color: var(--ivory);
  -webkit-appearance: none;
  appearance: none;
}
.field-input::placeholder { color: var(--faint); opacity: 1; }
.field-input:-webkit-autofill, .field-input:autofill,
.tel-prefix:-webkit-autofill, .tel-prefix:autofill {
  -webkit-text-fill-color: var(--ivory);
  caret-color: var(--ivory);
  transition: background-color 600000s 0s, color 600000s 0s;
}

/* Datum: Kalender hell, Wert mittig */
.field-input[type="date"] { min-width: 100%; color-scheme: dark; }
.field-input[type="date"]::-webkit-date-and-time-value { text-align: center; }
.field-input[type="date"]::-webkit-calendar-picker-indicator { opacity: .7; cursor: pointer; filter: invert(.9); }
.field.is-off { opacity: .32; pointer-events: none; transition: opacity .3s; }

.field-line {
  position: relative;
  display: block;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}
.field-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ivory);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .5s var(--ease);
}
.field:focus-within .field-line::after { transform: scaleX(1); }
.field.has-error .field-line { background: var(--err); }

.field-err, .step-err {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--err);
}
.field-err:empty, .step-err:empty { display: none; }
.fix {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.tel-row { display: flex; align-items: stretch; justify-content: center; gap: 10px; }
.tel-row .field-input { flex: none; width: 9.5em; max-width: calc(100% - 80px); text-align: left; }
.tel-prefix {
  flex: none;
  min-height: 46px;
  padding: 8px 18px 9px 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f2f0eb' stroke-opacity='.6' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right center / 10px 6px;
  font-size: 20px;
  color: var(--ivory);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.tel-prefix option { color: #111; }

.toggle {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 15px;
  cursor: pointer;
  transition: color .2s;
}
.toggle-box, .consent-box {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--navy);
  transition: background .2s, border-color .2s;
}
.toggle[aria-pressed="true"] { color: var(--ivory); }
.toggle[aria-pressed="true"] .toggle-box { background: var(--ivory); border-color: var(--ivory); }
.toggle[aria-pressed="true"] .chk { opacity: 1; transform: none; }

.consent {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 12px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
  margin: 26px auto 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mist);
  cursor: pointer;
}
.consent input {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
}
.consent-text { padding-top: 1px; }
.consent-text a { color: var(--ivory); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.consent input:checked + .consent-box { background: var(--ivory); border-color: var(--ivory); }
.consent input:checked + .consent-box .chk { opacity: 1; transform: none; }
.consent input:focus-visible + .consent-box { outline: 1px solid var(--ivory); outline-offset: 3px; }
.consent .field-err { grid-column: 2; }
.consent.has-error .consent-box { border-color: var(--err); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Knoepfe ---------- */

.actions { display: flex; justify-content: center; margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 1px;
  background: var(--ivory);
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, transform .16s var(--ease), opacity .25s;
}
.btn .arr { width: 20px; height: 12px; flex: none; transition: transform .35s var(--ease); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 1px solid var(--ivory); outline-offset: 4px; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn.is-sending .arr { animation: nudge 1s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

@media (hover: hover) {
  .btn:hover { background: #fff; }
  .btn:hover .arr { transform: translateX(4px); }
  .btn-ghost:hover { background: rgba(242, 240, 235, .06); }
}

.send-err { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--err); }
.send-err a { color: var(--ivory); }

.note {
  margin: 18px auto 0;
  max-width: 30em;
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mist);
  text-wrap: pretty;
}

/* ---------- Danke ---------- */

.kicker-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.lede { margin: 0 auto 20px; font-size: 17px; line-height: 1.6; color: var(--text); max-width: 34em; text-wrap: pretty; }
.lede-soft { font-size: 15.5px; color: var(--mist); }

.guide { width: 100%; max-width: 480px; margin: 6px auto 22px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; }
.guide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }

.contact {
  margin: 6px 0 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.75;
  color: var(--mist);
}
.contact p { margin: 0; }
.contact a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-title { margin-bottom: 6px !important; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.contact-name { font-size: 20px; font-weight: 400; line-height: 1.4; color: var(--ivory); }
.contact-place { margin-top: 4px !important; }

/* ---------- Fuss, Hinweise ---------- */

.foot {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 2px;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--faint);
}
.foot > span { display: inline-flex; gap: 10px; }
.foot a { color: var(--faint); text-decoration: none; transition: color .2s; }
@media (hover: hover) { .foot a:hover { color: var(--ivory); } }

.noscript { margin: 24px 0 0; padding: 16px 18px; border: 1px solid var(--line); font-size: 15px; }
.noscript p { margin: 0 0 6px; }

/* ---------- Kleine Handyhoehe (z. B. iPhone SE mit Browserleisten) ---------- */

@media (max-width: 959px) and (max-height: 640px) {
  .flow { padding-top: 20px; }
  .q { font-size: clamp(24px, 6.6vw, 32px); margin-bottom: 18px; }
  .count { margin-bottom: 12px; }
  .tile { grid-template-columns: 54px 1fr 54px; min-height: 54px; }
  .tile-img { width: 54px; height: 54px; }
}

/* ---------- Desktop: eine Spalte in der Mitte, nur Frage und Antworten ---------- */

@media (min-width: 960px) {
  .stage { max-width: 880px; padding-left: 40px; padding-right: 40px; }

  .bar { min-height: 88px; }
  .logo img { height: 34px; }

  /* Frage steht bei jedem Schritt auf derselben Hoehe, kein Springen */
  .flow { justify-content: flex-start; padding: clamp(36px, 8vh, 88px) 0 40px; }
  .tiles { gap: 16px; }
  .swatches { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px 4px; }
  .swatch-dot { width: 52px; height: 52px; }
  .fields-2 { grid-template-columns: 1fr 1fr; column-gap: 28px; max-width: 580px; }
  .actions { display: flex; }
  .btn { width: auto; min-width: 250px; }
}

/* ---------- Weniger Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}
