/* EventCut base: tokens, type, glass surfaces, controls, mobile notice */
@font-face { font-family: "Inter Display"; src: url("../fonts/InterDisplay-Black.woff") format("woff"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/InterDisplay-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --night: #070814;
  --night-2: #0E1027;
  --ink: #ECEBFF;
  --ink-2: #A9A8CC;
  --ink-3: #8D8CB3; /* 5:1 on the panels: readable small text */
  --magenta: #FF2E7E;
  --violet: #8B5CFF;
  --electric: #3D7BFF;
  --emerald: #19E3A0;
  --amber: #FFB547;
  --danger: #FF5A6A;
  --glass: rgba(20, 22, 48, 0.42);
  --glass-strong: rgba(14, 16, 38, 0.72);
  --edge: rgba(255, 255, 255, 0.10);
  --edge-bright: rgba(255, 255, 255, 0.22);
  --grade-surround: #2A2A2E; /* neutral grey around the video preview */
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px; --r-pill: 999px;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --accent: var(--magenta);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font: 400 16px/1.55 var(--text); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }

/* aurora layer */
#aurora { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; }
.aurora-fallback body, body.aurora-fallback {
  background:
    radial-gradient(60% 50% at 20% 15%, rgba(139, 92, 255, .45), transparent 70%),
    radial-gradient(50% 45% at 85% 25%, rgba(255, 46, 126, .35), transparent 70%),
    radial-gradient(55% 50% at 70% 90%, rgba(25, 227, 160, .28), transparent 70%),
    radial-gradient(45% 40% at 10% 85%, rgba(61, 123, 255, .35), transparent 70%), var(--night);
  background-attachment: fixed;
}

/* type scale (1.25 ratio) */
.display { font-family: var(--display); font-weight: 900; letter-spacing: -0.045em; line-height: .92; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: 1.45rem; letter-spacing: -0.02em; }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.small { font-size: .875rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }

/* glass */
.glass {
  background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r-lg);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.glass-strong { background: var(--glass-strong); }

/* buttons */
.btn {
  --bg: rgba(255, 255, 255, .08);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 48px; padding: 0 1.4em; border-radius: var(--r-pill); border: 1px solid var(--edge-bright);
  background: var(--bg); color: var(--ink); font-weight: 600; font-size: .98rem; text-decoration: none;
  cursor: pointer; transition: background .25s var(--ease), border-color .25s, transform .25s var(--ease), opacity .2s;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); white-space: nowrap;
}
.btn:hover { --bg: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(115deg, var(--magenta), var(--violet) 55%, var(--electric));
  box-shadow: 0 10px 40px -10px rgba(255, 46, 126, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); }
.btn-ghost { border-color: transparent; --bg: transparent; }
.btn-sm { height: 36px; padding: 0 1em; font-size: .875rem; }
.btn-lg { height: 60px; padding: 0 2em; font-size: 1.08rem; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 12px; }

/* form controls */
.field { display: grid; gap: .45rem; }
.field > span { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: .7em 1em; border-radius: var(--r-md);
  background: rgba(5, 6, 18, .45); border: 1px solid var(--edge); color: var(--ink);
  transition: border-color .2s, background .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet); background: rgba(5, 6, 18, .65); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: .5em; min-height: 40px; padding: .45em 1em; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); color: var(--ink-2); cursor: pointer;
  font-weight: 500; font-size: .92rem; transition: all .2s var(--ease); user-select: none;
}
.chip:hover { color: var(--ink); border-color: var(--edge-bright); }
.chip[aria-pressed="true"], .chip.on {
  color: #fff; border-color: transparent;
  background: linear-gradient(115deg, rgba(255, 46, 126, .85), rgba(139, 92, 255, .85));
}
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); transition: .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .25s var(--ease); }
.switch input:checked + span { background: var(--emerald); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--emerald); outline-offset: 3px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .14); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 255, .45); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 255, .45); }

/* brand */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

/* toast */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; }
.toast { padding: .8em 1.2em; border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--edge-bright); backdrop-filter: blur(16px); font-weight: 500; animation: toastIn .35s var(--ease); }
.toast.error { border-color: rgba(255, 90, 106, .6); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px; background: rgba(3, 4, 12, .55); backdrop-filter: blur(8px); }
.modal[hidden] { display: none; }
.modal-card { width: min(460px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 32px; border-radius: var(--r-xl); animation: toastIn .35s var(--ease); }
.modal-card h3 { margin-bottom: .4rem; }

/* mobile notice: EventCut works on a laptop or PC */
.mobile-gate { display: none; }
@media (max-width: 899px), (pointer: coarse) and (max-width: 1100px) {
  body.gate-on { display: block !important; }
  body.gate-on > *:not(.mobile-gate):not(#aurora) { display: none !important; }
  body.gate-on .mobile-gate {
    display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; padding: 28px 22px 32px; position: relative; overflow: hidden;
  }
}
.mobile-gate video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; z-index: -1; }
.mobile-gate .gate-card { padding: 28px 24px; border-radius: var(--r-xl); }
.mobile-gate h1 { font-size: 2.15rem; margin-bottom: .7rem; }
.mobile-gate .actions { display: grid; gap: 10px; margin-top: 22px; }

.credit { color: var(--ink-2); text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; transition: .2s; }
.credit:hover { color: var(--ink); border-color: var(--emerald); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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