:root {
  --bg: #050505;
  --panel: #0f0f10;
  --panel-2: #161618;
  --border: #232326;
  --text: #f5f5f7;
  --muted: #8a8a92;
  --blue: #4f8ff7;
  --blue-soft: rgba(79, 143, 247, 0.16);
  --card-gray: #1a1a1a;
  --card-border: #242424;
  --purple: #a78bfa;
  --amber: #f5a624;
  --green: #33c76b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(79, 143, 247, 0.15), transparent 24%),
    linear-gradient(180deg, #09090a 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

button:focus,
button:focus-visible,
a:focus,
a:focus-visible {
  outline: none;
  box-shadow: none;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 48px 0;
}

.page-footer {
  margin: 32px 0 0;
  text-align: center;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.2);
}

.page-footer a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 160ms ease;
}

.page-footer a:hover {
  color: rgba(255, 255, 255, 0.6);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10000;
}

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

.modal-card {
  position: relative;
  width: 100%;
  max-width: 1040px;
  max-height: 94vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 64px 44px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.modal-body h1 {
  margin: 0 0 6px;
  max-width: none;
  font-size: 1.8rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: wrap;
  color: var(--text);
}

.modal-body .updated {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 22px;
}

.modal-body h2 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 6px;
}

.modal-body p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 8px;
}

.modal-body a {
  color: var(--blue);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.modal-loading {
  font-size: 0.86rem;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 48px;
  align-items: center;
  margin: auto 0;
}

.copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.lede {
  max-width: 38rem;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.nowrap {
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

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

.button-primary {
  background: var(--blue);
  color: white;
  gap: 7px;
}

.apple-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.button-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  gap: 8px;
}

.github-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.preview {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #0d0d0f 0%, #080809 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.preview-stack {
  height: 360px;
  overflow: visible;
}

.meeting-row,
.chip-row,
.day-switcher {
  display: flex;
  align-items: center;
}

.preview-day {
  color: var(--muted);
}

.day-switcher {
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 14px;
}

.day-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6f7077;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.day-arrow:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.day-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  transform: none;
}

.preview-day {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.day-panel[hidden] {
  display: none;
}

.meeting-card {
  position: relative;
  padding: 13px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-gray);
}

.meeting-card + .meeting-card {
  margin-top: 8px;
}

.meeting-card-live {
  background: var(--card-gray);
  border-color: var(--card-border);
}

.meeting-card-inprogress {
  background: rgb(43, 25, 25);
  border-color: rgba(255, 89, 89, 0.25);
}

.meeting-card-joined {
  background: rgb(18, 38, 23);
  border-color: rgba(51, 199, 107, 0.25);
}

.meeting-card-warm {
  background: rgb(31, 25, 15);
  border-color: rgba(245, 191, 76, 0.2);
}

.meeting-card-scheduled {
  background: var(--card-gray);
  border-color: var(--card-border);
}

.dismiss-button {
  position: absolute;
  top: 13px;
  right: 14px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #5a5a5a;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.dismiss-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.status {
  margin: 0 36px 9px 0;
  color: #6f7077;
  font-size: 0.74rem;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  margin-right: 4px;
  margin-bottom: 1px;
}

.status-inprogress {
  color: rgb(255, 115, 115);
}

.status-live {
  color: var(--purple);
}

.status-joined {
  color: var(--green);
}

.status-warm {
  color: var(--amber);
}

.status-scheduled {
  color: var(--amber);
}

.meeting-row {
  gap: 8px;
}

.time {
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
}

.title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.chip-row {
  gap: 8px;
  margin-top: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.chip-button {
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.chip-button:hover {
  transform: translateY(-1px);
}

.chip-button:active {
  transform: translateY(0);
  opacity: 0.86;
}

.chip-muted {
  background: transparent;
  border: 1px solid #404040;
  color: #bfbfbf;
}

.chip-primary {
  background: var(--blue);
  color: #fff;
  border: 1px solid rgba(79, 143, 247, 0.92);
}

.chip-joined {
  background: rgba(51, 199, 107, 0.12);
  color: #6fe59a;
  border: 1px solid rgba(51, 199, 107, 0.22);
}


.chip-scheduled {
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(243, 182, 77, 0.7);
}

.is-hidden {
  display: none !important;
}

/* Preview header */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
}

.preview-app-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.preview-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #808088;
  cursor: pointer;
  border-radius: 6px;
  transition: color 160ms ease;
}

.preview-icon-btn:hover,
.preview-icon-btn.is-active {
  color: var(--blue);
}

.preview-refresh-btn {
  font: inherit;
  font-size: 0.72rem;
  color: #808088;
  padding: 3px 10px;
  border-radius: 999px;
  border: 0.5px solid rgba(255,255,255,0.2);
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease;
}

.preview-refresh-btn:hover {
  color: var(--text);
}

/* Settings panel */
.settings-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.08);
  margin: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 4px;
  gap: 12px;
  width: 100%;
}

