:root {
  /* =========================================================
     PTC OFFICIAL BRAND PALETTE
     ========================================================= */

  /* Primary */
  --ptc-green: #40aa1d;
  --ptc-grey: #3d4647;

  /* Selected secondary colors - no blue */
  --ptc-black: #20262a;
  --ptc-green-dark: #00890b;
  --ptc-green-deep: #002d04;

  /* UI neutrals based on PTC palette */
  --background: #151a1c;
  --background-deep: #111517;
  --surface: #20262a;
  --surface-soft: #293033;
  --surface-grey: #3d4647;

  --text: #ffffff;
  --text-soft: #d9dede;
  --muted: #aeb5b5;
  --muted-dark: #7d8687;

  --border: rgba(64, 170, 29, 0.28);
  --border-strong: rgba(64, 170, 29, 0.48);
  --border-light: rgba(255, 255, 255, 0.1);

  --green-soft: rgba(64, 170, 29, 0.1);
  --green-medium: rgba(64, 170, 29, 0.18);

  --sans: "Montserrat", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;

  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(64, 170, 29, 0.12),
      transparent 38%
    ),
    linear-gradient(
      180deg,
      #171c1e 0%,
      #131719 48%,
      #101416 100%
    );
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--ptc-green);
  color: #ffffff;
}

/* =========================================================
   BACKGROUND
   ========================================================= */

#matrix-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  pointer-events: none;
}

.background-glow {
  position: fixed;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: -4;
}

.glow-one {
  top: 0;
  left: -370px;
  background: rgba(64, 170, 29, 0.11);
}

.glow-two {
  right: -420px;
  bottom: 3%;
  background: rgba(0, 137, 11, 0.08);
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.navbar.scrolled {
  background: rgba(32, 38, 42, 0.94);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.16);
}

