/* Inter is loaded in index.html. In the app, Next.js sets this variable. */
:root {
  --font-inter: "Inter";

  /* Marketing-site additions on top of tokens.css (accessibility):
     - a focus ring that is visible on every background
     - a field border with at least 3:1 contrast against the page */
  --color-focus-outline: var(--color-text-heading);
  --color-border-field: light-dark(#8a8a8a, #6b7075);
}

/* ---------- Minimal reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keeps in-page links from hiding headings under the top edge */
  scroll-padding-top: var(--space-5);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3 {
  font-weight: var(--weight-medium);
  color: var(--color-text-heading);
  line-height: 1.2;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- Accessibility helpers ---------- */

/* Visible keyboard focus for every interactive element */
:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: 3px;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* "Skip to main content": hidden until it gets keyboard focus */
.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background-color: var(--color-background-accent);
  color: var(--color-text-on-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Windows High Contrast / forced colors: keep outlines and borders */
@media (forced-colors: active) {
  .button,
  .card,
  .signup {
    border: 1px solid CanvasText;
  }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-5));
}

/* ---------- Buttons (same as panoramik-frontend/src/styles/forms.css) ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem; /* 40px: comfortable touch target */
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  white-space: nowrap;
  padding: var(--space-2) 18px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.button-primary {
  background-color: var(--color-background-accent);
  color: var(--color-text-on-accent);
}

.button-primary:hover {
  background-color: var(--color-background-accent-hover);
}

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

.button-secondary:hover {
  background-color: var(--color-background-gray);
}

/* main gets focus from the skip link; no outline around the whole page */
main:focus {
  outline: none;
}
