:root {
  --brown: #4a2b21;
  --brown-deep: #2c1814;
  --gold: #c4a15a;
  --gold-deep: #8d6a32;
  --cream: #f5f3eb;
  --cream-deep: #ebe4d6;
  --beige: #d9d0bb;
  --muted: #6d564b;
  --display: "Cinzel", "Times New Roman", serif;
  --body: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  color: var(--brown);
  background: var(--brown-deep);
  font-family: var(--body);
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--brown-deep);
}

.scene img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  opacity: 0;
  animation: fundo 42s infinite;
}

.scene img:nth-child(1) { animation-delay: 0s; }
.scene img:nth-child(2) { animation-delay: 6s; }
.scene img:nth-child(3) { animation-delay: 12s; }
.scene img:nth-child(4) { animation-delay: 18s; }
.scene img:nth-child(5) { animation-delay: 24s; }
.scene img:nth-child(6) { animation-delay: 30s; }
.scene img:nth-child(7) { animation-delay: 36s; }

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(245, 243, 235, .28), rgba(44, 24, 20, .38));
}

@keyframes fundo {
  0% { opacity: 1; }
  11% { opacity: 1; }
  16% { opacity: 0; }
  90% { opacity: 0; }
  96% { opacity: 1; }
  100% { opacity: 1; }
}

.crest {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}

.crest img {
  width: min(640px, 78vw);
  height: auto;
  opacity: .055;
  filter: saturate(.9);
}

.sheet {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  text-align: center;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2.6rem) 1.5rem;
  background: #f7f4ee;
  border: 1px solid rgba(196, 161, 90, .7);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 7px rgba(247, 244, 238, .95),
    inset 0 0 0 8px rgba(74, 43, 33, .18),
    0 24px 60px rgba(44, 24, 20, .12);
}

.kicker {
  display: inline-block;
  margin: .35rem 0 1.1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--gold);
  color: var(--gold-deep);
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .38em;
  text-indent: .38em;
  text-transform: uppercase;
}

h1 { margin: 0; }

.logo {
  display: block;
  width: min(460px, 92%);
  height: auto;
  margin: 0 auto .35rem;
}

.tag {
  margin: .85rem auto .9rem;
  max-width: 28rem;
  color: var(--brown);
  font-family: var(--display);
  font-size: clamp(1.02rem, 2.4vw, 1.28rem);
  font-weight: 600;
  line-height: 1.35;
}

.lead {
  margin: 0 auto .7rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(.92rem, 2vw, 1rem);
  font-weight: 500;
  line-height: 1.65;
}

.lead.quiet { margin-bottom: 1.35rem; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto 1.5rem;
  padding: 0;
  max-width: 34rem;
  list-style: none;
  border-top: 1px solid rgba(196, 161, 90, .55);
  border-bottom: 1px solid rgba(196, 161, 90, .55);
}

.principles li {
  padding: .85rem .4rem .8rem;
}

.principles li + li {
  border-left: 1px solid rgba(196, 161, 90, .45);
}

.principles b {
  display: block;
  font-family: var(--display);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.principles span {
  display: block;
  margin-top: .28rem;
  color: var(--gold-deep);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.clock-label {
  margin: 0 0 .3rem;
  color: var(--brown);
  font-family: var(--display);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.clock-date {
  margin: 0 0 1rem;
  color: var(--gold-deep);
  font-size: .92rem;
  font-weight: 600;
}

.clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 0 auto 1.35rem;
  max-width: 32rem;
}

.unit {
  padding: .85rem .2rem .7rem;
  background: var(--cream);
  border: 1px solid rgba(196, 161, 90, .75);
  border-radius: 6px;
}

.unit b {
  display: block;
  color: var(--brown);
  font-family: var(--display);
  font-size: clamp(1.45rem, 5.5vw, 2.35rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.unit span {
  display: block;
  margin-top: .35rem;
  color: var(--gold-deep);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.done {
  margin: 0 auto 1.35rem;
  color: var(--brown);
  font-family: var(--display);
  font-size: 1.15rem;
}

.mail-label {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 18rem);
  padding: .85rem 1.3rem;
  color: var(--cream);
  background: var(--brown);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: 8px;
  transition: background .2s ease, transform .2s ease;
}

.mail:hover,
.mail:focus-visible {
  background: var(--gold-deep);
  color: #fff;
  outline: none;
}

.mail:focus-visible {
  box-shadow: 0 0 0 3px rgba(196, 161, 90, .55);
}

.foot {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.foot a {
  color: var(--brown);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.foot a:hover,
.foot a:focus-visible { text-decoration: underline; }

@media (max-width: 560px) {
  .sheet { padding-top: 1.35rem; }
  .kicker { letter-spacing: .26em; text-indent: .26em; }
  .principles { grid-template-columns: 1fr; }
  .principles li + li { border-left: 0; border-top: 1px solid rgba(196, 161, 90, .45); }
  .principles span { letter-spacing: .02em; font-size: .6rem; }
  .clock { gap: .35rem; }
  .unit { padding: .7rem .1rem .55rem; }
  .unit span { letter-spacing: .06em; font-size: .55rem; }
  .mail { width: 100%; min-width: 0; }
}

@media (max-width: 380px) {
  .clock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .mail { transition: none; }
  .scene img { animation: none; opacity: 0; }
  .scene img:first-child { opacity: 1; }
}
