/* Blue and white theme for niamhandalexanderwedding.site.
   Shared by the site and the login page, so it (and /fonts/) is served without a sign-in.
   Headings: Cormorant Garamond (SIL Open Font License, /fonts/OFL.txt), self-hosted because
   the Content-Security-Policy only allows files from this site. Body: the device's system font. */

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

:root {
  --navy-900: #0c2247;
  --navy-800: #102b55;
  --navy-700: #17396e;
  --blue-600: #2456a3;
  --blue-100: #e6eefa;
  --blue-50: #f4f8fd;
  --pale: #c9dbf5;
  --line: #d9e3f1;
  --white: #ffffff;
  --ink: #142640;
  --muted: #4a5d7a;
  --error: #a3172b;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(12, 34, 71, 0.06), 0 8px 24px rgba(12, 34, 71, 0.08);
  --shadow-hover: 0 2px 4px rgba(12, 34, 71, 0.08), 0 16px 40px rgba(12, 34, 71, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--blue-50);
  -webkit-font-smoothing: antialiased;
}

/* Header */

.hero {
  position: relative;
  padding: 4.5rem 1.25rem 7rem;
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(60rem 30rem at 50% -10%, rgba(120, 165, 230, 0.35), transparent 70%),
    linear-gradient(165deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--navy-700) 100%);
  overflow: hidden;
}

.hero::after {   /* soft curve into the page */
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -1px;
  height: 3.5rem;
  background: var(--blue-50);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.eyebrow,
.tagline {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pale);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 11vw, 5.75rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.amp {
  display: inline-block;
  margin: 0 0.05em;
  font-style: italic;
  color: var(--pale);
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.tagline::before,
.tagline::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: rgba(201, 219, 245, 0.6);
}

.welcome {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0.4rem 0.5rem 0.4rem 1rem;
  font-size: 0.875rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.welcome[hidden] { display: none; }

.welcome a {
  padding: 0.15rem 0.7rem;
  color: var(--navy-800);
  background: var(--white);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Cards */

main {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: -4.5rem auto 0;
  padding: 0 1rem 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card::after {   /* arrow */
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: #b7cbea;
  box-shadow: var(--shadow-hover);
}

.card:hover::after,
.card:focus-visible::after {
  opacity: 1;
  transform: translateX(3px) rotate(45deg);
}

.card:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
}

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--blue-600);
  background: var(--blue-100);
  border-radius: 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.card:hover .icon,
.card:focus-visible .icon {
  color: var(--white);
  background: var(--blue-600);
}

.icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.label {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

footer {
  padding: 0 1rem 3rem;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

footer a {
  color: var(--navy-700);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 57, 110, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}

/* Login page */

.login {
  max-width: 25rem;
  margin: 0 auto;
  padding: 2.25rem 1.75rem 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
}

.login .lead {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--navy-800);
}

.login label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.login input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--blue-50);
  border: 1px solid #c3d3ea;
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.login input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(36, 86, 163, 0.18);
}

.login button {
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.85rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  background: linear-gradient(180deg, var(--blue-600), var(--navy-700));
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(23, 57, 110, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 57, 110, 0.32);
}

.login button:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
}

.error {
  margin: 0 0 1.1rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  color: var(--error);
  background: #fdf1f3;
  border: 1px solid #f3c9d0;
  border-radius: 10px;
}

@media (max-width: 30rem) {
  .hero { padding: 3.5rem 1rem 6rem; }
  .login { padding: 1.75rem 1.25rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Inner pages (invitation.html and similar) */

.hero-small { padding: 3rem 1.25rem 6rem; }
.hero-small h1 { font-size: clamp(2.4rem, 8vw, 3.75rem); }

.panel {
  max-width: 36rem;
  margin: 0 auto;
  padding: 2rem 1.75rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--navy-800);
}

.panel p { margin: 0 0 1rem; color: var(--muted); }
.panel p:last-child { margin-bottom: 0; }

.back {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  background: linear-gradient(180deg, var(--blue-600), var(--navy-700));
  border-radius: 12px;
}

.back:hover { box-shadow: 0 8px 18px rgba(23, 57, 110, 0.28); }
.back:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; }

footer { max-width: 40rem; margin: 0 auto; }
footer p { color: var(--muted); }
