/* Alena & Armin, wedding invitation. Hand-written rebuild of the Framer page.
   Breakpoints as on the original: desktop from 1200px, tablet 810 to 1199.98px, phone up to 809.98px.
   Desktop and tablet share one layout; only the phone rules differ. */

/* Libre Baskerville (Google Fonts, SIL Open Font License). The original declares
   weights 400, 500 and 600 against the same two files, so the same is done here. */
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/libre-baskerville-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback so text keeps its line breaks while the web font loads. */
@font-face {
  font-family: "Libre Baskerville Placeholder";
  src: local("Times New Roman");
  ascent-override: 76.28%;
  descent-override: 21.23%;
  line-gap-override: 0.00%;
  size-adjust: 127.17%;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: rgb(252, 251, 249);
  font-family: sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h2,
p {
  margin: 0;
}

a {
  display: block;
  text-decoration: none;
}

/* ---------- page frame ---------- */

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  overflow: clip;
  background-color: #fcfbf9;
}

.invitation {
  position: relative;
  display: flex;
  flex: none;
  width: 100%;
  max-width: 560px;
  overflow: clip;
  box-shadow:
    0 2.18349px 10.044px -0.625px #aa98760f,
    0 5.17525px 23.8061px -1.25px #aa98760f,
    0 9.44019px 43.4249px -1.875px #aa98760f,
    0 15.6943px 72.1937px -2.5px #aa98760d,
    0 25.345px 116.587px -3.125px #aa98760d,
    0 41.4872px 190.841px -3.75px #aa98760a,
    0 71.4382px 328.616px -4.375px #aa987608,
    0 130px 598px -5px #aa987600;
}

.invitation__inner {
  position: relative;
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: center;
  width: 1px;
  overflow: hidden;
  box-shadow: 0 0 61.7143px #d8d0c980;
}

.hero,
.intro,
.date,
.plan,
.wishes,
.countdown-section,
.rsvp {
  position: relative;
  flex: none;
  width: 100%;
}

/* ---------- picture sections ---------- */
/* The artwork carries its own lettering. Aspect ratios are the ones the original sets,
   which differ slightly from the files' own ratios. */

.hero__image {
  aspect-ratio: 0.488688;
  object-fit: fill;
}

.intro__image {
  aspect-ratio: 1.66924;
  object-fit: fill;
}

.date__image {
  aspect-ratio: 0.5732484076433121;
  object-fit: contain;
}

.date__calendar-image {
  aspect-ratio: 3.789473684210526;
  object-fit: contain;
}

.date__flowers {
  aspect-ratio: 1.6796267496111976;
  object-fit: contain;
}

.plan__image {
  aspect-ratio: 0.6118980169971672;
  object-fit: contain;
}

.plan__map-image {
  aspect-ratio: 3.112391930835735;
  object-fit: contain;
}

.wishes__image {
  aspect-ratio: 1.59763;
  object-fit: fill;
}

/* ---------- countdown ---------- */

.countdown-section {
  aspect-ratio: 1.55396;
}

.countdown-section__bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: fill;
}

.countdown-section__title {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  white-space: pre;
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  font-size: 41px;
  font-weight: 600;
  line-height: 1.2em;
  letter-spacing: -0.03em;
  color: rgb(176, 159, 126);
}

.countdown {
  position: absolute;
  bottom: 40px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
}

.countdown__row {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
  transform-origin: center;
}

.countdown__unit {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 80px;
  height: 126px;
  -webkit-user-select: none;
  user-select: none;
}

.countdown__circle {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: rgb(154, 145, 119);
}

.countdown__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
  pointer-events: none;
}

.countdown__track,
.countdown__progress {
  fill: none;
  stroke: rgb(255, 255, 255);
  stroke-width: 2;
  stroke-linecap: round;
}

.countdown__track {
  opacity: 0.35;
}

