/* The Argus Defense Group look, shared by every page on this site that is not
 * one of the three apps.
 *
 * WHY THIS IS A FILE AND NOT INLINE
 * Everything else in this project inlines its styles, deliberately: the apps are
 * one file each so that the edit loop is "change it, reload it". These pages are
 * different -- the account app and the legal page have nothing in common except
 * their appearance, and two copies of a colour palette is two places to change a
 * colour and one place to forget.
 *
 * The values are lifted from www.argusdefensegroup.com so that a customer who
 * arrives from an email does not have to wonder whether they are still dealing
 * with the same company: its exact custom properties, Oswald over Inter, square
 * corners, bronze on near-black.
 *
 * The fonts are self-hosted rather than fetched from Google, matching how Lato
 * is already handled here. A sign-in page should not need a third party to be
 * online in order to render, and a page that exists to state a legal position
 * should not be quietly reporting its readers to an ad network.
 */

/* Latin subset: four files at 73 KB together, against roughly 200 KB for the
   full Google Fonts set, and nothing on these pages needs a character outside
   it. */
@font-face { font-family: Oswald; src: url(/fonts/oswald-400.woff2) format('woff2');
             font-weight: 400; font-display: swap; }
@font-face { font-family: Oswald; src: url(/fonts/oswald-600.woff2) format('woff2');
             font-weight: 600; font-display: swap; }
@font-face { font-family: Inter;  src: url(/fonts/inter-400.woff2) format('woff2');
             font-weight: 400; font-display: swap; }
@font-face { font-family: Inter;  src: url(/fonts/inter-600.woff2) format('woff2');
             font-weight: 600; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --bg-elev: #131313;
  --surface: #1a1a1a;
  --border: rgba(184, 137, 90, 0.18);
  --border-strong: rgba(184, 137, 90, 0.35);
  --text: #e8e6e0;
  --text-dim: #b0aea7;
  --text-muted: #7a7872;
  --accent: #b8895a;
  --accent-hot: #d49a64;
  --od-green: #6b7340;
  --hazard: #d4a017;
  --danger: #c0563f;
  --font-display: Oswald, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* One faint bronze wash so the page is not a flat black rectangle. Fixed rather
   than scrolled, and pointer-events:none so it can never eat a click. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(80ch 60ch at 50% -10%, rgba(184, 137, 90, 0.10), transparent 70%),
    radial-gradient(60ch 40ch at 100% 100%, rgba(107, 115, 64, 0.07), transparent 70%);
}

/* ------------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.85rem; line-height: 1;
         color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; display: block;
              border: 1px solid var(--border); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; }
.brand-mark { font-family: var(--font-display); font-weight: 600;
              font-size: 1.15rem; letter-spacing: 0.12em; }
.brand-sub  { font-family: var(--font-display); font-weight: 400; font-size: 0.62rem;
              letter-spacing: 0.28em; color: var(--accent); margin-top: 0.2rem; }
/* Five links rather than two, and they WRAP. The set is the same on every page
   on this site -- account, legal, the dashboard and the planner -- because a
   navigation that changes shape between pages is one the reader has to re-learn
   each time. Wrapping beats hiding: at 360 px the row goes to two lines, which
   is a page that looks slightly busy, against a page from which the planner
   cannot be reached at all. */
.nav-right { display: flex; align-items: center; flex-wrap: wrap;
             justify-content: flex-end; gap: 0.4rem 1.1rem;
             font-size: 0.85rem; letter-spacing: 0.04em; }
.nav-right a { color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.nav-right a:hover { color: var(--accent); }
/* Home is where you leave from, so it is the one link that is not dim. */
.nav-right a.home { color: var(--text); }
.nav-right a[aria-current="page"] { color: var(--accent); }
@media (max-width: 560px) {
  .brand-text { display: none; }
  .nav-right { gap: 0.35rem 0.85rem; font-size: 0.8rem; }
}

/* -------------------------------------------------------------------- shell */

main {
  position: relative; z-index: 1;
  flex: 1; width: 100%; max-width: 30rem;
  margin: 0 auto; padding: clamp(2rem, 7vw, 4rem) 1.25rem 3rem;
}
main.wide  { max-width: 44rem; }
main.prose { max-width: 48rem; }

.eyebrow {
  font-family: var(--font-display); font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.1;
  letter-spacing: 0.02em; text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 0.75rem;
}
.lede { color: var(--text-dim); margin: 0 0 2rem; }

.panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  padding: clamp(1.25rem, 4vw, 1.75rem);
}
.panel + .panel { margin-top: 1.25rem; }
.panel h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text);
  margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}

/* -------------------------------------------------------------------- forms */

label { display: block; margin-bottom: 1rem; }
.label-text {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.4rem;
}
input {
  /* 16px minimum, or iOS Safari zooms the whole page on focus and whoever is
     signing in has to pinch back out afterwards. */
  width: 100%; padding: 0.8rem 0.9rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 0;
  font-family: var(--font-body); font-size: 1rem;
}
input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 137, 90, 0.15);
}
input:disabled { opacity: 0.5; }
.hint { font-size: 0.8rem; color: var(--text-muted); margin: -0.6rem 0 1rem; }

/* Buttons, matching the main site: Oswald, wide tracking, square, and the
   diagonal sweep across the primary one. */
.btn {
  display: inline-block; width: 100%;
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.9rem 1.5rem; border: 1px solid transparent; border-radius: 0;
  cursor: pointer; transition: all 0.2s ease; text-align: center;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #0a0a0a;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover:not(:disabled)::after { left: 140%; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hot); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn + .btn { margin-top: 0.75rem; }

.alt {
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-dim); text-align: center;
}
.alt a { color: var(--accent); text-decoration: none; }
.alt a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ notices */

.notice {
  padding: 0.8rem 1rem; margin-bottom: 1.5rem;
  border-left: 3px solid var(--text-muted); background: var(--surface);
  font-size: 0.9rem; color: var(--text-dim);
}
.notice.err  { border-left-color: var(--danger); color: #e8b3a5; }
.notice.ok   { border-left-color: var(--od-green); color: #cdd6ab; }
.notice.warn { border-left-color: var(--hazard); color: #e8d29a; }
.notice[hidden] { display: none; }

/* -------------------------------------------------------------------- prose
 * For the legal page and anything else that is mostly words. */

.prose h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin: 2.75rem 0 0.85rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose h3 {
  font-family: var(--font-display); font-weight: 400; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin: 1.75rem 0 0.5rem;
}
.prose p, .prose li { color: var(--text-dim); }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
  font-size: 0.9rem;
}
.prose th, .prose td {
  text-align: left; padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid rgba(184, 137, 90, 0.12); vertical-align: top;
}
.prose th {
  font-family: var(--font-display); font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
/* Wide content scrolls inside its own box rather than making the page scroll
   sideways on a phone. */
.scroll-x { overflow-x: auto; }

/* -------------------------------------------------------------------- footer */

footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border); margin-top: auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
  font-size: 0.78rem; color: var(--text-muted); text-align: center;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }
