/*
 * StrokeMasters — NOVEMBER AUTUMN THEME
 * One shared stylesheet for the public site, the Staff Portal and the Builder console.
 * Loaded AFTER site.css / portal.css, so it only re-tints and adds atmosphere — it never
 * changes layout, copy or behaviour. To roll back, remove the <link> to this file (and the
 * fall-leaves.js <script>) in src/shells.ts.
 *
 * Palette (from the hero photo): golden yellow, warm amber, burnt orange, copper,
 * deep autumn red, warm brown, rich charcoal/black.
 */

:root {
  --bg:   #120d09;   /* rich charcoal-brown */
  --bg2:  #1a130d;
  --bg3:  #231a12;
  --line: #3a2c20;
  --line2:#4d3a28;
  --fg:   #f6eee3;   /* warm ivory */
  --mute: #c2b19b;
  --dim:  #8f7d69;

  --accent: #f2a33a;           /* warm amber */
  --gold:   #f4c552;           /* golden yellow */
  --copper: #c9772f;
  --rust:   #b8452b;
  --maple:  #a3281f;           /* deep autumn red */

  --fall-ink: #1b0f05;         /* text colour on amber surfaces */
}
/* Beats the inline --accent the public site writes from the saved site config. */
html { --accent: #f2a33a !important; }

::selection { background: rgba(242, 163, 58, .38); color: #fff; }

/* ─── Photographic atmosphere ──────────────────────────────────────────────
   A fixed, very low-opacity crop of the hero photograph sits behind everything
   (same real photo, never a cartoon), with a warm vignette so text stays crisp. */
body { background-color: var(--bg); }
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(18,13,9,0) 0%, rgba(18,13,9,.55) 70%, rgba(18,13,9,.9) 100%),
    url('/assets/fall/ambient.jpg') center 35% / cover no-repeat;
  opacity: .16;
}
/* Low sun from the upper-left, like the photograph. */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60% 45% at 8% -5%, rgba(255, 190, 90, .14), rgba(255, 150, 50, .05) 45%, transparent 70%);
}

/* ══════════════════════════════════════════════════════════════════════════
   PUBLIC WEBSITE
   ══════════════════════════════════════════════════════════════════════════ */

nav {
  background: rgba(18, 13, 9, .82) !important;
  border-bottom-color: rgba(201, 119, 47, .38) !important;
}
.logo i { background: var(--accent); }

.hazard {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #120d09 14px 28px) !important;
}

/* Hero media (image or video) — fills the hero, sits behind the overlay and copy. */
.hero { border-bottom-color: rgba(201, 119, 47, .4); background: #0d0906; }
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #0d0906; }
.hero-media picture { display: contents; }
.hero-media .hero-img,
.hero-media .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 46%;      /* keeps the sign, the car and the skyline in frame */
  display: block;
  pointer-events: none;
}
.hero-media .hero-img { animation: fall-hero-in .5s ease-out both; }
.hero-media .hero-video { opacity: 0; transition: opacity .6s ease; }
.hero-media .hero-video.on { opacity: 1; }
@keyframes fall-hero-in { from { opacity: 0; } to { opacity: 1; } }

/* Light, left-weighted scrim: just enough for the headline, keeps the golden daylight. */
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(14,9,5,.72) 0%, rgba(14,9,5,.52) 26%, rgba(14,9,5,.16) 50%, rgba(14,9,5,0) 68%),
    linear-gradient(0deg, rgba(14,9,5,.5) 0%, rgba(14,9,5,0) 26%) !important;
}
.hero h1 { text-shadow: 0 2px 28px rgba(8, 4, 1, .6); }
.hero h1 em { color: var(--accent); }
.hero p.lead { color: #eee2d0; text-shadow: 0 1px 14px rgba(8, 4, 1, .7); }
.hero-meta { border-top-color: rgba(255, 220, 170, .28); }
.hero-meta .mono { color: #e6d3b8 !important; text-shadow: 0 1px 8px rgba(8,4,1,.7); }
.hero-meta b { text-shadow: 0 1px 12px rgba(8,4,1,.7); }
.hero .mono[style] { text-shadow: 0 1px 10px rgba(8,4,1,.7); }
.tag { background: rgba(18, 11, 6, .62); border-color: rgba(201, 119, 47, .5); }

.ticker { background: var(--bg2); border-bottom-color: rgba(201, 119, 47, .3); }
.ticker span:nth-child(odd) { color: var(--fg); }
.ticker span.sep { color: var(--copper); }

/* Sections: a faint copper hairline on top, a whisper of warm light behind alternates. */
section { position: relative; border-bottom-color: rgba(201, 119, 47, .22); }
section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(242, 163, 58, .5), transparent);
}
section:nth-of-type(even):not(.hiring) { background: linear-gradient(180deg, rgba(201, 119, 47, .05), transparent 55%); }

