/*
 * TainData marketing site + admin. Plain CSS, served by Propshaft.
 */

:root {
  --green-900: #1c3d24;
  --green-700: #2f6b3c;
  --green-600: #3a8049;
  --green-100: #e8f1e9;
  --ink: #1f2421;
  --muted: #5c655e;
  --line: #dfe4de;
  --bg: #ffffff;
  --bg-muted: #f5f7f4;
  --amber: #b8860b;
  --danger: #b23b3b;
  --maxw: 1100px;
  --radius: 6px;
  --font: "Helvetica Neue", Arial, "Segoe UI", Roboto, system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

body > main { flex: 1 0 auto; }

h1, h2, h3 { line-height: 1.2; color: var(--green-900); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }

a { color: var(--green-700); }
a:hover { color: var(--green-900); }

img { max-width: 100%; height: auto; display: block; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { width: 150px; height: auto; }

.nav { display: flex; gap: 1.5rem; }
.nav__link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--green-700); }
.nav__link--current { border-bottom-color: var(--green-600); color: var(--green-700); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  display: block;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-header--open .nav { display: flex; }
  .nav__link { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav__link--current { border-bottom-color: var(--line); }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  background: var(--green-700);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}
.button:hover { background: var(--green-900); color: #fff; }
.button--light { background: #fff; color: var(--green-900); }
.button--light:hover { background: var(--green-100); color: var(--green-900); }
.button--small { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.button--danger { background: var(--danger); }
.button--danger:hover { background: #8f2d2d; }

.text-link { font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: #fff;
  min-height: 62vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 40, 25, 0.78), rgba(20, 40, 25, 0.35));
  z-index: -1;
}
.hero__inner { padding-block: 4rem; max-width: 640px; }
.hero h1 { color: #fff; margin-top: 0; }
.hero p { font-size: 1.2rem; margin-bottom: 1.75rem; }

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

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--muted { background: var(--bg-muted); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-600);
  margin: 0 0 0.5rem;
}

.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.split__lead h2 { margin-top: 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 1.25rem; }
}

.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }

.contact-card {
  border-left: 3px solid var(--green-600);
  padding-left: 1rem;
  color: var(--muted);
}

.figure { margin: 1.5rem 0 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

.spec { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0.75rem 0; }
.spec dt { font-weight: 700; color: var(--green-900); }
.spec dd { margin: 0; }
@media (max-width: 560px) {
  .spec { grid-template-columns: 1fr; gap: 0 0; }
  .spec dd { margin-bottom: 0.6rem; }
}

/* ---------- Page head (inner pages) ---------- */

.page-head {
  background: var(--green-900);
  color: #fff;
  padding-block: 2.5rem;
}
.page-head h1 { color: #fff; margin: 0 0 0.4rem; }
.breadcrumb { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }
.breadcrumb a { color: #fff; }

/* ---------- Flash ---------- */

.flash {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.flash--notice { background: var(--green-100); color: var(--green-900); }
.flash--alert { background: #fbe6e6; color: #7d2b2b; }

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

.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 3rem 1.5rem;
  margin-top: auto;
}
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.75rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer__logo { margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer__contact { color: rgba(255, 255, 255, 0.7); }
.site-footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Admin ---------- */

body.admin { background: var(--bg-muted); }

.admin__bar { background: var(--green-900); color: #fff; }
.admin__bar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 56px; flex-wrap: wrap; }
.admin__brand { color: #fff; font-weight: 700; text-decoration: none; }
.admin__nav { display: flex; gap: 1rem; flex: 1; }
.admin__nav a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.9rem; }
.admin__nav a:hover { color: #fff; }
.admin__user { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.admin__main { padding-block: 2rem; }
.admin__main h1 { font-size: 1.6rem; }
.admin__signin { max-width: 360px; margin: 3rem auto; background: #fff; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); }

.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.field { margin: 1rem 0; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select {
  width: 100%;
  max-width: 480px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.hint { font-size: 0.85rem; color: var(--muted); margin: 0.3rem 0 0; }

.errors {
  background: #fbe6e6;
  color: #7d2b2b;
  border-radius: var(--radius);
  padding: 0.75rem 1rem 0.75rem 2rem;
  margin: 1rem 0;
}

.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--muted);
}
.stat__n { display: block; font-size: 1.8rem; font-weight: 700; color: var(--green-900); }

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
}
.table th, .table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { background: var(--bg-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .empty { color: var(--muted); text-align: center; }
.table .truncate { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
