/* ==========================================================================
   AZ AUTOMATION SOLUTIONS — High-Performance HMI (HPHMI) design system
   Brand palette : Slate Dark Gray · Progress Green · Automation Teal · Cool Gray
   Typography    : Inter Bold (headings) / Inter Regular (body)
   ========================================================================== */

:root {
  --bg:            #17262a;
  --bg-deep:       #101b1e;
  --surface:       #234040;  /* Slate Dark Gray */
  --surface-2:     #1e3736;
  --panel:         #2e4a49;
  --panel-2:       #26403f;

  --teal:          #17a29b;  /* Automation Teal */
  --teal-bright:   #2ec7be;
  --teal-glow:     rgba(23, 162, 155, .38);
  --teal-soft:     rgba(23, 162, 155, .16);

  --green:         #37bd65;  /* Progress Green */
  --green-bright:  #4fd683;
  --green-soft:    rgba(55, 189, 101, .16);

  --cool:          #c6f5b8;  /* Cool Gray / pale mint accent */

  --amber:         #e0b04a;
  --red:           #e0645f;

  --text:          #eaf3f1;
  --muted:         #a6bcba;
  --faint:         #7b9694;
  --line:          rgba(255, 255, 255, .09);
  --line-strong:   rgba(255, 255, 255, .16);

  --radius:        4px;
  --radius-lg:     8px;
  --header-h:      70px;
  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:          'Inter', ui-monospace, 'SFMono-Regular', monospace;
  --shadow:        0 18px 40px -22px rgba(0, 0, 0, .85);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before { /* fine control-room grid over the whole page */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 85%);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--teal-bright); text-decoration: none; }
a:hover { color: var(--green-bright); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .6em;
  color: #fff;
}
p { margin: 0 0 1rem; }

::selection { background: var(--teal); color: #fff; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-deep); }
*::-webkit-scrollbar-thumb { background: var(--panel); border-radius: 8px; border: 2px solid var(--bg-deep); }
*::-webkit-scrollbar-thumb:hover { background: var(--teal); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--teal); color: #fff; padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

.container {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ---------- HMI labels / kickers --------------------------------------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 1rem;
}
.kicker::before {
  content: '';
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
}
.kicker .idx { color: var(--faint); font-variant-numeric: tabular-nums; }

.section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; z-index: 1; }
.section--alt { background: linear-gradient(180deg, rgba(0,0,0,.22), transparent 40%), var(--bg-deep); }

.sec-head { max-width: 720px; margin-bottom: 3rem; }
.sec-title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.sec-sub { color: var(--muted); font-size: 1.05rem; margin: 0; }

