/* ============================================================
   Inventory Plus — Website design system
   Palette from RetroSunsetTheme.swift (four-color update):
   terracotta #BE5103 · golden #FFCE1B · teal #069494 · rust #B7410E
   ============================================================ */

:root {
  --terracotta: #BE5103;
  --gold: #FFCE1B;
  --teal: #069494;
  --rust: #B7410E;

  --bg: #17110B;
  --bg-2: #1E1710;
  --card: #251D14;
  --card-2: #2C231A;
  --line: rgba(255, 206, 27, 0.10);
  --line-strong: rgba(255, 206, 27, 0.22);

  --text: #F4ECDF;
  --text-dim: #B3A692;
  --text-faint: #857A67;

  --radius: 14px;
  --radius-sm: 9px;
  --max: 1120px;

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

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(190, 81, 3, 0.5); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 17, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--gold); }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 4px 18px rgba(190, 81, 3, 0.35);
}
.btn-primary:hover { background: #D25E08; }

.btn-teal {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 18px rgba(6, 148, 148, 0.3);
}
.btn-teal:hover { background: #0AAAAA; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}

.kicker-gold { color: var(--gold); }
.kicker-terracotta { color: #E8813B; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }

.lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 640px;
  margin-top: 18px;
}

.accent { color: var(--gold); }
.accent-teal { color: var(--teal); }
.accent-terracotta { color: #E8813B; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- Phone mockups ---------- */

.phone {
  width: 270px;
  border-radius: 38px;
  background: #0C0906;
  border: 1px solid #3A2E1E;
  padding: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(190, 81, 3, 0.10);
  flex-shrink: 0;
}

.phone-screen {
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(160deg, #1D150D 0%, #17110B 60%, #1A130C 100%);
  height: 560px;
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.phone-notch {
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 7px;
  flex-shrink: 0;
}

.phone-notch::before {
  content: "";
  width: 84px;
  height: 9px;
  border-radius: 999px;
  background: #0C0906;
}

.app-bar {
  padding: 8px 16px 10px;
  flex-shrink: 0;
}

.app-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
}

.app-sub {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 1px;
}

.app-body {
  flex: 1;
  padding: 6px 12px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row { display: flex; gap: 8px; }

.mini-stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
}

.mini-stat .n { font-size: 15px; font-weight: 800; }
.mini-stat .l { font-size: 8.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }

.item-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
}

.item-row .name { font-weight: 700; font-size: 11px; }
.item-row .meta { display: flex; justify-content: space-between; margin-top: 3px; align-items: center; }
.item-row .cat {
  font-size: 8px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(190, 81, 3, 0.28);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.item-row .qty { font-size: 10px; color: var(--text-dim); font-weight: 600; }
.item-row .qty b { color: var(--teal); }

.pill-low {
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  background: var(--rust);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* scanner mock */
.scan-view {
  flex: 1;
  margin: 4px 4px 12px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 60% 35%, rgba(6, 148, 148, 0.14), transparent 55%),
    #100C08;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-frame {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  border: 2px solid var(--teal);
  box-shadow: 0 0 24px rgba(6, 148, 148, 0.45), inset 0 0 24px rgba(6, 148, 148, 0.12);
  position: relative;
}

.scan-line {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 20%;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 206, 27, 0.8);
  animation: scan 2.4s ease-in-out infinite alternate;
}

@keyframes scan {
  from { top: 12%; }
  to   { top: 84%; }
}

.scan-caption {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(23, 17, 11, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  font-size: 9px;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* bar chart mock */
.bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 6px 0;
}

.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }

.bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--teal);
}

.bar.gold { background: var(--gold); }
.bar.terra { background: var(--terracotta); }
.bar.rust { background: var(--rust); }

.bar-label { font-size: 8px; color: var(--text-faint); }

.value-line {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.value-line .l { font-size: 9.5px; color: var(--text-dim); }
.value-line .v { font-size: 13px; font-weight: 800; color: var(--gold); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer p { color: var(--text-faint); font-size: 13px; }

.footer-links { display: flex; gap: 22px; list-style: none; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }

/* ---------- Forms (sign in) ---------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(6, 148, 148, 0.18);
}

.form-error {
  display: none;
  background: rgba(183, 65, 14, 0.15);
  border: 1px solid rgba(183, 65, 14, 0.5);
  color: #F0A582;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 18px;
}

.form-error.show { display: block; }

.form-note {
  display: none;
  background: rgba(6, 148, 148, 0.12);
  border: 1px solid rgba(6, 148, 148, 0.45);
  color: #7ED4D4;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 18px;
}

.form-note.show { display: block; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
}
