:root {
  color-scheme: dark;
  --bg: #050505;
  --fg-muted: #8a8a8a;
  --fg-hover: #c2c2c2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 48% 45%, #111317 0%, #08090b 40%, var(--bg) 75%);
}

#atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* Keep touch drags in the fluid instead of handing them to browser gestures. */
  touch-action: none;
}

#atmosphere[hidden] {
  display: none;
}

.matte-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("/grain.svg");
}

.bottom-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.75rem 3.25rem;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

.bottom-bar a {
  pointer-events: auto;
  color: var(--fg-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  transition: color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.agency-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1;
}

.insta-link {
  margin-right: -12.5px;
}

.bottom-bar a:hover, .bottom-bar a:focus-visible {
  color: var(--fg-hover);
}

.bottom-bar a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.insta-link svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.25;
}

@media (max-width: 640px) {
  .bottom-bar {
    padding: 1.85rem 2rem;
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-bar a {
    transition: none;
  }
}

.legal-trigger {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  white-space: nowrap;
  z-index: 50;
  min-height: 32px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: #888;
  font: 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.legal-trigger:hover {
  color: #fff;
}

.legal-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(460px, calc(100% - 32px));
  max-width: none;
  max-height: 82vh;
  max-height: 82svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 4px;
  background: #080808;
  color: #aaa;
  font: 12px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #333 #080808;
}

.legal-modal::backdrop {
  background: rgb(0 0 0 / 80%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.legal-modal-content {
  padding: 18px 24px 26px;
  overflow-wrap: anywhere;
}

.legal-header-bar,
.legal-lang-switch {
  display: flex;
  align-items: center;
}

.legal-header-bar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.lang-btn,
.legal-close {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
}

.lang-btn {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.lang-btn[aria-pressed="true"],
.lang-btn:hover,
.legal-close:hover {
  color: #eee;
}

.lang-btn[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-sep {
  color: #777;
}

.legal-close {
  font-size: 24px;
  line-height: 1;
}

.legal-modal h2 {
  margin-bottom: 8px;
  color: #d0d0d0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.legal-modal p {
  margin-bottom: 10px;
}

.legal-modal p:last-child {
  margin-bottom: 0;
}

.legal-modal strong {
  color: #c2c2c2;
  font-weight: 500;
}

.legal-modal a {
  color: #c2c2c2;
  text-underline-offset: 2px;
}

.legal-divider {
  height: 1px;
  margin: 16px 0;
  background: rgb(255 255 255 / 10%);
}

.legal-trigger:focus-visible,
.legal-modal :focus-visible {
  outline: 1px solid #d0d0d0;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .legal-trigger {
    transition: none;
  }
}
