/* usenilo.com (NIL-974). The colour tokens come from the app's own theme:
   build.mjs copies the :root and .dark blocks of src/index.css into
   tokens.css, so this file only consumes them. Type scale, radius and the
   sans stack are Tailwind's defaults, which is what the app renders with. */

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

/* An element with the hidden attribute stays hidden even when a rule below
   gives it a display (the form is display: grid and is hidden on success). */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family:
    ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', 'Noto Color Emoji';
  font-size: 1rem;
  line-height: 1.625;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: hsl(var(--nilo-teal-dark));
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap.narrow {
  max-width: 36rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: hsl(var(--background));
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header: present on every section (sticky), wordmark + Sign in. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}

/* The lockup is used as supplied (never recoloured). Its navy artwork sits on
   a light plate so it stays legible on the dark theme too. */
.wordmark img {
  display: block;
  height: 2.75rem;
  width: auto;
  background: #fff;
  border-radius: var(--radius);
}

section {
  padding: 3rem 0;
  scroll-margin-top: 4rem;
}

.band {
  background: hsl(var(--muted));
}

h1,
h2,
h3 {
  color: hsl(var(--nilo-navy));
  margin: 0 0 1rem;
  font-weight: 600;
}

h1 {
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: -0.01em;
  max-width: 44rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.pilot {
  font-size: 1.125rem;
  max-width: 40rem;
  color: hsl(var(--muted-foreground));
}

.plain-list {
  margin: 0;
  padding-left: 1.25rem;
  max-width: 44rem;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

.columns {
  display: grid;
  gap: 2rem;
}

.steps {
  margin: 0;
  padding-left: 1.5rem;
  max-width: 44rem;
}

.steps li + li {
  margin-top: 0.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary));
}

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

.button-primary:active {
  background: hsl(var(--primary-active));
}

.button-primary:disabled {
  background: hsl(var(--primary-disabled));
  border-color: hsl(var(--primary-disabled));
  cursor: not-allowed;
}

.button-secondary {
  background: hsl(var(--background));
  color: hsl(var(--nilo-navy));
  border: 1px solid hsl(var(--input));
}

.button-secondary:hover {
  background: hsl(var(--accent));
}

/* Form */
form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

label,
legend {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0;
}

.optional {
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--muted-foreground));
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem 0.75rem;
}

input[aria-invalid='true'],
textarea[aria-invalid='true'],
fieldset[aria-invalid='true'] {
  border-color: hsl(var(--destructive));
  outline: 1px solid hsl(var(--destructive));
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 1rem;
  min-height: 2.25rem;
}

.choice input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: hsl(var(--nilo-navy));
}

.form-error {
  margin: 0;
  color: hsl(var(--foreground));
  border-left: 3px solid hsl(var(--destructive));
  padding-left: 0.75rem;
}

.form-success {
  font-size: 1.125rem;
  margin: 0;
}

.form-note {
  font-size: 0.875rem;
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}

.legal-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 0.25rem 0;
}

.copyright {
  color: hsl(var(--muted-foreground));
  margin: 0;
}

@media (min-width: 640px) {
  section {
    padding: 4rem 0;
  }

  h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

@media (min-width: 768px) {
  .columns {
    grid-template-columns: repeat(3, 1fr);
  }

  section {
    padding: 5rem 0;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}
