/* =========================================================
   Mathe Entomology Consulting LLC
   Earthy, professional single-page site
   ========================================================= */

:root {
  --ink:        #1d221a;   /* deep green-black */
  --forest:     #2e3d2a;   /* primary dark green */
  --moss:       #5d6e4b;   /* mid green */
  --sage:       #8d9877;   /* soft green */
  --copper:     #b06a3b;   /* warm accent */
  --copper-dk:  #8f5027;
  --bone:       #f4f0e5;   /* page background */
  --sand:       #e9e2d0;   /* card background */
  --sand-dk:    #d8cfb8;
  --paper-line: rgba(29, 34, 26, 0.14);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", -apple-system, "Segoe UI", sans-serif;

  --nav-h: 76px;
  --pad-x: clamp(1.25rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

::selection { background: var(--copper); color: var(--bone); }

/* ---------- shared type ---------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.1rem;
}
.eyebrow.light { color: #cf9a6b; }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section-title em { font-style: italic; color: var(--copper); }
.section-title.light { color: var(--bone); }

.latin {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, transform 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid { background: var(--forest); color: var(--bone); }
.btn-solid:hover { background: var(--copper); }

.btn-ghost {
  border: 1px solid var(--paper-line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--copper); color: var(--copper); }

.btn-copper { background: var(--copper); color: var(--bone); }
.btn-copper:hover { background: var(--bone); color: var(--forest); }

/* ---------- progress bar ---------- */

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 200;
}

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

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 var(--pad-x);
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.nav.is-scrolled {
  background: rgba(244, 240, 229, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--paper-line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}

.nav-logo {
  width: 46px;
  height: 46px;
  /* warm the navy of the original mark toward the site's earthy ink */
  filter: sepia(0.32) saturate(0.85) brightness(1.02);
}

.nav-wordmark {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-wordmark em { font-style: italic; font-weight: 400; color: var(--moss); }

.nav-links {
  display: flex;
  gap: 1.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav-links a {
  position: relative;
  padding: 0.3rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s ease;
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.nav-cta:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--bone);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) var(--pad-x) 5rem;
  background:
    radial-gradient(1100px 600px at 85% 10%, rgba(141, 152, 119, 0.16), transparent 60%),
    radial-gradient(900px 700px at 0% 100%, rgba(176, 106, 59, 0.08), transparent 55%),
    var(--bone);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 2rem;
}
.kicker-rule {
  width: 44px;
  height: 1px;
  background: var(--copper);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.hero-title em { font-style: italic; color: var(--copper); }

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-title .line-inner { display: inline-block; will-change: transform; }

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1rem, 1.35vw, 1.13rem);
  color: rgba(29, 34, 26, 0.75);
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.6rem;
}

.hero-cred {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--forest);
}
.hero-cred span {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--copper);
  margin-left: 0.7rem;
  vertical-align: 0.12em;
}

/* hero specimen plate */

.hero-plate { max-width: 430px; justify-self: end; width: 100%; }

.plate-frame {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -25px rgba(29, 34, 26, 0.45);
}
.plate-frame img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  will-change: transform;
}

.plate-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--copper);
}
.plate-label .latin { font-size: 1rem; color: var(--forest); }
.plate-label .common {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(29, 34, 26, 0.55);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(29, 34, 26, 0.5);
}
.scroll-cue-line {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--ink);
  opacity: 0.35;
  transform-origin: left center;
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleX(0.4); opacity: 0.2; }
  50%      { transform: scaleX(1);   opacity: 0.5; }
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 1.1rem 0;
  background: var(--sand);
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--moss);
  flex-shrink: 0;
}

/* ---------- statement ---------- */

.statement {
  background: var(--forest);
  color: var(--bone);
  padding: clamp(6rem, 11vw, 9.5rem) var(--pad-x);
  background-image:
    radial-gradient(800px 500px at 100% 0%, rgba(141, 152, 119, 0.14), transparent 60%);
}

.statement-inner { max-width: 1100px; margin: 0 auto; }

.statement-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cf9a6b;
  margin-bottom: 2.2rem;
}

.statement-text {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.42;
  letter-spacing: -0.005em;
}
.statement-text .w {
  display: inline-block;
  opacity: 0.18;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 2.8rem;
  border-top: 1px solid rgba(244, 240, 229, 0.18);
}

.stat-num, .stat-word, .stat-plus {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--bone);
  line-height: 1;
}
.stat-plus { color: var(--copper); }
.stat-word { display: block; margin-bottom: 0.6rem; }
.stat-num + .stat-plus { margin-left: 0.1em; }
.stat-num { display: inline-block; margin-bottom: 0.6rem; }

.stat-label {
  display: block;
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: rgba(244, 240, 229, 0.6);
}

/* ---------- services ---------- */

.services {
  padding: clamp(6rem, 11vw, 9.5rem) var(--pad-x);
}

.services-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.5fr);
  gap: clamp(3rem, 6vw, 6rem);
  max-width: 1300px;
  margin: 0 auto;
  align-items: start;
}

.services-head {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.services-note {
  margin-top: 1.4rem;
  max-width: 24rem;
  color: rgba(29, 34, 26, 0.7);
}

.service-list { list-style: none; }

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  grid-template-areas: "num name" ". desc";
  column-gap: 1rem;
  padding: 1.9rem 1rem 1.9rem 0.5rem;
  border-top: 1px solid var(--paper-line);
  transition: background-color 0.35s ease;
}
.service-row:last-child { border-bottom: 1px solid var(--paper-line); }
.service-row:hover { background: rgba(233, 226, 208, 0.55); }

