/* ==========================================================================
   FleetsofPetes.com — shared styles
   Edit the variables below to restyle the whole site at once.
   ========================================================================== */

:root {
  --ink:        #0f1b2d;   /* headings, primary text */
  --ink-soft:   #4a5a70;   /* body copy, secondary text */
  --ink-faint:  #8494a8;   /* captions, meta */
  --surface:    #ffffff;   /* cards, panels */
  --canvas:     #f6f8fb;   /* page background */
  --line:       #dde4ed;   /* borders, rules */
  --accent:     #1d5fd6;   /* links, buttons, focus */
  --accent-dk:  #164aa8;   /* button hover */
  --accent-lt:  #eaf1fd;   /* tinted backgrounds */
  --danger:     #b4232b;
  --ok:         #1a7a4c;

  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --wrap:       1080px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

/* Any class that sets `display` outranks the browser's built-in rule for the
   hidden attribute, which would leave "hidden" panels on screen. This keeps
   hidden meaning hidden. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p  { margin: 0 0 1.1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dk); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Skip link for keyboard and screen-reader users -------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* Header ------------------------------------------------------------------ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: 1.06rem; color: var(--ink);
  text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 8px; font-size: .85rem; font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .96rem; font-weight: 500; }
.nav a:hover { color: var(--accent); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-size: .96rem; font-weight: 600;
  padding: .62rem 1.25rem; border-radius: var(--radius);
  text-decoration: none; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .4rem .85rem; font-size: .88rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Hero -------------------------------------------------------------------- */
.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .wrap { max-width: 760px; text-align: center; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .11em;
  font-size: .74rem; font-weight: 700; color: var(--accent);
  background: var(--accent-lt); padding: .35rem .8rem; border-radius: 999px;
  margin-bottom: 1.4rem;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.24rem); color: var(--ink-soft); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem;
}
.section-alt .card { background: var(--canvas); }
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 1rem;
  display: grid; place-items: center;
  background: var(--accent-lt); color: var(--accent);
}
.card-icon svg { width: 20px; height: 20px; }

/* A card that is itself a link, for the members hub. */
.card-link {
  display: block; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-link:hover {
  border-color: var(--accent); box-shadow: var(--shadow);
  transform: translateY(-1px); color: inherit;
}
.card-link h3 { color: var(--ink); }
.card-cue { display: inline-block; margin-top: .6rem; font-size: .9rem; font-weight: 600; color: var(--accent); }

/* Call-to-action band ----------------------------------------------------- */
.cta { background: var(--ink); color: #c9d5e4; text-align: center; padding: clamp(3rem, 7vw, 4.5rem) 0; }
.cta h2 { color: #fff; }
.cta p { max-width: 520px; margin-inline: auto; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta .btn-primary:hover { background: #e8eef7; color: var(--ink); }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 2rem 0; font-size: .9rem; color: var(--ink-faint);
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* Contact form ------------------------------------------------------------ */
.contact-form { max-width: 640px; margin-inline: auto; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .92rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font: inherit; font-size: .97rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .6rem .8rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field-check { font-size: .93rem; margin: 0 0 1.4rem; }
.field-check label { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; }
.field-check input { margin-top: .25rem; accent-color: var(--accent); }

/* Spam honeypot — hidden from people, visible to bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Members area
   ========================================================================== */

.gate { min-height: 72vh; display: grid; place-items: center; padding: 3rem 0; }
.gate-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 2.4rem; width: min(100% - 2.5rem, 440px); text-align: center;
}
.gate-card h1 { font-size: 1.6rem; }
.gate-card p { font-size: .97rem; }
.gate-note {
  font-size: .86rem; color: var(--ink-faint);
  border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: 1.2rem;
}

.status {
  border-radius: var(--radius); padding: .9rem 1.1rem;
  font-size: .93rem; text-align: left; margin-bottom: 1.2rem;
}
.status-info { background: var(--accent-lt); color: var(--accent-dk); }
.status-warn { background: #fdf3e3; color: #8a5a10; }
.status-error { background: #fdeaea; color: var(--danger); }

/* Member toolbar ---------------------------------------------------------- */
.member-bar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .8rem 0; font-size: .92rem;
}
.member-bar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.who { color: var(--ink-faint); }
.who strong { color: var(--ink); font-weight: 600; }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer;
  padding: .5rem 1rem; border-radius: 999px;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.toolbar {
  display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.search {
  font: inherit; font-size: .93rem; padding: .5rem .85rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); min-width: 220px; flex: 1 1 220px;
}
.meta { font-size: .85rem; color: var(--ink-faint); margin-left: auto; }

/* Data table -------------------------------------------------------------- */
.table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: auto; max-height: 68vh;
}
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--canvas); color: var(--ink);
  text-align: left; font-weight: 650; white-space: nowrap;
  padding: .7rem .9rem; border-bottom: 1px solid var(--line);
}
tbody td {
  padding: .6rem .9rem; border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--ink-soft);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--accent-lt); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { padding: 3rem 1rem; text-align: center; color: var(--ink-faint); }

.spinner {
  width: 22px; height: 22px; margin: 2.5rem auto;
  border: 2.5px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .meta { margin-left: 0; width: 100%; }

  /* The full nav does not fit on a phone. Keep the brand and the login
     button — the section links are a short scroll away anyway. */
  .nav { gap: .8rem; }
  .nav a:not(.btn) { display: none; }
  .site-header .wrap { min-height: 60px; }
}
