/* ══════════════════════════════════════════
   FIRE SITE KIT: BASE
   fire.co's base styles (fire-devspace/fire-marketing, public/css/base.css,
   as partners.fire.co carries them): the reset, type, links, fields,
   selects, forms, buttons, cards, the skip link and focus. Left out:
   fire.co's demo widgets and its code panels, whose copy button needs
   fire.co's own script. Added for the kit: the font, images, [hidden], a
   press on a button, and a focus ring on every link and control (the red
   one fire.co draws on everything was taken off partners.fire.co, owner
   2026-10-17, so this one is the text's own grey).
   ══════════════════════════════════════════ */

/* --- Font: Inter, latin, every weight from 300 to 600 in one file --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
}

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

html {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  text-wrap: pretty;
  touch-action: manipulation;
  transition: background var(--duration-slow) var(--ease-in-out),
              color var(--duration-slow) var(--ease-in-out);
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}

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

[hidden] {
  display: none !important;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

h1 strong, h2 strong, h3 strong, h4 strong {
  font-weight: 600;
}

.card h4 {
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
}

p {
  color: var(--text-2);
  max-width: 640px;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-out);
}

a:hover {
  opacity: 0.8;
}

/* A button that reads as a link, inline in a sentence or a table's cell:
   it opens something on the page rather than going anywhere. */
.link-button {
  padding: 0;
  background: none;
  border: none;
  color: var(--cyan);
  font: inherit;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.link-button:hover {
  opacity: 0.8;
}

code, .mono {
  font-family: var(--mono);
}

/* --- Labels --- */
.label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.label-muted {
  color: var(--text-3);
  letter-spacing: var(--tracking-wide);
}

/* --- Utilities --- */
.text-muted {
  font-size: var(--text-xs);
  color: var(--text-3);
}

.lede {
  font-size: var(--text-lg);
  color: var(--text-2);
  margin-bottom: var(--space-8);
}

.section-heading {
  margin: var(--space-4) 0 var(--space-12);
}

.actions-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.badge {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 720px;
}

/* --- Sections --- */
section {
  padding: var(--space-24) 0;
}

/* --- Anchor offset for fixed nav --- */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* --- Form elements --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: var(--space-3) 0;
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

/* A file to choose: its name in the quieter text, after a button drawn as
   the secondary one, compact. */
input[type="file"] {
  color: var(--text-2);
  font-family: var(--sans);
  font-size: var(--text-sm);
}

input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-4);
  min-height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font: 500 var(--text-sm)/20px var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out);
}

input[type="file"]::file-selector-button:hover {
  border-color: var(--border-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-hover);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* A select is a filled box with a solid down arrow at its right, centred on
   its height, 0.8em wide (owner, 2026-11-17: twice what it was). The arrow is
   drawn once, here, cropped to the triangle so it sits where it is put: as
   the box's background where the browser draws its own list, and as the
   mask of its picker icon below where it lets the site's. */
select {
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'%3E%3Cpath fill='%23888' d='M0 0h10L5 5z'/%3E%3C/svg%3E");
  --select-arrow-width: 0.8em;
  --select-arrow-height: 0.4em;
  padding: var(--space-3) calc(var(--space-4) * 2 + var(--select-arrow-width)) var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: var(--select-arrow-width) var(--select-arrow-height);
}

/* Where the browser lets a select be styled whole (appearance: base-select),
   its list is the site's too: the dropdown surface, a highlighted option on
   hover, the chosen one marked in the accent, and an arrow that turns over
   while the list is open. Elsewhere the select above opens the system list. */
@supports (appearance: base-select) {
  select,
  select::picker(select) {
    appearance: base-select;
  }

  /* Its words at the left, the arrow at the right edge, both on its middle. */
  select {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding-right: var(--space-4);
    background-image: none;
  }

  select::picker(select) {
    background: var(--dropdown-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) 0;
    box-shadow: var(--shadow-dropdown);
  }

  select option {
    padding: var(--space-2) var(--space-4);
    color: var(--text);
    transition: background var(--duration-fast) var(--ease-out);
  }

  select option:hover {
    background: var(--surface-2);
  }

  select option:checked {
    background: var(--accent-dim);
  }

  select option::checkmark {
    color: var(--accent);
  }

  select::picker-icon {
    content: "";
    flex: none;
    width: var(--select-arrow-width);
    height: var(--select-arrow-height);
    margin-left: auto;
    background-color: var(--text-2);
    mask: var(--select-arrow) center / contain no-repeat;
    transition: rotate var(--duration-normal) var(--ease-out);
  }

  select:open::picker-icon {
    rotate: 180deg;
  }

  select:open {
    border-color: var(--border-hover);
  }
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* --- Forms ---
   A form is a column of fields, one to a line; a field is its label over its
   control. The status line under the button says what went wrong, and the
   form is replaced by its success message once it is sent. */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 640px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.form__submit {
  align-self: flex-start;
}

.form__status {
  font-size: var(--text-sm);
  min-height: 1.5em;
}

.form__status-error {
  color: var(--accent);
}

.form__success {
  text-align: center;
  padding: var(--space-8) 0;
}

.form__success h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.form__success p {
  color: var(--text-2);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  font-family: var(--sans);
  font-size: var(--text-sm);
  /* 12px, a 20px line, 12px: a button is 44px, so the header is 76px. */
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  opacity: 1;
}

/* A press shows at once. */
.btn:active {
  transform: scale(0.97);
}

/* Marketing modifier: glow + lift. Applied on top of -primary or -secondary. */
.btn-marketing:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
  opacity: 1;
}
.btn-marketing:active {
  transform: translateY(0.5px);
}

/* A disabled button looks it. The :hover half wins over the variants' hovers,
   which would otherwise lift and glow it under the pointer. */
.btn:disabled,
.btn:disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

span.btn-ghost {
  cursor: default;
  pointer-events: none;
  color: var(--text-3);
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  transition: border-color var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
}

.card__title {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
}

/* --- Icons --- */
.icon {
  color: var(--accent);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--accent);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  z-index: var(--z-skip);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

/* --- Focus --- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--text-2);
  outline-offset: 2px;
}

/* A button shows the keyboard's focus as it shows the pointer: no ring and
   no offset, its hover look (owner, 2026-11-17). */
.btn:focus-visible {
  outline: none;
}

.btn-primary:focus-visible {
  opacity: 0.85;
}

.btn-secondary:focus-visible {
  border-color: var(--border-hover);
}

/* --- Selection --- */
::selection {
  background: var(--accent-dim);
  color: var(--text);
}