.navbar-inner {
  width: min(1350px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;

  display: flex;
  align-items: center;
}

.nav-logo {
  margin-right: auto;
}

.nav-logo img {
  width: 155px;
  max-height: 48px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  position: relative;

  color: #d4d9d9;

  font-size: 0.81rem;
  font-weight: 600;

  transition: color 0.2s ease;
}

.nav-menu a::after {
  content: "";

  position: absolute;
  bottom: -8px;
  left: 0;

  width: 0;
  height: 2px;

  background: var(--ptc-green);

  transition: width 0.2s ease;
}

.nav-menu a:hover {
  color: #ffffff;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 34px;
  padding: 10px 18px;

  border: 1px solid var(--ptc-green);

  color: #ffffff;
  background: transparent;

  font-size: 0.79rem;
  font-weight: 700;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.nav-cta:hover {
  color: #ffffff;
  background: var(--ptc-green);
}

.nav-toggle {
  display: none;

  padding: 0;
  margin-left: 20px;

  width: 40px;
  height: 40px;

  border: 0;
  background: transparent;
}

.nav-toggle span {
  display: block;

  width: 23px;
  height: 2px;

  margin: 5px auto;

  background: #ffffff;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 100vh;

  display: flex;
  align-items: center;

  padding: 130px 24px 90px;
}

.hero-content {
  width: min(1100px, 100%);
  margin: 0 auto;

  text-align: center;
}

.hero-brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  margin-bottom: 26px;

  color: var(--ptc-green);

  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.hero-brand-line span:first-child,
.hero-brand-line span:last-child {
  width: 44px;
  height: 1px;

  background: var(--ptc-green);
}

.hero-logo {
  width: min(720px, 82vw);
  max-height: 280px;

  margin: 0 auto 28px;

  object-fit: contain;
}

.hero-description {
  max-width: 680px;
  margin: 0 auto;

  color: var(--text-soft);

  font-size: clamp(1rem, 2vw, 1.16rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px;
  margin-top: 35px;
}

/* =========================================================
   HERO INFO CARD
   ========================================================= */

.hero-info-card {
  position: relative;

  width: min(820px, 100%);

  margin: 58px auto 0;
  padding: 34px 40px;

  overflow: hidden;

  border:
    1px solid rgba(255, 255, 255, 0.1);

  background:
    linear-gradient(
      145deg,
      rgba(61, 70, 71, 0.84),
      rgba(32, 38, 42, 0.92)
    );

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  text-align: left;

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.25);
}

.hero-info-accent {
  position: absolute;
  top: 0;
  left: 0;

  width: 7px;
  height: 100%;

  background: var(--ptc-green);
}

.hero-info-card p {
  margin: 0;

  color: #d6dada;

  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
}

.hero-info-card strong {
  color: #ffffff;
  font-weight: 600;
}

.hero-info-links {
  display: flex;
  flex-wrap: wrap;

  gap: 24px;

  margin-top: 24px;
}

.hero-info-links a {
  color: var(--ptc-green);

  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.hero-info-links a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  min-height: 50px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 18px;

  padding: 0 22px;

  border: 1px solid transparent;

  font-size: 0.84rem;
  font-weight: 700;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;

  background: var(--ptc-green);
  border-color: var(--ptc-green);
}

.btn-primary:hover {
  background: var(--ptc-green-dark);
  border-color: var(--ptc-green-dark);

  box-shadow:
    0 12px 35px rgba(64, 170, 29, 0.2);
}

.btn-secondary {
  color: #ffffff;

  border-color: rgba(255, 255, 255, 0.22);

  background:
    rgba(61, 70, 71, 0.3);
}

.btn-secondary:hover {
  border-color: var(--ptc-green);

  background:
    rgba(64, 170, 29, 0.1);
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  width: min(1200px, calc(100% - 48px));

  margin: 0 auto;
  padding: 90px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 75px 1fr;

  margin-bottom: 55px;
}

.section-number {
  color: var(--ptc-green);

  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.section-kicker {
  display: block;

  margin-bottom: 10px;

  color: var(--muted);

  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;

  letter-spacing: 0.15em;
}

.section-heading h2,
.contact-cta h2 {
  max-width: 850px;

  margin: 0;

  color: #ffffff;

  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.accent-text {
  color: var(--ptc-green);
}

/* =========================================================
   ABOUT
   ========================================================= */

.about-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;

  align-items: center;

  gap: 65px;
}

.about-text p {
  max-width: 500px;

  color: var(--muted);
}

.about-text .large-copy {
  color: #ffffff;

  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.6;
}

/* =========================================================
   MATHCAD IMAGE
   ========================================================= */

.mathcad-image-wrapper {
  position: relative;

  padding: 10px;

  border: 1px solid rgba(255, 255, 255, 0.1);

  background: var(--surface);

  box-shadow:
    0 30px 75px rgba(0, 0, 0, 0.3);

  overflow: hidden;
}

.mathcad-image-wrapper::before {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  border-top: 3px solid var(--ptc-green);

  z-index: 2;
}

.image-label {
  position: absolute;
  top: 19px;
  left: 20px;

  z-index: 3;

  padding: 7px 10px;

  color: #ffffff;
  background: var(--ptc-green);

  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;

  letter-spacing: 0.1em;
}

.mathcad-example-image {
  position: relative;

  width: 100%;
  height: auto;

  object-fit: contain;
}

/* =========================================================
   FEATURE GRID
   ========================================================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
}

.feature-card {
  position: relative;

  min-height: 310px;

  padding: 34px;

  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);

  background:
    rgba(32, 38, 42, 0.68);

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.feature-card:hover {
  background:
    rgba(61, 70, 71, 0.58);
}

.feature-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 3px;

  background: var(--ptc-green);

  transform: scaleX(0);
  transform-origin: left;

  transition: transform 0.25s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-number {
  position: absolute;
  top: 20px;
  right: 22px;

  color: #7e8788;

  font-family: var(--mono);
  font-size: 0.59rem;
}

.feature-icon {
  height: 70px;

  display: flex;
  align-items: center;

  color: var(--ptc-green);

  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
}

.feature-card h3 {
  margin: 20px 0 12px;

  color: #ffffff;

  font-size: 1.05rem;
}

.feature-card p {
  max-width: 290px;

  margin: 0;

  color: var(--muted);

  font-size: 0.84rem;
}

.feature-example {
  position: absolute;
  bottom: 25px;
  left: 34px;

  color: rgba(64, 170, 29, 0.8);

  font-family: var(--mono);
  font-size: 0.66rem;
}

.mini-feature-wave {
  position: absolute;

  bottom: 28px;
  left: 34px;

  width: 130px;
  height: 30px;

  overflow: hidden;
}

.mini-feature-wave span {
  position: absolute;

  top: 12px;

  width: 140px;
  height: 24px;

  border-top:
    2px solid rgba(64, 170, 29, 0.85);

  border-radius: 50%;
}

/* =========================================================
   CONTACT CTA
   ========================================================= */

.contact-section {
  padding-top: 90px;
  padding-bottom: 140px;
}

.contact-cta {
  position: relative;

  padding: 75px 40px;

  border:
    1px solid rgba(64, 170, 29, 0.34);

  background:
    linear-gradient(
      135deg,
      rgba(61, 70, 71, 0.96),
      rgba(32, 38, 42, 0.97)
    );

  text-align: center;

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.28);

  overflow: hidden;
}

.contact-cta::after {
  content: "";

  position: absolute;

  right: -150px;
  bottom: -190px;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  background:
    rgba(64, 170, 29, 0.1);

  filter: blur(30px);

  pointer-events: none;
}

.contact-accent {
  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 5px;

  background: var(--ptc-green);
}

.contact-cta .section-kicker {
  position: relative;
  z-index: 2;

  color: #c5cccc;
}

.contact-cta h2 {
  position: relative;
  z-index: 2;

  max-width: 720px;

  margin: 0 auto 20px;
}

.contact-cta p {
  position: relative;
  z-index: 2;

  max-width: 610px;

  margin: 0 auto 34px;

  color: #c9cece;

  font-size: 0.95rem;
  line-height: 1.75;
}

.contact-button {
  position: relative;
  z-index: 2;

  min-width: 190px;
  min-height: 54px;

  font-size: 0.9rem;
}

.contact-button span {
  transition: transform 0.2s ease;
}

.contact-button:hover span {
  transform: translateX(4px);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  border-top:
    1px solid rgba(255, 255, 255, 0.08);

  background: var(--ptc-black);
}

.footer-inner {
  width: min(1350px, calc(100% - 48px));
  min-height: 95px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.footer-logo {
  width: 140px;
  max-height: 45px;

  object-fit: contain;
}

.footer-copy,
.back-to-top {
  color: #939c9d;

  font-size: 0.66rem;
}

.back-to-top {
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--ptc-green);
}

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */

.reveal {
  opacity: 0;

  transform: translateY(22px);

  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 950px) {
  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu.open {
    position: absolute;

    top: 78px;
    left: 0;

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 15px 24px;

    background: rgba(32, 38, 42, 0.98);

    border-bottom:
      1px solid rgba(255, 255, 255, 0.09);

    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.2);
  }

  .nav-menu.open a {
    padding: 13px 0;
  }

  .nav-menu.open a::after {
    bottom: 6px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {
  .navbar-inner {
    width: calc(100% - 30px);
  }

  .nav-logo img {
    width: 120px;
  }

  .hero {
    min-height: auto;

    padding: 120px 16px 70px;
  }

  .hero-brand-line {
    margin-bottom: 22px;
  }

  .hero-logo {
    width: 92%;
  }

  .hero-description {
    font-size: 0.93rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-info-card {
    margin-top: 45px;
    padding: 27px 22px 27px 28px;
  }

  .hero-info-links {
    flex-direction: column;
    gap: 10px;
  }

  .section {
    width: calc(100% - 30px);
    padding: 75px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;

    gap: 10px;

    margin-bottom: 40px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 290px;
  }

  .contact-cta {
    padding: 55px 24px;
  }

  .contact-cta h2 {
    font-size:
      clamp(2rem, 11vw, 3rem);
  }

  .footer-inner {
    width: calc(100% - 30px);

    padding: 25px 0;

    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   ACCESSIBILITY / REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}