@font-face {
  font-family: "Poppins";
  src: url("/assets/poppins-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/poppins-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/roboto-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/roboto-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --surface: #111214;
  --surface-raised: #191a1d;
  --text: #f2f1ed;
  --muted: #aaa9a5;
  --line: #36373b;
  --accent: #ee293d;
  --accent-strong: #ff4658;
  --accent-text: #17070a;
  --error: #ff8d83;
  --success: #6ed5a2;
  --radius: 14px;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  font-family: "Roboto", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 18%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 24rem),
    var(--surface);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font-family: "Poppins", Arial, sans-serif;
}

button,
.button-link {
  min-height: 52px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0 1.5rem;
  color: var(--accent-text);
  background: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

button:hover,
.button-link:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

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

button:disabled {
  cursor: wait;
  opacity: .7;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 3px;
}

input,
select {
  min-height: 56px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  color: var(--text);
  background: var(--surface-raised);
}

input::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

label {
  display: block;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: .7rem;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 700;
}

h2 {
  margin-bottom: .55rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 600;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}

.brand-logo {
  display: block;
  width: clamp(245px, 34vw, 322px);
  height: auto;
}

.entry-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(1.25rem, 5vw, 4rem);
}

.entry {
  width: min(100%, 780px);
}

.entry-copy {
  margin: clamp(4rem, 13vh, 8rem) 0 2rem;
}

.entry-copy p,
.admin-login > p,
.setup-section > p,
.empty-meeting > p {
  max-width: 42ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.join-form {
  max-width: 680px;
}

.join-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
}

.join-row input {
  min-height: 64px;
  padding-inline: 1.25rem;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.join-row button {
  min-height: 64px;
  min-width: 130px;
}

.form-message {
  min-height: 1.5rem;
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .94rem;
}

.is-error {
  color: var(--error) !important;
}

.is-success {
  color: var(--success) !important;
}

.admin-shell {
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: 1.25rem 0 5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand-small {
  max-width: 190px;
}

.brand-small .brand-logo {
  width: 190px;
}

.admin-login,
.setup-section,
.active-meeting,
.empty-meeting {
  margin-top: clamp(4rem, 12vh, 7rem);
}

.admin-login {
  max-width: 440px;
}

.admin-login h1,
.admin-intro h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.admin-intro {
  margin-top: 4rem;
}

.section-label,
.meeting-status {
  margin-bottom: .45rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stack-form,
.create-form {
  display: grid;
  gap: .8rem;
  margin-top: 1.75rem;
}

.stack-form label,
.create-form label {
  margin: .35rem 0 -.35rem;
}

.notice {
  margin-top: 1rem;
  border-left: 3px solid currentColor;
  padding: .85rem 1rem;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.redirect-value {
  margin: 1.5rem 0;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.redirect-value span {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .8rem;
}

.redirect-value code {
  overflow-wrap: anywhere;
  color: var(--text);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.6rem;
}

.text-button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: .4rem 0;
  color: var(--muted);
  background: transparent;
  font-size: .9rem;
  font-weight: 650;
}

.text-button:hover {
  color: var(--text);
  background: transparent;
}

.text-button.danger {
  color: var(--error);
}

.active-meeting {
  border-top: 1px solid var(--line);
  padding-top: 2.25rem;
}

.meeting-code {
  margin: .25rem 0 .5rem;
  color: var(--text);
  font-size: clamp(3.6rem, 15vw, 8rem);
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.045em;
}

.active-meeting > p:not(.meeting-status) {
  color: var(--muted);
}

.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.secondary:hover {
  background: var(--surface-raised);
  border-color: var(--text);
}

.danger-zone {
  margin-top: 2rem;
}

.create-form {
  max-width: 560px;
}

.create-form button {
  margin-top: .5rem;
}

.manual-meeting {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 2.25rem;
}

.manual-meeting > p:not(.section-label) {
  max-width: 640px;
  color: var(--muted);
}

.manual-meeting code {
  color: var(--text);
}

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: .88rem;
}

.inline-form,
.compact-top {
  margin-top: 1.2rem;
}

.oauth-edit {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 620px) {
  .entry-shell {
    place-items: start stretch;
    padding-top: 1.5rem;
  }

  .entry-copy {
    margin-top: 15vh;
  }

  .brand-logo {
    width: 250px;
  }

  .brand-small .brand-logo {
    width: 170px;
  }

  .join-row {
    grid-template-columns: 1fr;
  }

  .join-row button {
    width: 100%;
  }

  .admin-header {
    min-height: 54px;
  }

  .meeting-actions {
    display: grid;
  }

  .meeting-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