.btn.solid, .btn.solid:hover { color: var(--fall-ink) !important; }
.btn:hover { background: var(--fg); color: var(--bg); }
.menu-tabs { border-color: var(--line2); }
.menu-tabs button.on { background: var(--accent); color: var(--fall-ink); }
.fit-chips button.on { background: var(--accent); color: var(--fall-ink); }
.fit-chips button.on span { color: var(--fall-ink); }
.fit-dealers { border-color: var(--line2); }
.fit-table { border-color: var(--line2); }
.full-bar {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(244, 197, 82, .13), transparent) !important;
}
.row { border-bottom-color: rgba(201, 119, 47, .22); }
.row .price { color: var(--gold); }

.crew, .member { border-color: rgba(201, 119, 47, .24); }
.visit { border-color: rgba(201, 119, 47, .3); }

/* Hiring band: a deep amber → copper sunset instead of a flat colour. */
.hiring {
  background: linear-gradient(135deg, #f4b13f 0%, #ee9a33 48%, #d9782b 100%) !important;
  color: var(--fall-ink) !important;
}
.ap-card { border-color: var(--fall-ink); }
.ap-chip.on, .hiring .ap-card .btn.ap-submit { color: var(--fall-ink); }

footer {
  position: relative;
  border-top: 1px solid rgba(201, 119, 47, .4);
  background:
    linear-gradient(180deg, rgba(18,13,9,.93), rgba(18,13,9,.97)),
    url('/assets/fall/ambient.jpg') center 72% / cover no-repeat;
}
footer .bar { color: var(--dim); }

/* ══════════════════════════════════════════════════════════════════════════
   STAFF PORTAL  (every screen inherits these through the shared tokens above)
   ══════════════════════════════════════════════════════════════════════════ */

.side {
  background: linear-gradient(180deg, rgba(28, 19, 12, .97) 0%, rgba(16, 11, 7, .98) 100%);
  border-right-color: rgba(201, 119, 47, .32);
}
.side nav button.on { border-left-color: var(--accent); }
.side-clock.on { border-color: rgba(244, 197, 82, .45); }

.main { background: transparent; }
.card { background: rgba(26, 18, 12, .92); border-color: var(--line2); }
.card-h, .card > h3 { border-color: var(--line); }
.modal-bg { background: rgba(8, 4, 1, .7); }
.modal { background: #1a130d; border-color: var(--line2); }

.btn.solid { color: var(--fall-ink) !important; }
.btn.solid:hover:not(:disabled) { color: var(--fall-ink) !important; }
.badge { background: var(--gold); }
.crew-pick button.on, .evcal-cell.today .evcal-dn { color: var(--fall-ink); }
.toast { background: var(--fg); color: #1b0f05; }

/* Login: the hero photograph (cropped to the sign + car) behind the welcome panel. */
.login-l {
  background:
    linear-gradient(180deg, rgba(14,9,5,.62) 0%, rgba(14,9,5,.22) 38%, rgba(14,9,5,.2) 62%, rgba(14,9,5,.72) 100%),
    url('/assets/fall/login.jpg') 38% 40% / cover no-repeat !important;
}
.login-l::after { background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #120d09 14px 28px) !important; }
.login-l h1, .login-l p, .login-l .mono { text-shadow: 0 2px 22px rgba(8, 4, 1, .75); }
.login-l h1 em { color: var(--accent); }
.login-r { background: rgba(18, 13, 9, .72); }
.login-grid button { background: rgba(26, 18, 12, .88); }
.login-grid button:hover { border-color: var(--accent); }
.pin-dots i.f { background: var(--accent); border-color: var(--accent); }

/* Photo-driven pieces keep their own colours; only brightness is left alone. */

@media (max-width: 960px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(14,9,5,.62) 0%, rgba(14,9,5,.38) 42%, rgba(14,9,5,.5) 72%, rgba(14,9,5,.78) 100%) !important;
  }
  .hero-media .hero-img, .hero-media .hero-video { object-position: 50% 50%; }
  .login-l { background-position: 40% 35% !important; }
}
@media (max-width: 760px) {
  body::before { opacity: .13; }
  /* The "Bay 01" tag is absolutely positioned; reserve room under the hero facts so it never overlaps them. */
  .hero-l { padding-bottom: 104px; }
  .tag { right: 16px; bottom: 16px; padding: 8px 12px; }
  .tag b { font-size: 17px; }
  .hero-meta b { font-size: 21px; }
}

/* Reduced motion: no fades, no video fade-in. (Leaves are switched off in fall-leaves.js.) */
@media (prefers-reduced-motion: reduce) {
  .hero-media .hero-img { animation: none; }
  .hero-media .hero-video { transition: none; }
}
