/* ==========================================================================
   THE TARDIGRADE — 2026 REDESIGN
   Design tokens + header/nav + hero + entomology + section polish
   Loaded after style.css; overrides the legacy template styling.
   ========================================================================== */

:root {
  --ink: #16324a;
  --ink-2: #1c3f5e;
  --navy-deep: #0e2334;
  --terracotta: #c1502e;
  --terracotta-dark: #9c3d21;
  --teal: #4f9c8c;
  --sand: #faf6ef;
  --sand-2: #f1e9da;
  --dusty-blue: #a9c9de;
  --slate: #3c4a56;
  --slate-light: #6b7684;
  --border: rgba(22, 50, 74, 0.09);
  --shadow-sm: 0 4px 16px rgba(14, 35, 52, 0.07);
  --shadow-md: 0 16px 40px rgba(14, 35, 52, 0.12);
  --font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Global base ---------- */

html, body {
  background: var(--sand);
}

body {
  font-family: var(--font-sans);
  color: var(--slate);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5,
.posttitle, .card-title, #portfolioSection h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
}

section[id] {
  scroll-margin-top: 88px;
}

a { color: var(--terracotta); }
a:hover { color: var(--terracotta-dark); }

.titlehr {
  background-color: var(--terracotta);
  height: 3px;
  width: 56px;
  max-width: 56px;
}

.titlehr.center {
  margin-left: auto;
  margin-right: auto;
}

.titlehr.accent-light {
  background-color: var(--dusty-blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: .9rem;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--terracotta);
  display: inline-block;
}

.eyebrow.light {
  color: var(--dusty-blue);
}

.eyebrow.light::before {
  background: var(--dusty-blue);
}

.eyebrow.center {
  justify-content: center;
}

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: .5rem;
}

.section-title.light {
  color: #fff;
}

.section-lead {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--slate-light);
  max-width: 720px;
}

.section-lead.light {
  color: rgba(255, 255, 255, .72);
}

.section-lead.center {
  margin-left: auto;
  margin-right: auto;
}

.section-head-block {
  margin-bottom: 3.25rem;
}

/* Buttons */

.btn-primary-tardi,
.btn-secondary-tardi {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .95rem 1.9rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
  transition: all .25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary-tardi:hover {
  background: var(--terracotta-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(193, 80, 46, .28);
}

.btn-secondary-tardi {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .38);
}

.btn-secondary-tardi:hover {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 22px 0;
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: rgba(250, 246, 239, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: #fff;
  transition: color .3s ease;
}

.site-header.is-scrolled .brand {
  color: var(--ink);
}

.brand:hover {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .01em;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .6;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: .87rem;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
  padding: 6px 0;
  transition: color .3s ease;
}

.site-header.is-scrolled .nav-links a {
  color: var(--ink);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width .25s ease;
}

.nav-links a:hover {
  color: var(--terracotta);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--terracotta);
  color: #fff !important;
  padding: .55rem 1.2rem;
  border-radius: 4px;
  font-weight: 600 !important;
}

.nav-cta::after { display: none; }

.nav-cta:hover {
  background: var(--terracotta-dark);
}

.nav-toggle {
  display: none;
  width: 28px;
  height: 20px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s ease;
}

.site-header.is-scrolled .nav-toggle span {
  background: var(--ink);
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.site-header.nav-open .nav-toggle span {
  background: #fff;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 991px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--navy-deep);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
  }

  .site-header.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .35s ease, transform .35s ease;
  }

  .nav-links a {
    color: #fff !important;
    font-size: 1.35rem;
  }

  .nav-cta {
    padding: .7rem 1.6rem;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  padding: 150px 0 90px;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(79, 156, 140, .25) 0%, rgba(79, 156, 140, 0) 45%),
    radial-gradient(ellipse at 10% 90%, rgba(193, 80, 46, .22) 0%, rgba(193, 80, 46, 0) 45%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--ink) 55%, #24506f 100%);
}

.hero-illustration {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 620px);
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: .28;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--dusty-blue);
  margin-bottom: 1.6rem;
}

.hero-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--dusty-blue);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-serif);
  color: #fff;
  font-weight: 600;
  font-size: clamp(2.6rem, 5.6vw, 4.35rem);
  line-height: 1.08;
  max-width: 820px;
  margin: 0 0 1.4rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--dusty-blue);
}

.hero-lead {
  font-size: 1.18rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .78);
  max-width: 620px;
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 2.1rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  max-width: 760px;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2rem;
  color: #fff;
  line-height: 1.1;
}

.hero-stat span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .58);
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  color: rgba(255, 255, 255, .55);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  z-index: 2;
  text-decoration: none;
}

.scroll-cue:hover {
  color: rgba(255, 255, 255, .85);
}

.scroll-cue i {
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 767px) {
  .hero { padding-top: 130px; }
  .hero-illustration { opacity: .18; width: 70vw; right: -20%; }
  .hero-stats { gap: 2rem; }
}

/* ==========================================================================
   WHY / MOTIVATION
   ========================================================================== */

section#why {
  background-color: var(--sand);
  padding: 7rem 0;
}

section#why .card {
  border-radius: 8px;
  overflow: hidden;
}

section#why .card-img-wrap {
  background:
    linear-gradient(160deg, rgba(14, 35, 52, .28), rgba(193, 80, 46, .22)),
    #fff;
  padding: 1.5rem 1.5rem 0;
}

section#why .card-body {
  padding: 1.75rem 1.75rem 2rem;
}

