:root {
  --ink: #18212b;
  --muted: #5d6975;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #ded8cf;
  --steel: #25313d;
  --gold: #c88a2d;
  --gold-dark: #946018;
  --shadow: 0 24px 60px rgba(24, 33, 43, 0.16);
}

body.theme-light {
  --ink: #1f2933;
  --muted: #687481;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #ddd7ce;
  --steel: #f0ebe2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: white;
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(24, 33, 43, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  text-transform: uppercase;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.86);
}

.main-nav a:hover {
  color: white;
}

.theme-toggle {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
}

.hero {
  position: relative;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 370px);
  align-items: end;
  gap: clamp(24px, 5vw, 64px);
  padding: 160px clamp(20px, 6vw, 78px) 70px;
  color: white;
  background-image: url("assets/brand/tsi-brand-cover.png");
  background-position: center 58%;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 24, 32, 0.86), rgba(16, 24, 32, 0.48) 48%, rgba(16, 24, 32, 0.16));
}

.hero-content,
.hero-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--gold);
  color: var(--ink);
}

.button.primary:hover {
  background: #d99a3d;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: white;
}

.hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  max-width: 430px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-card strong {
  color: var(--gold-dark);
  font-size: 30px;
  line-height: 1;
}

.hero-card span {
  align-self: center;
  color: var(--muted);
}

.section,
.projects,
.about-band,
.contact {
  padding: 88px clamp(20px, 6vw, 78px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  align-items: center;
  background: var(--surface);
}

.intro p:last-child {
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-grid article {
  min-height: 270px;
  padding: 30px;
  background: var(--surface);
}

.service-grid span {
  display: block;
  margin-bottom: 60px;
  color: var(--gold-dark);
  font-weight: 800;
}

.service-grid p,
.timeline p,
.about-band p,
.contact-copy p {
  color: var(--muted);
}

.environmental-showcase {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  margin-top: 34px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(24, 33, 43, 0.08);
}

.environmental-copy {
  align-self: start;
  position: sticky;
  top: 96px;
}

.environmental-copy h3 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
}

.environmental-copy p {
  color: var(--muted);
}

.environmental-copy ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.environmental-copy li {
  padding: 12px 14px;
  background: var(--paper);
  border-left: 4px solid var(--gold);
  font-weight: 800;
}

.environmental-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.environmental-gallery figure {
  position: relative;
  min-height: 190px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.environmental-gallery img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 220ms ease, opacity 220ms ease;
}

.environmental-gallery figure:hover img {
  transform: scale(1.035);
  opacity: 0.86;
}

.environmental-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.environmental-feature,
.environmental-feature img {
  min-height: 392px;
}

.environmental-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(24, 33, 43, 0.9), rgba(24, 33, 43, 0));
  color: white;
  font-weight: 800;
}

.projects {
  background: var(--steel);
  color: white;
}

body.theme-light .projects {
  color: var(--ink);
}

.project-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: repeat(2, minmax(250px, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #0f171f;
}

.project-card.large {
  grid-row: 1 / span 2;
}

.project-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 240ms ease, opacity 240ms ease;
}

.project-card:hover img {
  transform: scale(1.035);
  opacity: 0.7;
}

.project-card div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
}

.project-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 4px 0 0;
  font-size: 26px;
}

.activities {
  background: var(--surface);
}

.activity-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 30px;
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(24, 33, 43, 0.08);
}

.activity-date {
  display: grid;
  align-content: center;
  min-height: 150px;
  padding: 18px;
  background: var(--ink);
  color: white;
  text-align: center;
}

.activity-date strong {
  color: var(--gold);
  font-size: 30px;
  line-height: 1;
}

.activity-date span {
  margin-top: 8px;
  font-weight: 800;
}

.activity-content h3 {
  font-size: 28px;
}

.activity-content p {
  color: var(--muted);
}

.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.activity-tags span {
  padding: 8px 12px;
  background: rgba(200, 138, 45, 0.14);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.activity-gallery figure {
  position: relative;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.activity-gallery img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 220ms ease, opacity 220ms ease;
}

.activity-gallery figure:hover img {
  transform: scale(1.03);
  opacity: 0.86;
}

.featured-activity-photo {
  grid-column: span 2;
  grid-row: span 2;
}

.featured-activity-photo,
.featured-activity-photo img {
  min-height: 456px;
}

.activity-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(24, 33, 43, 0.9), rgba(24, 33, 43, 0));
  color: white;
  font-weight: 800;
}

