:root {
  --ink: #242522;
  --muted: #71736e;
  --paper: #f7f6f2;
  --card: #fff;
  --line: #e7e5df;
  --blue: #2d6579;
  --green: #3d7455;
  --orange: #9a6428;
  --shadow: 0 16px 50px rgba(37, 36, 31, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(45, 101, 121, 0.4);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  color: var(--ink);
  background: white;
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Home and invitation hero */
.hero-page {
  min-height: 100svh;
  color: white;
  background: #565854 url("assets/hero.jpg") center center / cover no-repeat;
}

.hero-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 40px);
}

.brand {
  justify-self: start;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover {
  opacity: 0.85;
}

.hero-content {
  width: min(800px, 100%);
  margin: auto;
  padding: 48px 0;
  text-align: center;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.1rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-shadow: 0 2px 25px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  max-width: 660px;
  margin: 26px auto 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 350;
  line-height: 1.65;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.36);
}

.hero-content p + p {
  margin-top: 14px;
}

.hero-content .eyebrow {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 30px;
  padding: 11px 22px;
  color: #222;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.app-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.hero-footer,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.hero-footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.hero-footer a:hover {
  color: white;
  text-decoration: underline;
}

/* Legal pages */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 242, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
}

.header-brand {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
}

.header-nav a[aria-current="page"],
.header-nav a:hover {
  color: var(--ink);
}

.legal-wrap {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 9vw, 92px) 0 72px;
}

.legal-card {
  padding: clamp(28px, 6vw, 58px);
  background: var(--card);
  border: 1px solid rgba(231, 229, 223, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 0 0 5px;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.last-updated {
  margin: 0 0 32px;
  color: #8b8d87;
  font-size: 0.86rem;
}

.intro {
  margin-bottom: 30px;
  color: #42443f;
  font-size: 1.12rem;
  line-height: 1.65;
}

.legal-card h2 {
  margin: 2.25em 0 0.65em;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.legal-card p,
.legal-card li {
  margin-top: 0;
  margin-bottom: 0.8em;
}

.legal-card ul {
  padding-left: 1.35em;
}

.legal-card li::marker {
  color: #92968c;
}

/* Authentication completion pages */
.completion-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.completion-card .intro {
  margin: 18px auto 0;
}

.status-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 800;
}

.completion-actions {
  display: flex;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  color: white;
  background: var(--blue);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-link:hover {
  background: #245467;
}

.security-note {
  margin-top: 28px;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.emoji {
  display: inline-block;
  width: 1.6em;
  margin-right: 5px;
}

.notice {
  margin: 1.7em 0;
  padding: 18px 22px;
  border-radius: 14px;
  border-left: 4px solid var(--green);
  background: #edf6ef;
}

.notice.blue {
  border-left-color: var(--blue);
  background: #ebf4f7;
}

.notice.warning {
  border-left-color: var(--orange);
  background: #fbf2e7;
  font-size: 0.94rem;
}

.notice ul:last-child,
.notice p:last-child {
  margin-bottom: 0;
}

.service-table-wrap {
  margin: 1.25em 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.service-table th,
.service-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.service-table th {
  background: #f7f7f4;
  font-weight: 700;
}

.service-table tr:last-child td {
  border-bottom: 0;
}

.contact-box {
  margin-top: 2.7em;
  padding: 22px;
  background: #f7f7f4;
  border-radius: 14px;
}

.contact-box h2 {
  margin-top: 0;
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 0 20px 38px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hero-page {
    background-position: 57% center;
  }

  .hero-shell {
    padding: 20px;
  }

  .hero-content {
    padding: 42px 8px;
  }

  .hero-content h1 {
    font-size: 2.35rem;
  }

  .hero-footer {
    gap: 5px 18px;
  }

  .header-inner {
    width: min(100% - 30px, 860px);
  }

  .header-nav {
    gap: 14px;
    font-size: 0.82rem;
  }

  .legal-wrap {
    width: min(100% - 24px, 760px);
    padding: 28px 0 50px;
  }

  .legal-card {
    padding: 27px 22px 32px;
    border-radius: 18px;
  }

  .legal-card h2 {
    font-size: 1.18rem;
  }

  .emoji {
    width: auto;
    margin-right: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
