/* ==========================================================================
   TM Conference 2026 — Design System
   Direction: "Herbarium meets clinical notebook" — the specimen label of a
   19th-century botanical archive, re-drawn for a modern research programme.
   ========================================================================== */

:root {
  --forest-950: #10241f;
  --forest-900: #16302b;
  --forest-800: #1f3f37;
  --forest-700: #2c5347;
  --sage-500: #7c9473;
  --sage-300: #aebf9e;
  --parchment: #f1ecde;
  --parchment-dim: #e7e0cb;
  --paper-line: #cfc6a6;
  --gold-600: #b6842a;
  --gold-500: #c9963c;
  --gold-300: #e3c375;
  --clay-600: #a64b2a;
  --clay-500: #bf5c34;
  --ink-900: #20241d;
  --ink-700: #3c4136;
  --ink-500: #666c5c;
  --white: #fffdf7;

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 2px;
  --shadow-card: 0 1px 0 rgba(16, 36, 31, 0.06), 0 12px 28px -18px rgba(16, 36, 31, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--forest-950);
  line-height: 1.12;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); font-weight: 560; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-600);
  display: inline-block;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-700);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--gold-600);
  color: var(--forest-950);
  border-color: var(--gold-600);
}
.btn-primary:hover { background: var(--gold-500); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--parchment);
  border-color: rgba(241,236,222,0.4);
}
.btn-outline:hover { border-color: var(--parchment); }

.btn-dark {
  background: var(--forest-950);
  color: var(--parchment);
  border-color: var(--forest-950);
}
.btn-dark:hover { background: var(--forest-800); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241,236,222,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--paper-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--forest-950);
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--gold-600);
  text-transform: uppercase;
  font-weight: 500;
}
.brand-mark {
  width: 40px; height: 40px;
  border: 1.5px solid var(--forest-950);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--forest-950);
  cursor: pointer;
  padding: 5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-700);
}
.nav-links a:hover { color: var(--gold-600); }
.nav-cta { display: flex; gap: 10px; }

@media (max-width: 900px) {
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 24px;
    justify-content: space-between;
  }
  .brand { 
    width: calc(100% - 45px); 
    flex-grow: 0; 
  }
  .brand span {
    white-space: normal;
    line-height: 1.25;
  }
  .nav-toggle { 
    display: block; 
    flex-shrink: 0; 
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    padding: 15px 0 5px;
    gap: 20px;
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    overflow-x: visible;
    white-space: normal;
  }
  .nav-cta { width: 100%; }
  .nav-cta .btn { width: 100%; }
}

@media (max-width: 480px) {
  .site-header .container {
    padding: 12px 16px;
  }
  .brand {
    gap: 10px;
    font-size: 0.85rem;
  }
  .brand img {
    height: 38px !important;
  }
  .brand small {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    margin-top: 2px;
  }
}

/* ---------- Hero (specimen label) ---------- */
.hero {
  background: radial-gradient(1200px 500px at 15% -10%, rgba(201,150,60,0.16), transparent 60%), var(--forest-950);
  color: var(--parchment);
  padding: 88px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { color: var(--white); }
.hero .lede { color: var(--sage-300); }

.specimen-card {
  background: var(--parchment);
  color: var(--ink-900);
  border: 1px solid var(--forest-950);
  padding: 28px 26px 24px;
  position: relative;
}
.specimen-card::before, .specimen-card::after,
.specimen-corner-tl, .specimen-corner-br { content: ""; }
.specimen-card {
  box-shadow: 6px 6px 0 rgba(182,132,42,0.55);
}
.specimen-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  border-bottom: 1px dashed var(--paper-line);
  padding-bottom: 10px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}
.specimen-card h3 { margin-bottom: 6px; font-size: 1.15rem; }
.specimen-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--parchment-dim);
  font-size: 0.9rem;
}
.specimen-row:last-child { border-bottom: none; }
.specimen-row span:first-child { color: var(--ink-500); }
.specimen-row span:last-child { font-weight: 600; text-align: right; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(241,236,222,0.15);
  margin-top: 44px;
  border-top: 1px solid rgba(241,236,222,0.18);
}
.hero-stats div {
  background: var(--forest-950);
  padding: 18px 4px 4px;
}
.hero-stats .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold-300);
}
.hero-stats .lbl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-300);
}

