/*
 * Liberty Excellence design tokens and base components.
 *
 * The look is the sign-in page's: canopy navy, the slanted red-over-blue
 * fascia band, heavy italic headlines that lean like the Liberty wordmark,
 * and price-board figures. Blue marks everything you can act on; red is kept
 * for the brand and for things that went wrong, so a missed log reads as an
 * alarm.
 */

/* Archivo is stored locally so the pages work offline. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-italic.woff2") format("woff2-variations");
}

:root {
  /* Brand */
  --liberty-red: #ee3031;
  --liberty-blue: #2372ba;
  --canopy-navy: #0f2c4c;
  --canopy-navy-2: #163a61;
  --canopy-navy-3: #22426a;
  --canopy-ink: #081c33;
  --canopy-text: #c9d6e6;
  --canopy-muted: #9fb3cb;

  /* Surfaces and text */
  --forecourt: #eef1f5;
  --surface: #ffffff;
  --ink: #14202e;
  --ink-muted: #5b6878;
  --line: #d8dee6;
  --line-soft: #edf0f4;
  --line-strong: #b9c3cf;

  /* Interaction */
  --action: var(--liberty-blue);
  --action-hover: #1b5f9c;
  --action-soft: #e3eef8;
  --focus: #2372ba;

  /* Tiles, from the client's concept screens */
  --tile: #e8edf3;
  --tile-hover: #dce4ed;
  --tile-icon: #14325a;

  /* Status */
  --ok: #1e8e5a;
  --ok-soft: #e1f3ea;
  --warn: #b97f00;
  --warn-soft: #fbf0d4;
  --warn-bright: #ffd166;
  --missed: var(--liberty-red);
  --missed-ink: #c4161c;
  --missed-soft: #fde5e5;

  /* Type: one family, Archivo, varied by width */
  --font: "Archivo", system-ui, sans-serif;
  --wdth-display: 88;   /* semi-condensed headlines, slanted like the wordmark */
  --wdth-figure: 72;    /* price-board numbers */
  --wdth-body: 100;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;

  /* Shape and space */
  --lean: -12deg;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-panel: 0 1px 0 rgba(15, 44, 76, 0.06), 0 8px 24px -12px rgba(15, 44, 76, 0.18);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  font-variation-settings: "wdth" var(--wdth-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--forecourt);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--action);
}

/* Headline style: heavy, semi-condensed, slanted like the logo */
.display {
  font-weight: 800;
  font-style: italic;
  font-variation-settings: "wdth" var(--wdth-display);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

/* Price-board figures */
.figure {
  font-weight: 800;
  font-variation-settings: "wdth" var(--wdth-figure);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Icons are Material Symbols Rounded, inlined as an SVG sprite in each page */
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}

/* Liberty wordmark, cut from the official artwork */
.wordmark {
  display: block;
  aspect-ratio: 1005 / 262;
  background: url("assets/liberty-time-saver-logo.png") top left / 100% auto no-repeat;
}

/* Brand chip: the white sign panel carrying the wordmark, as on sign-in */
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--canopy-navy);
  text-decoration: none;
}

.brand-chip .wordmark {
  width: 96px;
}

.brand-chip span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.2;
}

/* Fascia: the slanted red-over-blue band under every canopy */
.fascia {
  display: block;
  width: 100%;
  height: 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.btn .icon {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--action);
  color: #fff;
}

.btn-primary:hover {
  background: var(--action-hover);
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-quiet:hover {
  border-color: var(--line-strong);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: var(--text-sm);
}

/* Icon-only button */
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--forecourt);
}

.icon-btn .icon {
  width: 24px;
  height: 24px;
}

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

/* Form fields */
.field {
  display: grid;
  gap: 6px;
}

.field > label,
.field > .label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.field .hint {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.input {
  height: 44px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  color: var(--ink);
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: 10px 14px;
  resize: vertical;
}

.input:hover {
  border-color: var(--ink-muted);
}

.input:focus-visible {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--action-soft);
}

select.input {
  padding-right: 36px;
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6878' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") right 14px center no-repeat;
}

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
}

.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-missed { background: var(--missed-soft); color: var(--missed-ink); }
.pill-quiet { background: var(--forecourt); color: var(--ink-muted); }

/* Home-screen tiles, from the concept: grey tile, solid navy icon, label below */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--tile);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 120ms ease, transform 120ms ease;
}

.tile:hover {
  background: var(--tile-hover);
}

.tile:active {
  transform: scale(0.98);
}

.tile .icon {
  width: 56px;
  height: 56px;
  color: var(--tile-icon);
}

/* The one primary tile per screen: canopy navy with the fascia stripe */
.tile-primary {
  overflow: hidden;
  background: var(--canopy-navy);
  color: #fff;
}

.tile-primary::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: linear-gradient(var(--liberty-red) 0 6px, var(--liberty-blue) 6px);
}

.tile-primary:hover {
  background: var(--canopy-navy-2);
}

.tile-primary .icon {
  color: #fff;
}

.tile .badge,
.badge {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--liberty-red);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}

.tile .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  box-shadow: 0 0 0 3px var(--surface);
}

.tile-primary .badge {
  top: 12px;
  right: 10px;
  box-shadow: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
