/* Glivini e Junior — página provisória ("em breve").
   Segue o convite impresso: papel pérola, nomes em caligrafia dourada,
   texto em serifa cinza-chumbo, moldura fina. */

@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pinyon-script-400.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-400.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #faf7f0;
  --paper-deep: #f1ebdf;
  --gold: #9a7843;
  --gold-deep: #86683a;
  --gold-soft: #c2a577;
  --ink: #4a4a4a;
  --ink-soft: #69645c;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3.2vw, 36px);
  background:
    radial-gradient(ellipse at 50% 38%, #fffdf8 0%, var(--paper) 46%, var(--paper-deep) 100%);
  color: var(--ink);
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.08rem, 0.98rem + 0.5vw, 1.32rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.card {
  position: relative;
  width: min(100%, 880px);
  min-height: calc(100vh - 2 * clamp(14px, 3.2vw, 36px));
  min-height: calc(100svh - 2 * clamp(14px, 3.2vw, 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(56px, 9vw, 96px) clamp(22px, 6vw, 72px);
  border: 1px solid var(--gold-soft);
}

/* segunda linha da moldura, como o contorno em relevo do convite */
.card::before {
  content: "";
  position: absolute;
  inset: clamp(6px, 1vw, 10px);
  border: 1px solid rgba(154, 120, 67, 0.45);
  pointer-events: none;
}

.names {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.32em;
  font-family: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  font-weight: 400;
  font-size: clamp(3.4rem, 1.6rem + 8.4vw, 6.6rem);
  line-height: 1.12;
  /* cor chapada de propósito: degradê com background-clip corta o rabo do J
     e os floreios da caligrafia em alguns navegadores */
  color: var(--gold);
}

.names .and {
  font-size: 0.7em;
  margin-right: 0.1em;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, 260px);
  margin: clamp(22px, 4vw, 34px) auto;
  color: var(--gold-soft);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
}

.rule span {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
}

.date {
  margin: 0;
  font-size: 1.18em;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* algarismos alinhados: o "1" antigo da Cormorant parece um "I" */
  font-variant-numeric: lining-nums;
  /* compensa o espaço que o letter-spacing deixa à direita */
  padding-left: 0.2em;
}

.place {
  margin: clamp(18px, 3vw, 26px) 0 0;
  font-style: normal;
}

.place strong {
  display: block;
  font-size: 1.22em;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.place span {
  display: block;
  color: var(--ink-soft);
}

.soon {
  margin: 0;
}

.soon .label {
  display: block;
  margin-bottom: 0.5em;
  font-size: 0.88em;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding-left: 0.34em;
  color: var(--gold-deep);
}

.soon .line {
  display: block;
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: balance;
}

.back {
  display: inline-block;
  margin-top: 1.6em;
  color: var(--gold);
  font-size: 0.86em;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5em 0.2em 0.35em 0.42em;
  border-bottom: 1px solid var(--gold-soft);
}

.back:hover,
.back:focus-visible {
  color: #7d5f33;
  border-bottom-color: currentColor;
}

.back:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}

/* telas largas: o cartão não precisa ocupar a altura toda */
@media (min-width: 621px) {
  .card {
    min-height: min(calc(100vh - 2 * clamp(14px, 3.2vw, 36px)), 700px);
    min-height: min(calc(100svh - 2 * clamp(14px, 3.2vw, 36px)), 700px);
  }
}

/* telas estreitas: nomes empilhados, como em convite */
@media (max-width: 620px) {
  .names {
    flex-direction: column;
    align-items: center;
    line-height: 1.02;
  }

  .names .and {
    margin: 0.1em 0 0.04em;
  }

  .date {
    letter-spacing: 0.14em;
    padding-left: 0.14em;
  }
}

/* telas baixas (celular deitado): menos respiro vertical */
@media (max-height: 600px) {
  .card {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .rule {
    margin: 14px auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card > * {
    animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .card > :nth-child(2) { animation-delay: 0.12s; }
  .card > :nth-child(3) { animation-delay: 0.22s; }
  .card > :nth-child(4) { animation-delay: 0.32s; }
  .card > :nth-child(5) { animation-delay: 0.42s; }
  .card > :nth-child(6) { animation-delay: 0.52s; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media print {
  body {
    background: #fff;
  }
}