.settings-row-btn {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: opacity 160ms ease;
}

.settings-row-btn:hover { opacity: 0.8; }

.settings-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.settings-section-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  padding: 12px 4px 6px;
}

.minute-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stepper-btn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #999;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease;
}

.stepper-btn:hover { background: rgba(255,255,255,0.26); }

.stepper-display {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255,255,255,0.18);
  padding: 2px 7px;
  border-radius: 6px;
  min-width: 48px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 2px;
}

.stepper-input {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  width: 28px;
  text-align: right;
  outline: none;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.setting-check svg { display: block; }

.setting-check:not(.is-checked) svg circle { fill: transparent; stroke: rgba(255,255,255,0.25); stroke-width: 1; }
.setting-check:not(.is-checked) svg path { display: none; }

.settings-cal-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: opacity 160ms ease;
}

.settings-cal-row:hover { opacity: 0.8; }

.cal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-name {
  flex: 1;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
}

.settings-cal-row:has(.setting-check:not(.is-checked)) .cal-name {
  color: rgba(255,255,255,0.35);
}

.minerva-status {
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: #33c76b;
  flex-shrink: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.feature {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.feature-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.feature-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 28px 0 10px;
  }

  .copy {
    max-width: none;
    min-width: 0;
  }

  .preview-stack {
    max-width: 360px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  /* Decorative floating-alert demo has nowhere to sit once the hero
     drops to a single column — it would just cover the heading. */
  .notif-toast {
    display: none;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 1080px);
    padding: 20px 0 28px;
  }

  h1 {
    font-size: 3rem;
  }

  .button {
    width: 100%;
  }

  .preview-stack {
    max-width: 100%;
    min-width: 0;
  }

  .chip-row {
    flex-wrap: wrap;
  }

  /* Let the "auto-join..." phrase wrap instead of forcing an
     unbreakable line wider than a narrow viewport. */
  .lede .nowrap {
    white-space: normal;
  }
}

/* Floating alert — matches FloatingAlertView.swift exactly */
.notif-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 380px;
  background: rgb(33, 33, 33);
  border: 0.5px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.7);
  z-index: 9999;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  transition: transform 420ms cubic-bezier(0.34,1.1,0.64,1), opacity 300ms ease;
  overflow: hidden;
}

.notif-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.notif-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
}

.notif-status {
  flex: 1;
  font-size: 0.76rem;
  font-weight: 500;
  color: #f5a624;
}

.notif-join-btn {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  color: #4f8ff7;
  cursor: pointer;
  padding: 0;
  transition: opacity 160ms ease;
}

.notif-join-btn:hover { opacity: 0.75; }

.notif-x {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 160ms ease;
}

.notif-x:hover { background: rgba(255,255,255,0.28); }

.notif-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.2);
  margin: 0;
}

.notif-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}

.notif-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.notif-title {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-secondary-btn {
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font: inherit;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  padding: 3px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 160ms ease;
}

.notif-secondary-btn:hover { opacity: 0.75; }

/* Install helper */
.install-help {
  margin-top: 32px;
  max-width: 560px;
}
.install-lede {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.install-lede strong {
  font-weight: 500;
  color: var(--text);
}
.install-lede kbd {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text);
}
.install-cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid rgba(79, 143, 247, 0.45);
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: 0 0 0 3px rgba(79, 143, 247, 0.08), 0 8px 28px rgba(79, 143, 247, 0.10);
}
.install-cmd code {
  flex: 1;
  min-width: 0;
  font: 13px/1.5 "SF Mono", ui-monospace, Menlo, monospace;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.install-cmd code::-webkit-scrollbar {
  display: none;
}
.copy-btn {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--blue);
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  cursor: pointer;
}
.copy-btn:hover {
  filter: brightness(1.1);
}
