@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --ema-blue: #003399;
  --ema-blue-deep: #001a66;
  --ema-blue-mid: #1a4db3;
  --ema-gold: #ffcc00;
  --ema-ink: #0f1b33;
  --ema-muted: #5a6a82;
  --ema-line: #d7deea;
  --ema-surface: #f3f6fb;
  --ema-white: #ffffff;
  --ema-success: #1b7a4e;
  --ema-danger: #b42318;
  --radius: 10px;
  --shadow: 0 18px 50px rgba(0, 26, 102, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ema-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 51, 153, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 204, 0, 0.12), transparent 50%),
    linear-gradient(180deg, #eef2f9 0%, #f7f9fc 40%, #ffffff 100%);
  min-height: 100vh;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ema-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(215, 222, 234, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img,
.brand-logo {
  width: auto;
  height: 56px;
  max-width: min(280px, 55vw);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.receipt-logo {
  width: auto;
  height: 72px;
  max-width: 220px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ema-blue);
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.78rem;
  color: var(--ema-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--ema-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(0, 51, 153, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ema-blue-mid), var(--ema-blue-deep));
  color: var(--ema-white);
  box-shadow: 0 10px 24px rgba(0, 51, 153, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 28px rgba(0, 51, 153, 0.36);
  text-decoration: none;
}

.btn-secondary {
  background: var(--ema-white);
  color: var(--ema-blue);
  border: 1.5px solid var(--ema-line);
}

.btn-secondary:hover {
  border-color: var(--ema-blue);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, #ffe066, var(--ema-gold));
  color: var(--ema-blue-deep);
  box-shadow: 0 10px 24px rgba(255, 204, 0, 0.35);
}

.btn-gold:hover {
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0, 26, 102, 0.92), rgba(0, 51, 153, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='1.5' fill='%23ffcc00' opacity='0.35'/%3E%3C/svg%3E");
  z-index: -1;
  border-radius: 0 0 40px 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  color: var(--ema-white);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero-copy p {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.hero-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.hero-panel li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
}

.hero-panel li:last-child {
  border-bottom: none;
}

.hero-panel .price {
  color: var(--ema-gold);
  font-weight: 700;
  white-space: nowrap;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  margin: 0 0 0.6rem;
  color: var(--ema-blue-deep);
}

.section-head p {
  margin: 0;
  color: var(--ema-muted);
  font-size: 1.05rem;
}

/* Membership cards */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.tier {
  background: var(--ema-white);
  border: 1px solid var(--ema-line);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease;
}

.tier:hover {
  transform: translateY(-4px);
}

.tier.featured {
  border-color: var(--ema-blue);
  outline: 2px solid rgba(0, 51, 153, 0.15);
}

.tier-badge {
  align-self: flex-start;
  background: rgba(0, 51, 153, 0.08);
  color: var(--ema-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.tier.featured .tier-badge {
  background: var(--ema-gold);
  color: var(--ema-blue-deep);
}

.tier h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--ema-blue-deep);
}

.tier .amount {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ema-ink);
}

.tier .amount small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ema-muted);
}

.tier p {
  margin: 0;
  color: var(--ema-muted);
  font-size: 0.95rem;
  flex: 1;
}

.tier .btn {
  margin-top: 0.35rem;
}

/* Benefits table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ema-line);
  border-radius: 16px;
  background: var(--ema-white);
  box-shadow: var(--shadow);
}

.benefits-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.92rem;
}

.benefits-table th,
.benefits-table td {
  padding: 0.85rem 0.95rem;
  text-align: center;
  border-bottom: 1px solid var(--ema-line);
}

.benefits-table th:first-child,
.benefits-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.benefits-table thead th {
  background: linear-gradient(180deg, #e8eefc, #dde7f8);
  color: var(--ema-blue-deep);
  font-size: 0.82rem;
  line-height: 1.3;
}

.benefits-table tbody tr:nth-child(even) {
  background: #f8fafd;
}

.yes {
  color: var(--ema-success);
  font-weight: 700;
}

.no {
  color: #98a2b3;
}

/* Register page */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin: 0 0 0.5rem;
  color: var(--ema-blue-deep);
}

.page-hero p {
  margin: 0;
  color: var(--ema-muted);
  max-width: 40rem;
}

