/* ==========================================================================
   Śledzik Wigilijny – landing page
   Values taken from Figma file "Praski Śledź" (node 1:2).
   ========================================================================== */

:root {
  /* Palette */
  --c-page: #cbb78b;
  --c-paper-light: #eadcba;
  --c-paper-dark: #d9c79f;
  --c-ink: #1a1715;
  --c-green: #314936;
  --c-green-dark: #213529;
  --c-red: #7f3628;
  --c-red-shadow: #58271f;
  --c-cream: #eadcba;
  --c-cream-border: #e6d5ae;

  /* Type */
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: Georgia, "Gelasio", "Times New Roman", serif;

  /* Layout */
  --paper-w: 680px;
  --content-w: 570px;
  --gutter: 55px;
  --frame-inset: 18px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--c-ink);
  font-family: var(--f-serif);
  background-color: var(--c-page);
  background-image:
    radial-gradient(ellipse 437px 397px at calc(50% - 624px) 128px, rgba(255, 247, 221, 0.45), rgba(255, 247, 221, 0)),
    radial-gradient(ellipse 426px 387px at calc(50% + 661px) 792px, rgba(91, 63, 28, 0.12), rgba(91, 63, 28, 0));
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

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

p,
h1,
h2,
dl,
dd,
fieldset {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Paper column
   -------------------------------------------------------------------------- */

.paper {
  position: relative;
  width: 100%;
  max-width: var(--paper-w);
  margin: 0 auto 14px;
  padding: 58px var(--gutter) 48px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(33, 20, 7, 0.2);
  background-image:
    linear-gradient(93.87deg, rgba(255, 252, 230, 0) 32.761%, rgba(255, 252, 230, 0.08) 49.138%, rgba(255, 252, 230, 0) 62.929%),
    linear-gradient(90deg, rgba(69, 46, 19, 0.09) 0%, rgba(69, 46, 19, 0) 4%, rgba(69, 46, 19, 0) 96%, rgba(69, 46, 19, 0.09) 100%),
    radial-gradient(ellipse 760px 2378px at 50% 0, var(--c-paper-light) 0%, var(--c-paper-dark) 72%);
  background-color: var(--c-paper-dark);
}

.paper__frame {
  position: absolute;
  inset: var(--frame-inset);
  border: 1px solid rgba(85, 58, 25, 0.48);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Shared text styles
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 10.4px;
  line-height: 10.4px;
  letter-spacing: 2.912px;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-green);
}

.eyebrow--lined {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.eyebrow--lined::before,
.eyebrow--lined::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--c-green);
}

.label {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 10.4px;
  line-height: 10.4px;
  letter-spacing: 1.456px;
  text-transform: uppercase;
  color: var(--c-green-dark);
}

/* --------------------------------------------------------------------------
   Hero / poster
   -------------------------------------------------------------------------- */

.hero .poster {
  margin-top: 20px;
}

/* The exported image includes the poster drop shadow (25px each side,
   11px above, 39px below), so it is offset to keep the poster itself
   exactly on the 570px content width. */
.poster img {
  width: calc(100% * 620 / 570);
  max-width: none;
  height: auto;
  margin: calc(-100% * 11 / 570) 0 calc(-100% * 39 / 570) calc(-100% * 25 / 570);
}

/* --------------------------------------------------------------------------
   Ornament divider
   -------------------------------------------------------------------------- */

.ornament {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 43px 0 36px;
}

.ornament__line {
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(49, 73, 54, 0), var(--c-green));
}

.ornament__line--rev {
  background: linear-gradient(90deg, var(--c-green), rgba(49, 73, 54, 0));
}

.ornament img {
  flex: none;
}

.card + .ornament {
  margin: 37px 0;
}

.ornament--small {
  width: 100%;
  max-width: 399px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Info card
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  padding: 42px 54px 38px;
  background: rgba(232, 218, 184, 0.32);
  border: 1px solid var(--c-green);
  box-shadow: 0 9px 20px rgba(55, 37, 15, 0.08);
}

.card__corner {
  position: absolute;
  width: 31px;
  height: 31px;
  border: 0 solid var(--c-ink);
}

.card__corner--tl { top: 10px; left: 10px; border-top-width: 3px; border-left-width: 3px; }
.card__corner--tr { top: 10px; right: 10px; border-top-width: 3px; border-right-width: 3px; }
.card__corner--bl { bottom: 10px; left: 10px; border-bottom-width: 3px; border-left-width: 3px; }
.card__corner--br { bottom: 10px; right: 10px; border-bottom-width: 3px; border-right-width: 3px; }

.card__intro {
  margin-top: 3px;
  font-style: italic;
  font-size: 13.28px;
  line-height: 19.92px;
  text-align: center;
  text-wrap: pretty;
}

.details {
  padding: 27px 0 25px;
}

.details__row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  padding: 18px 16px;
  border-top: 1px solid rgba(49, 73, 54, 0.38);
}

.details__row:last-child {
  border-bottom: 1px solid rgba(49, 73, 54, 0.38);
}

.details dt {
  padding-top: 2px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 10.4px;
  line-height: 12.48px;
  letter-spacing: 1.352px;
  text-transform: uppercase;
  color: var(--c-red);
}

.details dd strong {
  display: block;
  font-weight: 700;
  font-size: 15.36px;
  line-height: 23.04px;
}

