:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --muted: #737373;
  --border: #e5e5e5;
  --surface: rgba(255, 255, 255, 0.8);
  --grid: #e5e5e5;
  --glow: rgba(0, 0, 0, 0.06);
  --button: #0a0a0a;
  --button-foreground: #ffffff;
  --button-hover: #262626;
  --ring-subtle: rgba(10, 10, 10, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #0a0a0a;
    --foreground: #fafafa;
    --muted: #a3a3a3;
    --border: #262626;
    --surface: rgba(23, 23, 23, 0.8);
    --grid: #262626;
    --glow: rgba(255, 255, 255, 0.07);
    --button: #fafafa;
    --button-foreground: #0a0a0a;
    --button-hover: #e5e5e5;
    --ring-subtle: rgba(250, 250, 250, 0.1);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --muted: #a3a3a3;
  --border: #262626;
  --surface: rgba(23, 23, 23, 0.8);
  --grid: #262626;
  --glow: rgba(255, 255, 255, 0.07);
  --button: #fafafa;
  --button-foreground: #0a0a0a;
  --button-hover: #e5e5e5;
  --ring-subtle: rgba(250, 250, 250, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "SF Pro Display",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: var(--foreground);
  color: var(--background);
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem;
}

.hero__glow,
.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__glow {
  z-index: -2;
  background: radial-gradient(48rem 32rem at 50% -12%, var(--glow), transparent 70%);
}

.hero__grid {
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 4rem 4rem;
  opacity: 0.6;
  mask-image: radial-gradient(38rem 30rem at 50% 45%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(
    38rem 30rem at 50% 45%,
    #000 0%,
    transparent 100%
  );
}

.hero__content {
  display: flex;
  width: 100%;
  max-width: 42rem;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mark {
  display: flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: 9999px;
  background: var(--button);
  color: var(--button-foreground);
  box-shadow:
    0 0 0 1px var(--ring-subtle),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.mark__icon {
  width: 2rem;
  height: 2rem;
  filter: invert(1);
}

:root[data-theme="dark"] .mark__icon {
  filter: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .mark__icon {
    filter: none;
  }
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.hero__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.hero__subtitle svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.theme-switch-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}

.theme-toggle {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

.theme-toggle:hover {
  background: var(--button);
  border-color: var(--button);
  color: var(--button-foreground);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.theme-toggle__icon {
  width: 1rem;
  height: 1rem;
}

.theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--sun {
    display: block;
  }

  :root:not([data-theme]) .theme-toggle__icon--moon {
    display: none;
  }
}

.access-button {
  display: inline-flex;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0 1.5rem;
  border-radius: 9999px;
  background: var(--button);
  color: var(--button-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition:
    background-color 200ms ease,
    transform 200ms ease;
}

.access-button svg {
  width: 1rem;
  height: 1rem;
  transition: transform 200ms ease;
}

.access-button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

.access-button:hover svg {
  transform: translateX(2px);
}

.access-button:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 4px;
}

@media (min-width: 640px) {
  .theme-switch-wrap {
    top: 1.5rem;
    right: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .access-button,
  .access-button svg {
    transition: none;
  }

  .access-button:hover,
  .access-button:hover svg {
    transform: none;
  }
}

@media (forced-colors: active) {
  .theme-toggle:focus-visible,
  .access-button:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 4px;
  }
}