.eyebrow-tag {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-bright);
  background: var(--green-soft);
  border: 1px solid rgba(55, 189, 101, .35);
  padding: .25rem .6rem;
  border-radius: var(--radius);
  font-weight: 700;
}

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
  position: relative;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 0 var(--teal-glow);
}
.btn-primary:hover {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
  color: #04211f;
  box-shadow: 0 0 22px -4px var(--teal-glow);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover {
  background: var(--green-bright);
  border-color: var(--green-bright);
  color: #06251a;
  box-shadow: 0 0 22px -6px rgba(55, 189, 101, .6);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-outline:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
  background: var(--teal-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: .5rem .8rem;
}
.btn-ghost:hover { color: var(--teal-bright); background: var(--teal-soft); }

.btn-sm { padding: .5rem .95rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- Header / navigation ---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(16, 29, 33, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s, background .25s;
}
.site-header.is-scrolled {
  background: rgba(16, 29, 33, .96);
  box-shadow: 0 12px 30px -20px #000;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.1; display: block; }
.brand-sub {
  display: block;
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--teal-bright);
  font-weight: 600;
}

.main-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  position: relative;
  padding: .55rem .8rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: .8rem; right: .8rem; bottom: .28rem;
  height: 2px;
  background: var(--teal-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  transform: scaleX(1);
  background: var(--green-bright);
}
.nav-link.is-active { color: var(--green-bright); }

.header-actions { display: flex; align-items: center; gap: .7rem; }

.status-pill {
  display: none;
  align-items: center;
  gap: .5rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-bright);
  border: 1px solid rgba(55, 189, 101, .35);
  background: var(--green-soft);
  padding: .32rem .7rem;
  border-radius: 999px;
}
.status-pill .led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(55, 189, 101, .7);
  animation: led 2s infinite;
}
@keyframes led {
  0%   { box-shadow: 0 0 0 0 rgba(55, 189, 101, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(55, 189, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(55, 189, 101, 0); }
}

.nav-toggle {
  display: none;
  width: 44px; height: 40px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text);
  transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] { border-color: var(--teal-bright); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: .8rem 0 1.2rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav .nav-link {
  display: block;
  padding: .85rem .2rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.mobile-nav .nav-link::after { display: none; }
.mobile-nav .nav-link.is-active { color: var(--green-bright); }
.mobile-nav .btn { margin-top: 1rem; }

/* ---------- Hero --------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 78% 8%, rgba(23, 162, 155, .28), transparent 55%),
              linear-gradient(180deg, var(--bg-deep), var(--bg) 70%);
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  max-width: 780px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-bright);
  background: var(--teal-soft);
  border: 1px solid rgba(23, 162, 155, .35);
  border-radius: 999px;
  padding: .4rem .9rem;
  margin-bottom: 1.6rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: 1.1rem;
}
.hero h1 .accent { color: var(--teal-bright); }
.hero h1 .accent-green { color: var(--green-bright); }
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 3rem; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
}
.stat {
  background: rgba(22, 40, 44, .92);
  padding: 1.05rem 1.1rem;
}
/* single KPI (hero shows only "Years in automation") */
.stat-strip:has(.stat:only-child) { max-width: 260px; }
.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--green-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  display: block;
  line-height: 1.2;
}
.stat-label {
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

/* ---------- Cards -------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 55%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  overflow: hidden;
}
.card::before { /* top accent rail, like an HMI pane */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent 70%);
  opacity: .55;
  transition: opacity .25s, background .3s;
}
.card:hover {
  border-color: rgba(23, 162, 155, .55);
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(23, 162, 155, .18);
}
.card:hover::before {
  background: linear-gradient(90deg, var(--green-bright), var(--teal) 70%);
  opacity: 1;
}
.card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Services ----------------------------------------------------- */
.service-card { padding-top: 2.1rem; }
.service-icon {
  width: 58px; height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  background: var(--bg-deep);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.service-icon svg {
  width: 30px; height: 30px;
  stroke: var(--teal-bright);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s, filter .25s;
}
.card:hover .service-icon {
  border-color: var(--green-bright);
  background: var(--green-soft);
  box-shadow: inset 0 0 18px -8px var(--green-bright);
}
.card:hover .service-icon svg { stroke: var(--green-bright); }
.service-list {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px dashed var(--line-strong);
  display: grid;
  gap: .45rem;
}
.service-list li {
  font-size: .84rem;
  color: var(--muted);
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}
.service-list li::before {
  content: '';
  width: 6px; height: 6px;
  margin-top: .5rem;
  flex: none;
  background: var(--teal-bright);
  transform: rotate(45deg);
}
.card:hover .service-list li::before { background: var(--green-bright); }

/* ---------- About -------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-table caption {
  text-align: left;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-bright);
  font-weight: 700;
  padding: .9rem 1rem;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.spec-table th, .spec-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 42%;
  color: var(--faint);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.spec-table td { color: var(--text); font-weight: 500; }
.spec-table tr:hover td { background: rgba(23, 162, 155, .1); color: #fff; }

.checklist { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .85rem; }
.checklist li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: .95rem;
}
.checklist svg {
  flex: none;
  width: 20px; height: 20px;
  margin-top: .18rem;
  stroke: var(--green-bright);
  fill: none;
  stroke-width: 2;
}
.checklist strong { color: var(--text); font-weight: 600; }

/* ---------- Section divider (gear + digital wave) ------------------------ */
.divider {
  display: block;
  width: 100%;
  height: 60px;
  opacity: .5;
  color: var(--teal);
}

/* ---------- Resources hub ------------------------------------------------ */
.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  transition: all .2s;
}
.chip:hover { border-color: var(--teal-bright); color: var(--teal-bright); background: var(--teal-soft); }
.chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 18px -8px var(--green-bright);
}

.search-form {
  display: flex;
  gap: .5rem;
  flex: 1 1 260px;
  max-width: 380px;
}
.search-form .field-input { margin: 0; }

.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }

.res-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--surface);
}
.res-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px),
    var(--bg-deep);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.res-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .4s;
}
.res-card:hover .res-thumb img { transform: scale(1.04); filter: saturate(1.15); }
.res-thumb .file-glyph {
  width: 54px; height: 54px;
  stroke: var(--teal-bright);
  fill: none;
  stroke-width: 1.4;
  opacity: .85;
}
.res-thumb .thumb-tags { position: absolute; top: .7rem; left: .7rem; display: flex; gap: .4rem; flex-wrap: wrap; }

.badge {
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: .28rem .55rem;
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.badge-public { background: var(--green-soft); color: var(--green-bright); border: 1px solid rgba(55,189,101,.4); }
.badge-client { background: var(--teal-soft); color: var(--teal-bright); border: 1px solid rgba(23,162,155,.45); }
.badge-cat { background: rgba(16,29,33,.85); color: var(--muted); border: 1px solid var(--line-strong); }

.res-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; gap: .6rem; }
.res-body h3 { font-size: 1.02rem; margin: 0; }
.res-body h3 a { color: #fff; }
.res-body h3 a:hover { color: var(--teal-bright); }
.res-desc { color: var(--muted); font-size: .87rem; margin: 0; flex: 1; }
.res-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  font-size: .72rem;
  color: var(--faint);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 600;
  padding-top: .8rem;
  border-top: 1px dashed var(--line-strong);
}
.res-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.res-meta .ok { color: var(--green-bright); }
.res-actions { display: flex; gap: .6rem; margin-top: .9rem; }
.res-actions .btn { flex: 1; }

.lock-note {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--teal-soft);
  border: 1px solid rgba(23, 162, 155, .35);
  border-left: 3px solid var(--teal-bright);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.lock-note svg { width: 20px; height: 20px; flex: none; stroke: var(--teal-bright); fill: none; stroke-width: 1.8; margin-top: .15rem; }
.lock-note strong { color: var(--text); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(0,0,0,.15);
}
.empty-state strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: .4rem; }

/* ---------- Forms -------------------------------------------------------- */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  position: relative;
}
.form-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--green-bright) 60%, transparent);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.field label .req { color: var(--teal-bright); }
.field-input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--panel);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: .93rem;
  padding: .72rem .85rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field-input::placeholder { color: var(--faint); }
.field-input:hover { border-color: var(--line-strong); }
.field-input:focus {
  outline: none;
  border-color: var(--teal-bright);
  background: #26333f;
  box-shadow: 0 0 0 3px rgba(23, 162, 155, .22);
}
textarea.field-input { resize: vertical; min-height: 120px; }
select.field-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239db0b8' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
}
select.field-input option { background: var(--panel-2); color: var(--text); }

.field-hint { font-size: .76rem; color: var(--faint); }
.field-errors {
  list-style: none;
  margin: 0;
  padding: .5rem .7rem;
  font-size: .8rem;
  color: #ff9b98;
  background: rgba(217, 83, 79, .12);
  border: 1px solid rgba(217, 83, 79, .4);
  border-radius: var(--radius);
}
.field--has-error .field-input { border-color: var(--red); }
.nonfield-errors {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: .8rem 1rem;
  font-size: .87rem;
  color: #ffb3b0;
  background: rgba(217, 83, 79, .12);
  border: 1px solid rgba(217, 83, 79, .45);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}

/* Django renders radio inputs as ul/li for our widget */
input[type="radio"] { accent-color: var(--teal-bright); width: 16px; height: 16px; }
.radio-row { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}

/* ---------- Alerts / messages ------------------------------------------- */
.alerts { display: grid; gap: .7rem; margin-bottom: 1.6rem; }
.alert {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid;
}
.alert::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
}
.alert-success { background: var(--green-soft); border-color: rgba(55,189,101,.4); color: #bdf3d7; }
.alert-success::before { background: var(--green-bright); box-shadow: 0 0 10px var(--green-bright); }
.alert-info { background: var(--teal-soft); border-color: rgba(23,162,155,.4); color: #b6efef; }
.alert-info::before { background: var(--teal-bright); box-shadow: 0 0 10px var(--teal-bright); }
.alert-error { background: rgba(217,83,79,.14); border-color: rgba(217,83,79,.45); color: #ffc4c2; }
.alert-error::before { background: var(--red); }

/* ---------- CTA band ------------------------------------------------------ */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(23, 162, 155, .28), rgba(55, 189, 101, .18) 55%, transparent),
    var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin-bottom: .4rem; }
.cta-band p { color: var(--muted); margin: 0; max-width: 560px; }

/* ---------- Page hero (inner pages) -------------------------------------- */
.page-hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 85% 0%, rgba(23, 162, 155, .25), transparent 60%),
    var(--bg-deep);
  padding: clamp(2.6rem, 6vw, 4.6rem) 0;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .7rem; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 1.03rem; margin: 0; }
.breadcrumb {
  display: flex; gap: .5rem; align-items: center;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; margin-bottom: 1.1rem;
}
.breadcrumb a { color: var(--teal-bright); }
.breadcrumb span { color: var(--panel); }

/* ---------- Footer -------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 1.6rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.footer-grid h4 {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-grid a, .footer-grid li { color: var(--muted); font-size: .9rem; }
.footer-grid a:hover { color: var(--green-bright); }
.footer-about { color: var(--muted); font-size: .92rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.4rem;
  font-size: .78rem;
  color: var(--faint);
}
.footer-bottom .status-pill { display: inline-flex; }

/* ---------- Reveal animations -------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Upload hub admin view ---------------------------------------- */
.upload-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: start; }
.upload-list { display: grid; gap: .8rem; }
.upload-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  transition: border-color .2s, background .2s;
}
.upload-row:hover { border-color: rgba(23,162,155,.5); background: var(--surface-2); }
.upload-row .t { font-weight: 600; font-size: .92rem; color: #fff; display: block; }
.upload-row .m { font-size: .74rem; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.upload-row form { margin: 0; }

/* ---------- Responsive ---------------------------------------------------- */
@media (min-width: 1100px) {
  .status-pill { display: inline-flex; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .upload-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-nav, .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .split, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-art { opacity: .28; mask-image: linear-gradient(180deg, transparent, #000 60%); }
}

@media (max-width: 640px) {
  .container { width: min(1200px, 100% - 1.6rem); }
  .grid-4, .res-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hub-toolbar { flex-direction: column; align-items: stretch; }
  .search-form { max-width: none; }
}