.standout {
  background: var(--surface);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.compare {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.compare img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.compare-before-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 4px solid var(--gold);
}

.compare-before {
  width: 100vw;
  max-width: none;
}

.compare-range {
  position: absolute;
  inset: auto 24px 24px;
  width: calc(100% - 48px);
  accent-color: var(--gold);
}

.compare-label {
  position: absolute;
  top: 20px;
  padding: 8px 12px;
  background: rgba(24, 33, 43, 0.78);
  color: white;
  font-weight: 800;
}

.before-label {
  left: 20px;
}

.after-label {
  right: 20px;
}

.estimator {
  background: #ece6dc;
}

body.theme-light .estimator {
  background: #f5f0e8;
}

.estimator-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.estimator-form,
.estimate-result {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.estimator-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}

.estimate-result {
  display: grid;
  align-content: center;
  gap: 10px;
  background: var(--ink);
  color: white;
}

.estimate-result span {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
}

.estimate-result strong {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.estimate-result p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.media-section {
  padding: 88px clamp(20px, 6vw, 78px);
  background: var(--steel);
  color: white;
}

body.theme-light .media-section {
  color: var(--ink);
}

.media-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.875fr 0.875fr;
  gap: 22px;
}

.video-card,
.render-card {
  min-height: 320px;
  background: #111b24;
  overflow: hidden;
}

.video-card {
  display: grid;
  align-content: end;
  padding: 30px;
  background-image: linear-gradient(rgba(17, 27, 36, 0.28), rgba(17, 27, 36, 0.9)), url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.play-badge {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin-bottom: 70px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}

.video-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.render-card {
  position: relative;
}

.render-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  opacity: 0.86;
}

.render-card h3 {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  margin: 0;
  color: white;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.timeline li {
  position: relative;
  padding-top: 64px;
}

.timeline li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.about-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 48px;
  align-items: center;
  background: #e8e1d6;
}

.about-band ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-band li {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.62);
  border-left: 4px solid var(--gold);
  font-weight: 800;
}

.active-projects {
  background: var(--surface);
}

.progress-list {
  display: grid;
  gap: 18px;
}

.progress-list article {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.progress-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.progress-list span {
  color: var(--gold-dark);
  font-weight: 800;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--gold);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: 48px;
  background: var(--surface);
}

.contact-details {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  font-weight: 800;
}

.contact-details span {
  color: var(--muted);
  font-weight: 400;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  background: white;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 6vw, 78px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: white;
  font-weight: 800;
}

.chat-button {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  background: #1f9d55;
  color: white;
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 940px) {
  .hero,
  .intro,
  .about-band,
  .contact {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimator-panel,
  .estimator-form,
  .media-grid,
  .environmental-showcase {
    grid-template-columns: 1fr;
  }

  .environmental-copy {
    position: static;
  }

  .environmental-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .environmental-feature {
    grid-column: span 2;
  }

  .project-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .project-card.large {
    grid-row: auto;
  }

  .activity-card {
    grid-template-columns: 1fr;
  }

  .activity-date {
    min-height: auto;
  }

  .activity-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-activity-photo {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
  }

  .theme-toggle {
    position: absolute;
    top: 76px;
    right: 18px;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(24, 33, 43, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero {
    min-height: auto;
    padding-top: 132px;
  }

  .hero-card {
    max-width: none;
  }

  .service-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .service-grid span {
    margin-bottom: 28px;
  }

  .compare,
  .compare img {
    min-height: 360px;
    height: 360px;
  }

  .progress-list div {
    display: grid;
    gap: 4px;
  }

  .activity-gallery {
    grid-template-columns: 1fr;
  }

  .environmental-gallery {
    grid-template-columns: 1fr;
  }

  .environmental-feature {
    grid-column: auto;
    grid-row: auto;
  }

  .environmental-feature,
  .environmental-feature img {
    min-height: 300px;
  }

  .featured-activity-photo {
    grid-column: auto;
    grid-row: auto;
  }

  .featured-activity-photo,
  .featured-activity-photo img {
    min-height: 300px;
  }

  .site-footer {
    flex-direction: column;
  }
}