.register-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.panel {
  background: var(--ema-white);
  border: 1px solid var(--ema-line);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--ema-blue-deep);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field label .req {
  color: var(--ema-danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--ema-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fcfdff;
  color: var(--ema-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ema-blue-mid);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.field input.error,
.field select.error {
  border-color: var(--ema-danger);
}

.field-error {
  color: var(--ema-danger);
  font-size: 0.82rem;
  min-height: 1.1em;
}

.membership-options {
  display: grid;
  gap: 0.65rem;
}

.membership-option {
  border: 1.5px solid var(--ema-line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.membership-option:hover,
.membership-option:has(input:checked) {
  border-color: var(--ema-blue);
  background: rgba(0, 51, 153, 0.04);
}

.membership-option input {
  accent-color: var(--ema-blue);
  width: 1.05rem;
  height: 1.05rem;
}

.membership-option .meta strong {
  display: block;
  color: var(--ema-ink);
}

.membership-option .meta span {
  color: var(--ema-muted);
  font-size: 0.85rem;
}

.membership-option .fee {
  font-weight: 700;
  color: var(--ema-blue);
  white-space: nowrap;
}

.corp-sub {
  display: none;
  margin-top: 0.75rem;
  padding-left: 2rem;
}

.corp-sub.visible {
  display: block;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  border: 2px solid var(--ema-line);
  padding: 4px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
}

.checkbox-row input {
  margin-top: 0.25rem;
  accent-color: var(--ema-blue);
  width: 1.05rem;
  height: 1.05rem;
}

.payment-box {
  position: sticky;
  top: 5.5rem;
}

.payment-method {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.payment-method label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid var(--ema-line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}

.payment-method label:has(input:checked) {
  border-color: var(--ema-blue);
  background: rgba(0, 51, 153, 0.04);
}

.selected-plan {
  background: linear-gradient(135deg, var(--ema-blue-deep), var(--ema-blue-mid));
  color: white;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.selected-plan .label {
  font-size: 0.8rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.selected-plan .name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0.2rem 0;
}

.selected-plan .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ema-gold);
}

.coupon-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.coupon-row input {
  border: 1.5px solid var(--ema-line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.totals {
  border-top: 1px solid var(--ema-line);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  color: var(--ema-muted);
}

.totals-row.total {
  color: var(--ema-ink);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 0.35rem;
}

.coupon-msg {
  font-size: 0.85rem;
  margin: -0.4rem 0 0.8rem;
  min-height: 1.2em;
}

.coupon-msg.ok {
  color: var(--ema-success);
}

.coupon-msg.bad {
  color: var(--ema-danger);
}

.form-alert {
  display: none;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}

.form-alert.show {
  display: block;
}

.form-alert.success {
  background: #e8f7ef;
  color: var(--ema-success);
  border: 1px solid #b7e4c7;
}

.form-alert.error {
  background: #fef3f2;
  color: var(--ema-danger);
  border: 1px solid #fecdca;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--ema-line);
  background: var(--ema-blue-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer a {
  color: var(--ema-gold);
}

.site-footer strong {
  color: white;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-logo {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 51, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  width: min(480px, 100%);
  box-shadow: var(--shadow);
}

.modal-card-wide {
  width: min(560px, 100%);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  color: var(--ema-blue-deep);
  font-size: 1.6rem;
}

.modal-card p {
  margin: 0 0 1.2rem;
  color: var(--ema-muted);
}

/* Payment panels */
.pay-panel {
  margin: 0 0 1rem;
}

.pay-fields {
  margin-top: 0.75rem;
}

.pay-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--ema-muted);
}

.card-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.card-brand {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  color: white;
}

.card-brand.visa {
  background: #1a1f71;
}

.card-brand.mc {
  background: #eb001b;
}

.card-brand.amex {
  background: #2e77bc;
}

.bank-box,
.paypal-box,
.stripe-box {
  background: var(--ema-surface);
  border: 1px solid var(--ema-line);
  border-radius: 12px;
  padding: 1rem;
}

.bank-box h3,
.paypal-box h3,
.stripe-box h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ema-blue-deep);
}

.ok-note {
  color: var(--ema-success) !important;
  font-weight: 600;
}

.bad-note {
  color: var(--ema-danger) !important;
  font-weight: 600;
}

.bank-address {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--ema-muted);
}

.bank-details {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.bank-details > div {
  display: grid;
  gap: 0.15rem;
}

.bank-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ema-muted);
}

.bank-details dd {
  margin: 0;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.bank-details code,
.paypal-email {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88rem;
  background: white;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--ema-line);
}

.copy-btn {
  border: 1px solid var(--ema-line);
  background: white;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ema-blue);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--ema-blue);
}

.paypal-email {
  display: inline-block;
  margin: 0.35rem 0 0.9rem;
}

/* Receipt */
.receipt-sheet {
  max-width: 760px;
  margin-inline: auto;
}

.receipt-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ema-blue);
}

.receipt-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ema-blue-deep);
}

.receipt-head p {
  margin: 0.2rem 0 0;
  color: var(--ema-muted);
}

.receipt-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.receipt-meta .muted {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ema-muted);
}

.receipt-sheet h2 {
  margin: 1.25rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ema-blue-deep);
}

.receipt-dl {
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.receipt-dl > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--ema-line);
}

.receipt-dl dt {
  color: var(--ema-muted);
  font-weight: 600;
}

.receipt-dl dd {
  margin: 0;
}

.receipt-dl .total-line {
  font-size: 1.1rem;
  font-weight: 700;
}

@media print {
  .no-print,
  .site-header,
  .site-footer,
  .nav {
    display: none !important;
  }

  body {
    background: white;
  }

  .receipt-sheet {
    box-shadow: none;
    border: none;
  }
}

@media (max-width: 640px) {
  .receipt-meta {
    grid-template-columns: 1fr;
  }

  .receipt-dl > div {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.hero-panel,
.tier,
.panel {
  animation: rise 0.55s ease both;
}

.hero-panel {
  animation-delay: 0.12s;
}

.tier:nth-child(2) {
  animation-delay: 0.08s;
}

.tier:nth-child(3) {
  animation-delay: 0.16s;
}

.tier:nth-child(4) {
  animation-delay: 0.24s;
}

.tier:nth-child(5) {
  animation-delay: 0.32s;
}

@media (max-width: 960px) {
  .hero-grid,
  .register-layout,
  .tiers {
    grid-template-columns: 1fr;
  }

  .payment-box {
    position: static;
  }

  .nav a:not(.btn) {
    display: none;
  }
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .brand-logo {
    height: 44px;
    max-width: min(200px, 58vw);
  }

  .brand-text span {
    display: none;
  }
}
