:root {
  color-scheme: light;
  --background: #071d35;
  --background-2: #0d3d4f;
  --card: rgba(255, 255, 255, 0.95);
  --text: #173047;
  --muted: #527083;
  --primary: #44b549;
  --primary-dark: #31933a;
  --border: rgba(23, 48, 71, 0.18);
  --error: #b42318;
  --success-bg: rgba(68, 181, 73, 0.14);
  --success-text: #276b30;
  font-family: "ManifaPro2", "Manifa Pro 2", "Arial", "Helvetica", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background) url("assets/Main page background.svg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: #ffffff;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-shell {
  min-height: 100vh;
}

/* ── Screens ── */

.screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
}

.screen::before {
  position: absolute;
  inset: 9%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
}

.screen[hidden] {
  display: none;
}

/* ── Thank-you screen uses its own background ── */

.screen-thank-you {
  background: var(--background) url("assets/Thank you page background.svg") no-repeat center center;
  background-size: cover;
}

.screen-thank-you::before {
  display: none;
}

/* ── Brand header ── */

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand-row.end {
  justify-content: flex-end;
}

.brand-logo {
  height: auto;
  object-fit: contain;
}

.event-logo {
  width: min(31vw, 330px);
}

.aramco-logo {
  width: min(19vw, 210px);
}

.compact.event-logo {
  width: min(24vw, 220px);
}

.compact.aramco-logo {
  width: min(17vw, 165px);
}

/* Subtle tap-target hint on the admin trigger */
.admin-trigger {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Two-column form layout ── */

.registration-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 520px);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  width: min(100%, 1100px);
  min-height: calc(100vh - 180px);
  margin: 0 auto;
}

/* ── Left column heading ── */

.learn-more-heading {
  margin: 0 0 28px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.heading-accent {
  color: var(--primary);
}

.registration-heading p {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.55;
}

/* ── Form card ── */

.registration-form {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.field-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

/* ── Text inputs ── */

input[type="text"] {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(68, 181, 73, 0.16);
  outline: none;
}

input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* ── Select dropdowns ── */

select {
  width: 100%;
  padding: 16px 44px 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23527083' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(68, 181, 73, 0.16);
  outline: none;
}

select:disabled {
  background-color: #f5f7f9;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

select option[value=""] {
  color: var(--muted);
}

/* ── Validation errors ── */

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

.error-message {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 0.88rem;
}

.error-message[hidden] {
  display: none;
}

/* ── Submit button ── */

.submit-button {
  width: 100%;
  margin-top: 8px;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: var(--primary-dark);
  outline: none;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.submit-button:active {
  transform: translateY(1px);
}

/* ── Thank-you screen ── */

.thank-you-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 1120px);
  margin: clamp(40px, 8vh, 96px) auto 0;
  text-align: center;
}

.thank-you-art {
  width: min(78vw, 760px);
}

.thank-you-message {
  margin: clamp(20px, 3vh, 32px) 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  max-width: 560px;
}

.countdown-text {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.04em;
  min-height: 1.4em;
}

.home-button {
  width: min(22vw, 156px);
  min-width: 96px;
  margin-top: clamp(32px, 7vh, 70px);
}

.organized-by-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: left;
  font-weight: 500;
  text-transform: uppercase;
}

.thank-you-footer {
  text-align: center;
  margin-top: clamp(16px, 3vh, 28px);
}

/* ── Image button (home) ── */

.image-button {
  padding: 0;
  border: 0;
  background: transparent;
  transition: transform 180ms ease, filter 180ms ease;
}

.image-button:hover,
.image-button:focus-visible {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.2));
  outline: none;
  transform: translateY(-3px) scale(1.02);
}

/* ── Admin overlay ── */

.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 29, 53, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.admin-overlay[hidden] {
  display: none;
}

.admin-card {
  width: min(90vw, 440px);
  padding: 36px 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: #0d2a45;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.admin-title {
  margin: 0 0 20px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary);
  text-transform: uppercase;
}

.admin-count {
  margin: 0 0 28px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
}

.admin-count strong {
  color: #ffffff;
  font-size: 1.25rem;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

.admin-button {
  flex: 1;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 160ms ease;
}

.admin-button:hover,
.admin-button:focus-visible {
  background: var(--primary-dark);
  outline: none;
}

.admin-button-secondary {
  background: rgba(255, 255, 255, 0.12);
}

.admin-button-secondary:hover,
.admin-button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.admin-status {
  margin: 16px 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

/* ── Utility ── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive – tablet/mobile ── */

@media (max-width: 820px) {
  .screen {
    padding: 22px;
    /* respect notch / home indicator on iOS */
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  .brand-row {
    align-items: center;
  }

  .event-logo,
  .compact.event-logo {
    width: min(48vw, 210px);
  }

  .aramco-logo,
  .compact.aramco-logo {
    width: min(30vw, 140px);
  }

  .registration-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    margin-top: 40px;
  }

  .registration-heading {
    text-align: center;
  }

  .registration-heading p {
    margin: 0 auto;
  }

  .learn-more-heading {
    text-align: center;
  }

  .thank-you-content {
    margin-top: 60px;
  }

  /* ── Mobile form card ── */
  .registration-form {
    padding: 24px 20px;
    border-radius: 20px;
  }

  /* Prevent iOS auto-zoom on focus (requires ≥ 16px) */
  input[type="text"],
  select {
    font-size: 16px;
  }

  /* Larger touch targets for dropdowns */
  select {
    padding-top: 18px;
    padding-bottom: 18px;
    min-height: 56px;
  }

  input[type="text"] {
    padding-top: 18px;
    padding-bottom: 18px;
    min-height: 56px;
  }

  .submit-button {
    padding: 18px;
    font-size: 1rem;
    min-height: 56px;
  }

  /* Tighter thank-you on small screens */
  .thank-you-art {
    width: min(88vw, 400px);
  }

  .home-button {
    margin-top: 36px;
  }
}