section#why .card-title {
  font-size: 1.18rem;
  line-height: 1.4;
}

/* ==========================================================================
   ENTOMOLOGY PROJECTS (placeholders)
   ========================================================================== */

.entomology-projects-section {
  background-color: var(--sand-2);
  padding: 6.5rem 0;
}

.entomology-project-item {
  margin-bottom: 1.5rem;
}

.ento-project {
  position: relative;
  height: 100%;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}

.ento-project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.coming-soon-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--terracotta);
  color: #fff;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: .35rem .75rem;
  border-radius: 999px;
}

.ento-project-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sand-2);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.4rem;
}

.ento-project h4 {
  font-size: 1.3rem;
  margin-bottom: .7rem;
}

.ento-project p {
  color: var(--slate-light);
  font-size: .95rem;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   ENTOMOLOGY
   ========================================================================== */

.entomology-section {
  position: relative;
  background-color: var(--navy-deep);
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #fff;
  padding: 7.5rem 0;
  overflow: hidden;
}

.entomology-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(193, 80, 46, .18) 0%, rgba(193, 80, 46, 0) 70%);
  pointer-events: none;
}

.entomology-stats {
  margin-top: .5rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 2.1rem 1.6rem;
  text-align: center;
  height: 100%;
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(193, 80, 46, .18);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.3rem;
  font-size: 1.35rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: .5rem;
  line-height: 1;
}

.stat-label {
  font-size: .92rem;
  color: rgba(255, 255, 255, .62);
  line-height: 1.55;
  margin: 0;
}

.entomology-detail {
  align-items: center;
}

.entomology-detail h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

.entomology-detail p {
  color: rgba(255, 255, 255, .72);
  line-height: 1.8;
  font-size: 1.02rem;
}

.entomology-quote {
  border-left: 3px solid var(--terracotta);
  padding: .3rem 0 .3rem 1.6rem;
  margin-bottom: 1.6rem;
}

.entomology-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: #fff;
  line-height: 1.5;
  margin-bottom: .8rem;
}

.entomology-quote cite {
  font-size: .82rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .55);
  font-style: normal;
}

.entomology-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.6rem;
}

.entomology-tags span {
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .78rem;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .85);
}

/* ==========================================================================
   PORTFOLIO / LATEST STORIES
   ========================================================================== */

#portfolioSection {
  background-color: #fff;
  padding: 7.5rem 0;
}

#portfolioSection .section-head-block {
  margin-bottom: 3.5rem;
}

#portfolioSection .portfolio-item .portfolio-link {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

#portfolioSection .portfolio-item .portfolio-hover {
  background: linear-gradient(160deg, rgba(14, 35, 52, .82), rgba(193, 80, 46, .72));
}

#portfolioSection .portfolio-hover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: .6rem;
}

#portfolioSection .portfolio-hover-content .view-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
}

#portfolioSection .portfolio-caption {
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-sm);
}

#portfolioSection .portfolio-caption h4 {
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
}

#portfolioSection .portfolio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: rgba(193, 80, 46, .16);
  color: var(--terracotta);
}

#portfolioSection .portfolio-icon svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   TEAM
   ========================================================================== */

section#team {
  background-color: var(--sand) !important;
  padding: 7.5rem 0;
}

.team-member {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 2.4rem 1.6rem 2rem;
}

.team-member img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border: none;
  box-shadow: 0 0 0 6px var(--sand-2);
}

.team-member h4 {
  font-size: 1.15rem;
  margin-top: 1.4rem;
}

.team-member p.text-muted {
  color: var(--slate-light) !important;
  font-size: .92rem;
  line-height: 1.5;
  min-height: 42px;
}

.team-member .social-buttons a i {
  color: var(--ink) !important;
  transition: color .25s ease;
}

.team-member .social-buttons a:hover i {
  color: var(--terracotta) !important;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

section#contact {
  background-color: var(--navy-deep);
  background-image: none;
  padding: 7rem 0;
  color: #fff;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
  max-width: 1050px;
  margin: 0 auto;
}

.contact-intro img#logo3 {
  width: 130px;
  height: auto;
  margin: 0 0 1.6rem;
}

.contact-intro h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: .9rem;
}

.contact-intro p {
  color: rgba(255, 255, 255, .68);
  line-height: 1.75;
  margin-bottom: 1.6rem;
}

.contact-social {
  display: flex;
  gap: .9rem;
}

.contact-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  transition: all .25s ease;
}

.contact-social a:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff !important;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contactForm .form-control {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  border-radius: 6px;
}

#contactForm .form-control::placeholder {
  color: rgba(255, 255, 255, .4);
}

#contactForm .form-control:focus {
  background: rgba(255, 255, 255, .1);
  border-color: var(--terracotta);
  box-shadow: none;
  color: #fff;
}

#contactForm .btn-primary-tardi {
  width: 100%;
  justify-content: center;
  border: none;
}

#form-messages {
  margin-top: 1rem;
}

@media (max-width: 850px) {
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .contact-intro img#logo3 { margin-left: auto; margin-right: auto; }
  .contact-social { justify-content: center; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

#pageFooter {
  background: var(--ink);
  color: rgba(255, 255, 255, .55);
  padding: 1.75rem 0;
  font-size: .85rem;
}

#pageFooter #copy {
  color: rgba(255, 255, 255, .55);
}

#pageFooter a#instagram {
  color: rgba(255, 255, 255, .55) !important;
}

#pageFooter a#instagram:hover {
  color: var(--terracotta) !important;
}