.service-num {
  grid-area: num;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--copper);
  padding-top: 0.35rem;
}

.service-name {
  grid-area: name;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
  transition: color 0.3s ease;
}
.service-row:hover .service-name { color: var(--copper-dk); }

.service-desc {
  grid-area: desc;
  max-width: 36rem;
  margin-top: 0.55rem;
  font-size: 0.93rem;
  color: rgba(29, 34, 26, 0.68);
}

/* ---------- specimen gallery ---------- */

.specimens {
  background: var(--ink);
  color: var(--bone);
}

.specimens-pin {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vh, 6rem) 0;
  overflow: hidden;
}

.specimens-head {
  padding: 0 var(--pad-x);
  margin-bottom: clamp(2.2rem, 5vh, 3.5rem);
}

.rail-wrap { width: 100%; }

.rail {
  display: flex;
  gap: clamp(1.4rem, 2.5vw, 2.2rem);
  padding: 0 var(--pad-x);
  width: max-content;
  will-change: transform;
}

.plate {
  width: clamp(300px, 30vw, 400px);
  flex-shrink: 0;
  background: #232920;
  border: 1px solid rgba(244, 240, 229, 0.09);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.plate-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.plate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.plate:hover .plate-img img { transform: scale(1.06); }

.plate-meta {
  padding: 1.5rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.plate-index {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cf9a6b;
  margin-bottom: 0.9rem;
}

.plate-meta .latin { font-size: 1.3rem; color: var(--bone); line-height: 1.15; }

.plate-meta .common {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 240, 229, 0.5);
  margin: 0.35rem 0 1rem;
}

.plate-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(244, 240, 229, 0.72);
  margin-top: auto;
}

.plate-cta {
  justify-content: center;
  background: var(--forest);
  border-color: rgba(244, 240, 229, 0.14);
}
.plate-cta-inner {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}
.plate-cta-inner p {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.3;
}

/* ---------- about ---------- */

.about {
  padding: clamp(6rem, 11vw, 9.5rem) var(--pad-x);
  background: var(--sand);
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 6vw, 6rem);
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.about-photo { position: relative; max-width: 400px; }

.about-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 30px 60px -28px rgba(29, 34, 26, 0.5);
}
.about-frame img { filter: sepia(0.08) saturate(0.98); }

.about-frame-accent {
  position: absolute;
  inset: 1.3rem -1.3rem -1.3rem 1.3rem;
  border: 1px solid var(--copper);
  border-radius: 6px;
  z-index: 0;
}

.about-media { max-width: 400px; }

.about-creds {
  list-style: none;
  display: flex;
  align-items: center;
  /* .about-media matches the photo's width, so centering here centres on the headshot */
  justify-content: center;
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
  /* the copper accent frame overhangs the photo by 1.3rem — clear it, then breathe */
  margin-top: calc(clamp(3.4rem, 5.5vw, 4.4rem) - 5px);
}
.about-creds li { flex: 0 0 auto; }
.about-creds img {
  display: block;
  width: clamp(58px, 6.4vw, 74px);
  height: auto;
}

.title-creds {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  margin-top: 0.8rem;
}

.about-copy p { margin-bottom: 1.3rem; color: rgba(29, 34, 26, 0.78); max-width: 36rem; }
.about-copy .section-title { margin-bottom: 1.6rem; }

.about-points {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.about-points li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--forest);
}
.point-marker {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--copper);
  transform: rotate(45deg) translateY(-1px);
}

/* ---------- contact ---------- */

.contact {
  background: var(--forest);
  color: var(--bone);
  padding: clamp(6.5rem, 12vw, 10rem) var(--pad-x) 0;
  background-image:
    radial-gradient(900px 600px at 50% 0%, rgba(141, 152, 119, 0.14), transparent 65%);
  text-align: center;
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}

.contact-sub {
  max-width: 30rem;
  color: rgba(244, 240, 229, 0.72);
  margin-bottom: 3rem;
}

.contact-phone {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  color: var(--bone);
  border-bottom: 2px solid var(--copper);
  padding-bottom: 0.35rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact-phone:hover { color: #cf9a6b; border-color: #cf9a6b; }

.contact-email {
  margin-top: 3.4rem;
  font-size: 0.72rem;
  padding: 0.78rem 1.6rem;
}

.contact-area {
  margin-top: 1.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 240, 229, 0.5);
}

/* ---------- footer ---------- */

.footer {
  margin-top: clamp(5rem, 9vw, 8rem);
  padding: 3rem var(--pad-x) 2.6rem;
  border-top: 1px solid rgba(244, 240, 229, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.footer-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  filter: sepia(0.32) saturate(0.85);
  box-shadow: 0 0 0 5px rgba(244, 240, 229, 0.08);
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--bone);
}

.footer-fine {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(244, 240, 229, 0.45);
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .nav-links { display: none; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-plate { justify-self: start; max-width: 380px; }
  .scroll-cue { display: none; }

  .services-inner { grid-template-columns: 1fr; }
  .services-head { position: static; }

  .about-inner { grid-template-columns: 1fr; }
  .about-media { max-width: 320px; }
  .about-photo { max-width: 320px; }

  .stats { grid-template-columns: repeat(2, 1fr); }

  /* horizontal rail becomes native swipe on touch layouts */
  .rail-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .rail-wrap::-webkit-scrollbar { display: none; }
  .specimens-pin { min-height: 0; }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .nav-wordmark { font-size: 1rem; }
  .stats { gap: 1.6rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue-line { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