.details dd .regular {
  font-weight: 400;
}

.details dd span {
  display: block;
  font-size: 13.12px;
  line-height: 19.68px;
}

/* Calendar pill */

.calendar {
  display: flex;
  align-items: center;
  width: fit-content;
  height: 40px;
  margin: 0 auto;
  overflow: hidden;
  background: rgba(237, 224, 192, 0.52);
  border: 1px solid var(--c-green);
  border-radius: 99px;
}

.calendar__label {
  padding: 10px 12px 10px 17px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 10.88px;
  line-height: 10.88px;
  letter-spacing: 0.544px;
  color: var(--c-green-dark);
  white-space: nowrap;
}

.calendar__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-left: 1px solid rgba(49, 73, 54, 0.35);
  color: var(--c-green-dark);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.calendar__btn:hover {
  background: rgba(49, 73, 54, 0.1);
}

.calendar__btn:focus-visible {
  outline-offset: -3px;
}

.calendar__g {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 14.4px;
  line-height: 14.4px;
}

/* --------------------------------------------------------------------------
   RSVP
   -------------------------------------------------------------------------- */

.rsvp__lead {
  margin-top: 19.6px;
  font-style: italic;
  font-size: 12.48px;
  line-height: 19.968px;
  text-align: center;
}

.form {
  margin-top: 57px;
}

.input {
  display: block;
  width: 100%;
  height: 50.8px;
  margin: 0;
  padding: 14px 15px 12px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 15.2px;
  color: var(--c-ink);
  background: rgba(239, 225, 191, 0.45);
  border: 1px solid rgba(26, 23, 21, 0.6);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input::placeholder {
  color: rgba(26, 23, 21, 0.46);
  opacity: 1;
}

.input:focus {
  outline: none;
  border-color: var(--c-green);
  background: rgba(239, 225, 191, 0.7);
  box-shadow: 0 0 0 1px var(--c-green);
}

.input[aria-invalid="true"] {
  border-color: var(--c-red);
  box-shadow: 0 0 0 1px var(--c-red);
}

.form__error {
  margin-top: 8px;
  font-style: italic;
  font-size: 12.48px;
  line-height: 18px;
  color: var(--c-red);
}

/* Radio cards */

.choice {
  min-width: 0;
  margin-top: 25px;
  padding: 0;
  border: 0;
}

.choice__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44.7px;
  padding: 12px 13px;
  font-size: 12.48px;
  line-height: 18.72px;
  color: var(--c-ink);
  background: rgba(235, 220, 184, 0.3);
  border: 1px solid rgba(26, 23, 21, 0.35);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.choice__option:hover {
  background: rgba(235, 220, 184, 0.55);
}

.choice__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__dot {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.choice__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  transition: transform 0.15s ease;
}

.choice__option:has(input:checked) {
  color: var(--c-cream);
  background: var(--c-green);
  border-color: var(--c-green-dark);
}

.choice__option input:checked + .choice__dot::after {
  transform: scale(1);
}

.choice__option:has(input:focus-visible) {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
}

/* CTA button */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 78px;
  margin-top: 30px;
  padding: 12px 16px;
  color: var(--c-cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    var(--c-red);
  border: 3px solid var(--c-cream-border);
  border-radius: 0;
  box-shadow: 0 5px 0 var(--c-red-shadow), 0 8px 10px rgba(42, 25, 11, 0.2);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}

.cta:hover {
  filter: brightness(1.06);
}

.cta:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--c-red-shadow), 0 4px 6px rgba(42, 25, 11, 0.2);
}

.cta__title {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 17.6px;
  line-height: 17.6px;
  letter-spacing: 1.584px;
}

.cta__sub {
  padding-top: 7px;
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 8.8px;
  line-height: 8.8px;
  letter-spacing: 2.112px;
}

/* Thank-you state */

.thanks {
  margin-top: 57px;
  padding: 34px 24px 30px;
  text-align: center;
  background: rgba(232, 218, 184, 0.32);
  border: 1px solid var(--c-green);
  box-shadow: 0 9px 20px rgba(55, 37, 15, 0.08);
}

.thanks:focus {
  outline: none;
}

.thanks__title {
  font-weight: 700;
  font-size: 19px;
  line-height: 26px;
}

.thanks__text {
  margin-top: 10px;
  font-style: italic;
  font-size: 13.28px;
  line-height: 19.92px;
}

.thanks__change {
  margin-top: 20px;
  padding: 4px 2px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 10.4px;
  letter-spacing: 1.456px;
  text-transform: uppercase;
  color: var(--c-green-dark);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  margin-top: 50px;
}

.footer__text {
  padding-top: 18px;
  font-style: italic;
  font-size: 16px;
  line-height: 19px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 679px) {
  :root {
    --gutter: clamp(20px, 6vw, 40px);
    --frame-inset: 8px;
  }

  .paper {
    padding-top: 36px;
    margin-bottom: 0;
    box-shadow: none;
  }

  .ornament {
    margin: 32px 0 28px;
  }

  .card + .ornament {
    margin: 30px 0;
  }

  .card {
    padding: 38px 22px 50px;
  }

  .details__row {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 16px 6px;
  }
}

@media (max-width: 420px) {
  .choice__grid {
    grid-template-columns: 1fr;
  }

  .details__row {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .card__intro br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
