/* Landing / signed-out shell. All colors come from assets/tokens.css. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: hsl(var(--surface-page));
  color: hsl(var(--ink));
  font-family: Lato, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
a {
  touch-action: manipulation;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  display: flex;
  justify-content: flex-end;
  padding:
    calc(18px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    0
    calc(18px + env(safe-area-inset-left));
  pointer-events: none;
}

.auth-control {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  pointer-events: auto;
}

.auth-user-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
}

/* Theme toggle — shared by landing header and dashboard sidebar */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: hsl(var(--surface-raised) / 0.9);
  color: hsl(var(--ink-muted));
  box-shadow: 0 0 0 1px hsl(var(--line));
  cursor: pointer;
  transition:
    color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

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

.theme-toggle svg {
  grid-area: 1 / 1;
  transition: transform var(--duration-gentle) var(--ease-lift), opacity var(--duration-fast) ease;
}

:root[data-theme="light"] .theme-icon-moon,
:root:not([data-theme="dark"]) .theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}

.auth-sign-in {
  min-height: 44px;
}

.page-shell {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding:
    112px
    max(24px, env(safe-area-inset-right))
    56px
    max(24px, env(safe-area-inset-left));
}

.hero {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 26px 40px;
  align-items: start;
}

.hero > * {
  animation: gs-rise var(--duration-enter) var(--ease-out) backwards;
}

.hero-copy {
  animation-delay: 60ms;
}

.hero .actions {
  animation-delay: 140ms;
}

.logo {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-lg);
  background: hsl(var(--surface-raised));
  box-shadow: 0 0 0 1px hsl(var(--line)), var(--shadow-1);
  object-fit: contain;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  color: hsl(var(--accent-strong));
  font-family: Montserrat, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: hsl(var(--ink));
  font-family: Montserrat, sans-serif;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 56ch;
  color: hsl(var(--ink-muted));
  font-size: 1.2rem;
  line-height: 1.55;
}

.actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-md);
  font-family: Montserrat, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-base) var(--ease-out),
    color var(--duration-fast) ease,
    transform var(--duration-base) var(--ease-lift);
}

.button:focus-visible {
  outline: 2px solid hsl(var(--focus));
  outline-offset: 3px;
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.primary {
  background: hsl(var(--brand));
  color: hsl(var(--on-brand));
  box-shadow: var(--shadow-2);
}

.secondary {
  background: hsl(var(--surface-raised) / 0.9);
  color: hsl(var(--ink));
  box-shadow: 0 0 0 1px hsl(var(--line-strong));
  backdrop-filter: blur(12px);
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: hsl(var(--brand));
  font-family: Montserrat, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-decoration-color: hsl(var(--brand) / 0.32);
  text-underline-offset: 5px;
  text-transform: uppercase;
  transition: color var(--duration-fast) ease, text-decoration-color var(--duration-fast) ease;
}

:root[data-theme="dark"] .text-link {
  color: hsl(var(--gs-green-300));
}

.text-link:focus-visible {
  outline: 2px solid hsl(var(--focus));
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translateY(-1px);
  }

  .primary:hover {
    background: hsl(var(--brand-strong));
  }

  .secondary:hover {
    background: hsl(var(--surface-raised));
  }

  .theme-toggle:hover {
    color: hsl(var(--ink));
    box-shadow: 0 0 0 1px hsl(var(--line-strong));
  }

  .text-link:hover {
    text-decoration-color: currentColor;
  }
}

@media (max-width: 760px) {
  .page-shell {
    align-items: start;
    padding:
      96px
      max(20px, env(safe-area-inset-right))
      40px
      max(20px, env(safe-area-inset-left));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .logo {
    width: 88px;
    height: 88px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .lede {
    font-size: 1.08rem;
  }

  .actions {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 3.25rem;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .button {
    width: 100%;
  }
}