.countdown__number {
  position: relative;
  width: max-content;
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1em;
  letter-spacing: -0.02em;
  text-align: center;
  color: rgb(255, 255, 255);
}

.countdown__label {
  width: max-content;
  margin-top: 20px;
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1em;
  letter-spacing: 0;
  text-align: center;
  color: rgb(154, 145, 119);
}

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

.rsvp__panel {
  position: relative;
  width: 100%;
  height: 866px;
}

.rsvp__bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: fill;
}

.rsvp__title {
  position: absolute;
  top: 321px;
  left: 50%;
  transform: translateX(-50%);
  white-space: pre;
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  font-size: 41px;
  font-weight: 600;
  line-height: 1.2em;
  letter-spacing: -0.03em;
  text-align: center;
  color: rgb(255, 255, 255);
}

.rsvp__text {
  position: absolute;
  bottom: 272px;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: 80%;
  transform: translateX(-50%);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3em;
  letter-spacing: -0.03em;
  text-align: center;
  color: rgb(255, 255, 255);
}

.rsvp__deadline {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.rsvp__button {
  position: absolute;
  right: 20px;
  bottom: 22px;
  left: 20px;
  overflow: hidden;
}

.rsvp__button-image {
  aspect-ratio: 3.016759776536313;
  object-fit: fill;
}

.rsvp__footer {
  width: 560px;
  height: 406px;
  object-fit: fill;
}

/* ---------- phone ---------- */

@media (max-width: 809.98px) {
  .countdown-section__title {
    top: 40px;
    font-size: 28px;
  }

  .countdown {
    bottom: 16px;
    height: 144px;
  }

  .countdown__row {
    gap: 20px;
  }

  .countdown__unit {
    width: 60px;
    height: 106px;
  }

  .countdown__circle {
    width: 60px;
    height: 60px;
  }

  .countdown__number {
    font-size: 20px;
  }

  .countdown__label {
    font-size: 16px;
  }

  .rsvp__panel {
    height: 618px;
  }

  .rsvp__title {
    top: 241px;
    font-size: 28px;
  }

  .rsvp__text {
    bottom: 195px;
    font-size: 18px;
  }

  .rsvp__button {
    right: auto;
    bottom: 25px;
    left: 0;
    width: 100%;
  }

  .rsvp__footer {
    width: 100%;
    height: 269px;
  }
}

/* ---------- fix for a breakage in the original ---------- */
/* The RSVP paragraph is anchored to the bottom of its panel and grows upwards as it wraps.
   On the original it runs into the "Potvrdite Dolazak" heading once it reaches six lines
   (viewports of 359px and narrower) and more so at seven lines (271px and narrower).
   The heading is lifted by one text line (23.4px) per extra line, which keeps the same
   spacing the original has between 360 and 376px. Nothing changes at 360px and wider. */

@media (max-width: 359.98px) {
  .rsvp__title {
    top: 217.6px;
  }
}

@media (max-width: 271.98px) {
  .rsvp__title {
    top: 194.2px;
  }
}

/* ---------- 404 page (not part of the original; wording is new) ---------- */

.not-found {
  justify-content: center;
  gap: 24px;
  min-height: 100vh;
  padding: 60px 20px;
  background: rgb(187, 172, 136);
  font-family: "Libre Baskerville", "Libre Baskerville Placeholder", serif;
  text-align: center;
  color: rgb(255, 255, 255);
}

.not-found__title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2em;
  letter-spacing: -0.03em;
}

.not-found__text {
  font-size: 18px;
  line-height: 1.3em;
  letter-spacing: -0.03em;
}

.not-found__link {
  font-size: 18px;
  line-height: 1.3em;
  letter-spacing: -0.03em;
  color: rgb(255, 255, 255);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

@media (min-width: 810px) {
  .not-found__title {
    font-size: 41px;
  }

  .not-found__text,
  .not-found__link {
    font-size: 26px;
  }
}
