:root {
  --bg: #f7f3ec;          /* elevandiluu */
  --ink: #3b4234;         /* tume oliiv */
  --muted: rgba(59, 66, 52, 0.62);
  --line: rgba(59, 66, 52, 0.18);
  --accent: #7f8d5a;      /* salvei-roheline */
  --script: "Pinyon Script", "Edwardian Script ITC", cursive;
  --serif: "Italiana", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Paigutus: foto vasakul, tekst paremal ---------- */
.card {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
}

.photo {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  background: #b7c29a;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* hoiab golfipallid (vasakul all) ja paari (keskel) kaadris */
  object-position: 38% 65%;
  animation: fade 1.6s ease-out both;
}

/* foto sulandub tekstipaneeli */
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(247, 243, 236, 0) 86%, var(--bg) 100%);
}

.content {
  flex: 0 0 clamp(360px, 32vw, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 36px;
  animation: rise 1.2s 0.2s ease-out both;
}

/* ---------- Tekst ---------- */
.calendar-label,
.date-month,
.date-place,
.countdown small {
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* "Save the date" – suur, hõredate tähtedega pealkiri nagu trükitud kutsel */
.eyebrow {
  font-family: "Cinzel", var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: 0.26em;
  margin-right: -0.26em;   /* tasakaalustab viimase tähe järel oleva vahe */
  text-transform: uppercase;
  color: #2a3024;          /* tumedam kui muu tekst, et pealkiri oleks selgelt loetav */
  white-space: nowrap;
}

.eyebrow::after {
  content: "";
  display: block;
  width: 64px;
  height: 1.5px;
  margin: 14px auto 0;
  background: var(--accent);
}

.names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.8rem, 4vw, 3.6rem);
  line-height: 1.2;
  margin: 16px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25em;
}

.amp {
  font-size: 0.85em;
  color: var(--accent);
}

.lead {
  font-family: var(--script);
  font-size: 1.35rem;
  color: var(--muted);
}

/* ---------- Kalender ---------- */
.date {
  width: 100%;
  max-width: 250px;
  margin: 22px 0;
  padding: 12px 0 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.date-month { color: var(--ink); margin-bottom: 6px; }

.month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.month span {
  display: grid;
  place-items: center;
  height: 24px;
  color: var(--muted);
}

.month .wd {
  height: 20px;
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.month .the-day {
  position: relative;
  color: var(--ink);
  padding-bottom: 2px;   /* südame visuaalne keskpunkt on kõrgemal */
}

.month .the-day svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 31px;
  height: 29px;
  transform: translate(-50%, -48%);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  overflow: visible;
}

.date-place { margin-top: 6px; }

.countdown {
  display: flex;
  gap: 28px;
  margin-bottom: 26px;
}

.countdown div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown span {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.countdown.is-done {
  font-family: var(--script);
  font-size: 1.6rem;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(59, 66, 52, 0.45);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  outline: none;
}

.note {
  margin-top: 26px;
  font-family: var(--script);
  font-size: 1.2rem;
  color: var(--muted);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Madalam arvutiekraan (nt sülearvuti 1366×768) ---------- */
@media (min-width: 801px) and (max-height: 760px) {
  .content { padding: 28px 36px; }
  .date { margin: 16px 0; }
  .countdown { margin-bottom: 18px; }
  .note { margin-top: 18px; }
}

/* ---------- Mobiil: foto üleval, tekst selle all ---------- */
@media (max-width: 800px) {
  .card { flex-direction: column; }

  .photo {
    flex: none;
    height: 44vh;
    height: 44svh;
    min-height: 300px;
  }

  .photo img { object-position: 36% 100%; }

  .photo::after {
    background: linear-gradient(to bottom, rgba(247, 243, 236, 0) 86%, var(--bg) 100%);
  }

  .content {
    flex: 1 0 auto;
    justify-content: flex-start;
    padding: 14px 20px max(16px, env(safe-area-inset-bottom));
  }

  .eyebrow { font-size: 1.15rem; letter-spacing: 0.24em; margin-right: -0.24em; }
  .eyebrow::after { margin-top: 8px; width: 48px; }
  .names { font-size: clamp(2.3rem, 10.5vw, 2.8rem); margin-top: 6px; }
  .lead { font-size: 1.15rem; }

  .date {
    max-width: 220px;
    margin: 10px 0 12px;
    padding: 7px 0 5px;
  }
  .date-month,
  .date-place { font-size: 0.58rem; }
  .date-month { margin-bottom: 2px; }
  .date-place { margin-top: 2px; }
  .month { font-size: 0.72rem; }
  .month span { height: 19px; }
  .month .wd { height: 15px; font-size: 0.5rem; }
  .month .the-day svg { width: 25px; height: 23px; }

  .countdown { gap: 24px; margin-bottom: 10px; }
  .countdown span { font-size: 1.1rem; }
  .countdown small { font-size: 0.55rem; }

  .calendar-label { font-size: 0.58rem; }
  .buttons { gap: 6px; margin-top: 8px; flex-wrap: nowrap; }

  .btn {
    padding: 8px 11px;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .note { margin-top: 10px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .photo img,
  .content { animation: none; }
}
