/* Wedding theme: taken from the invitation (white page, navy script, small-caps serif, double-line frame, hydrangea corners).
   Mobile first: everything is a single column that works from 320px up. */

@font-face { font-family: "Pinyon Script"; src: url("/fonts/pinyon-script-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant SC"; font-weight: 400; src: url("/fonts/cormorant-sc-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant SC"; font-weight: 600; src: url("/fonts/cormorant-sc-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --navy: #1f3a7a;
  --navy-line: #4a62a3;
  --blue: #9db9e6;
  --blue-soft: #eef4fc;
  --leaf: #8fa77a;
  --ink: #1f3a7a;
  --danger: #8f2d2d;
  --ok: #2f6b3f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --caps: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Apple Chancery", "Snell Roundhand", cursive;
  --pad: max(18px, env(safe-area-inset-left));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem; /* 19px: comfortable without zooming */
  line-height: 1.45;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

/* The invitation's double-line frame, with a hydrangea in two corners. */
.frame {
  position: relative;
  min-height: calc(100svh - 20px);
  border: 1px solid var(--navy-line);
  outline: 1px solid var(--navy-line);
  outline-offset: 4px;
  margin: 5px;
  padding: clamp(104px, 30vw, 170px) var(--pad) clamp(104px, 30vw, 170px);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.frame { --corner: clamp(104px, 33vw, 200px); }
.frame::before { top: 0; left: 0; width: var(--corner); aspect-ratio: 314 / 364; background-image: url("/img/corner-tl.png"); }
.frame::after { bottom: 0; right: 0; width: clamp(130px, 42vw, 250px); aspect-ratio: 447 / 450; background-image: url("/img/corner-br.png"); }
.frame > * { position: relative; z-index: 1; width: 100%; max-width: 30rem; }

/* The invitation's vine runs from the top-left hydrangea across the top. */
.frame > .vine-top { position: absolute; left: calc(var(--corner) - 2px); top: calc(var(--corner) * .417); width: calc(var(--corner) * 1.97); max-width: none; height: auto; pointer-events: none; z-index: 0; }
.vine { display: block; width: min(92%, 26rem); height: auto; margin: 0 auto 1rem; opacity: .95; }
.divider { display: block; width: min(60%, 14rem); height: auto; margin: 1rem auto; }

.caps { font-family: var(--caps); letter-spacing: .09em; text-transform: lowercase; font-variant-caps: small-caps; font-weight: 400; }
.script { font-family: var(--script); font-weight: 400; line-height: 1.05; color: var(--navy); }
.names { font-size: clamp(3rem, 15vw, 4.8rem); margin: .25rem 0 .5rem; }
.names .amp { display: block; font-size: .62em; }
.lead { font-size: clamp(1.2rem, 4.8vw, 1.45rem); margin: .25rem 0; }
.small { font-size: 1rem; opacity: .85; }

/* The one big button guests use. 88px tall: easy to hit with a shaky thumb. */
.btn-big {
  display: block;
  width: 100%;
  min-height: 88px;
  padding: 18px 20px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-family: var(--caps);
  font-weight: 600;
  font-size: clamp(1.2rem, 6vw, 1.9rem);
  letter-spacing: .06em;
  font-variant-caps: small-caps;
  box-shadow: 0 6px 0 rgba(31, 58, 122, .25);
  cursor: pointer;
  touch-action: manipulation;
}
.btn-big:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(31, 58, 122, .25); }
.btn-big[disabled] { opacity: .55; }
.btn-soft {
  display: inline-block;
  min-height: 52px;
  padding: 12px 22px;
  border: 1.5px solid var(--navy);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-family: var(--caps);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .05em;
  font-variant-caps: small-caps;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.notice { margin: 1rem 0; padding: .9rem 1rem; border-radius: 14px; background: var(--blue-soft); border: 1px solid var(--blue); }
.notice.error { background: #fbeeee; border-color: #e0b3b3; color: var(--danger); }
.hidden { display: none !important; }

@media (min-width: 700px) {
  body { font-size: 1.3rem; }
  .frame { max-width: 52rem; margin: 5px auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