@media (max-width: 600px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { padding-bottom: 18px; }
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 54px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.section-dark { background: var(--forest-950); color: var(--parchment); }
.section-dark h2 { color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- Track / specimen cards grid ---------- */
.track-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 800px) { .track-grid { grid-template-columns: 1fr; } }

.track-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  padding: 26px 26px 22px;
  position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
.track-card:hover { border-color: var(--gold-600); transform: translateY(-2px); }
.track-accession {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-600);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}
.track-card ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-700); font-size: 0.92rem; }
.track-card li { margin-bottom: 6px; }

/* ---------- Timeline / dates ---------- */
.date-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--paper-line);
  background: var(--white);
}
@media (max-width: 800px) { .date-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { 
  .date-strip { grid-template-columns: 1fr; } 
  .date-strip div { border-right: none; }
}
.date-strip div {
  padding: 22px 20px;
  border-right: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}
.date-strip div:nth-child(4) { border-right: none; }
.date-strip .d-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.date-strip .d-val { font-family: var(--font-display); font-size: 1.25rem; color: var(--forest-950); }

/* ---------- Pricing / fee tables ---------- */
.fee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .fee-grid { grid-template-columns: 1fr; } }
.fee-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.fee-card.featured { border-color: var(--gold-600); box-shadow: 0 0 0 1px var(--gold-600); }
.fee-card .amount { font-family: var(--font-display); font-size: 2.3rem; color: var(--forest-950); margin: 10px 0 4px; }
.fee-card .amount small { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-500); }
.fee-card ul { list-style: none; padding: 0; margin: 18px 0 24px; font-size: 0.88rem; color: var(--ink-700); }
.fee-card li { padding: 7px 0; border-top: 1px solid var(--parchment-dim); }
.fee-card li:first-child { border-top: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 3px;
}
.badge-gold { background: rgba(201,150,60,0.16); color: var(--gold-600); }
.badge-clay { background: rgba(166,75,42,0.12); color: var(--clay-600); }
.badge-sage { background: rgba(124,148,115,0.18); color: var(--forest-700); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  padding: 36px;
}
@media (max-width: 640px) { .form-card { padding: 24px 18px; } }

.form-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 10px;
  margin: 34px 0 20px;
}
.form-section-title:first-child { margin-top: 0; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.78rem; color: var(--ink-500); margin-top: 5px; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=file],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1px solid var(--paper-line);
  background: var(--parchment);
  border-radius: var(--radius);
  color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold-600);
  outline-offset: 1px;
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.error-text { color: var(--clay-600); font-size: 0.8rem; margin-top: 5px; }
.alert {
  padding: 14px 16px;
  border-left: 3px solid var(--clay-600);
  background: rgba(166,75,42,0.08);
  color: var(--ink-900);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.alert-success { border-left-color: var(--forest-700); background: rgba(124,148,115,0.14); }

.radio-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .radio-tiles { grid-template-columns: 1fr; } }
.radio-tile {
  border: 1px solid var(--paper-line);
  padding: 14px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  background: var(--parchment);
}
.radio-tile input { margin-right: 8px; }
.radio-tile.checked { border-color: var(--gold-600); background: rgba(201,150,60,0.08); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-950);
  color: var(--sage-300);
  padding: 60px 0 30px;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--parchment); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid a { display: block; margin-bottom: 8px; color: var(--sage-300); }
.footer-grid a:hover { color: var(--gold-300); }
.footer-bottom {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid rgba(241,236,222,0.14);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--sage-500);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.small-caps { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--forest-950); color: var(--parchment); padding: 26px 20px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 4px; font-size: 0.9rem; color: var(--sage-300); margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--forest-800); color: var(--white); }
.admin-main { padding: 34px 40px; background: var(--parchment-dim); }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.88rem; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--paper-line); }
.data-table th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); background: var(--parchment); }
.stat-card { background: var(--white); border: 1px solid var(--paper-line); padding: 20px 22px; }
.stat-card .num { font-family: var(--font-display); font-size: 2rem; color: var(--forest-950); }
.stat-card .lbl { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------- Admin Layout Overrides ---------- */
.admin-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 850px) { .admin-detail-grid { grid-template-columns: 1fr; } }
.responsive-table-wrapper { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }

