/* ==========================================================================
   GRMS customer frontend - design system
   Subject: diesel/petrol/gas generator rental, delivered to job sites.
   Visual language borrows from the equipment itself: rating plates,
   hazard striping, gauge dials - not a generic SaaS look.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink:        #1B1D1F;   /* charcoal - header/footer/dark sections */
  --plate:      #262A2D;   /* steel plate - dark cards */
  --paper:      #F6F4EF;   /* warm paper - page background */
  --paper-dim:  #ECE8DF;   /* slightly deeper paper for section bands */
  --amber:      #F2A93B;   /* safety amber - primary CTA */
  --amber-dark: #C9861E;
  --rust:       #B8461D;   /* rust iron - danger/cancel */
  --gauge:      #3E7A4E;   /* gauge green - success/available */
  --ash:        #6B7176;   /* muted text/borders */
  --ash-light:  #D8D4CA;

  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 2px; /* sharp, metal-panel corners - not rounded */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.4em;
  line-height: 1.05;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--ink);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--amber);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .bolt { color: var(--amber); }
.brand-logo { height: 40px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a.plain {
  color: var(--ash-light);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 10px;
}
.nav-links a.plain:hover { color: var(--paper); }
.nav-name { color: var(--paper); font-size: 0.9rem; font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: var(--paper); border: 1.5px solid var(--ash-light); }
.btn-outline:hover { border-color: var(--paper); }
.btn-danger { background: transparent; color: var(--rust); border: 1.5px solid var(--rust); }
.btn-danger:hover { background: var(--rust); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 56px;
}
.hero p.lead {
  color: var(--ash-light);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 28px;
}

/* Signature element: hazard stripe divider - used ONCE, between hero and
   content, echoing the diagonal safety striping on generator housings. */
.hazard-divider {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--amber),
    var(--amber) 18px,
    var(--ink) 18px,
    var(--ink) 36px
  );
}

/* ---------- Nameplate: the recurring signature component ----------
   Generator specs, booking references, and price totals are shown in a
   bordered "rating plate" box, mono type, echoing the physical ID plate
   riveted to every generator. */
.nameplate {
  font-family: var(--font-mono);
  background: var(--plate);
  color: var(--paper);
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.nameplate .row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  font-size: 0.86rem;
}
.nameplate .row:last-child { border-bottom: none; }
.nameplate .row .k { color: var(--ash-light); }
.nameplate .row .v { color: var(--paper); font-weight: 600; }
.nameplate.light { background: #fff; color: var(--ink); border-color: var(--ash-light); }
.nameplate.light .row { border-bottom-color: var(--ash-light); }
.nameplate.light .row .k { color: var(--ash); }
.nameplate.light .row .v { color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
.section-dim { background: var(--paper-dim); }

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--ash-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 8px 22px rgba(27,29,31,0.12); transform: translateY(-2px); }
.card img.thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--ash-light);
}
.card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 6px; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--paper-dim);
  color: var(--ash);
  margin-right: 6px;
}
.card .rate { margin-top: auto; padding-top: 12px; font-family: var(--font-mono); font-size: 1rem; font-weight: 600; }

/* ---------- Status badges (booking lifecycle) ---------- */
.status { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius); letter-spacing: 0.03em; }
.status-pending    { background: #FCEFD8; color: #8A5A0A; }
.status-approved   { background: #E1EFE4; color: var(--gauge); }
.status-reserved   { background: #E1EFE4; color: var(--gauge); }
.status-delivered  { background: #E4EEF6; color: #2A5D82; }
.status-running    { background: #E4EEF6; color: #2A5D82; }
.status-completed  { background: #E9E9E9; color: #444; }
.status-rejected, .status-cancelled { background: #FBE6DE; color: var(--rust); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.88rem; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1.5px solid var(--ash-light);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(242,169,59,0.35);
}
.field-hint { font-size: 0.8rem; color: var(--ash); margin-top: 4px; }
.field-error { font-size: 0.82rem; color: var(--rust); margin-top: 4px; }
.toggle-group { display: flex; gap: 10px; }
.toggle-group label {
  flex: 1;
  text-align: center;
  border: 1.5px solid var(--ash-light);
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  margin: 0;
  font-weight: 700;
}
.toggle-group input { display: none; }
.toggle-group input:checked + span { color: var(--ink); }
.toggle-group label.active { background: var(--amber); border-color: var(--amber); }

/* ---------- Alerts / empty states ---------- */
.alert { padding: 14px 16px; border-radius: var(--radius); font-size: 0.9rem; margin: 16px 0; }
.alert-error { background: #FBE6DE; color: #7A2A0F; border: 1px solid var(--rust); }
.alert-success { background: #E1EFE4; color: #235233; border: 1px solid var(--gauge); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ash); }
.empty-state h3 { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ash-light); padding: 28px 0; margin-top: 60px; font-size: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--ash-light); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--paper); text-decoration: underline; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.text-muted { color: var(--ash); }
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--ash-light);
  border-top-color: var(--amber); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .nav-links a.plain span.full { display: none; }
}
