:root {
  --color-bg: #eef5db;
  --color-surface: #d6d1b1;
  --color-surface-soft: #c7efcf;
  --color-accent: #f0b67f;
  --color-accent-strong: #fe5f55;

  --color-text: #2b2b2b;
  --color-text-light: #ffffff;

  --color-border: rgba(43, 43, 43, 0.1);
  --color-shadow: rgba(43, 43, 43, 0.12);

  --color-overlay-dark: rgba(43, 43, 43, 0.58);
  --color-overlay-mid: rgba(43, 43, 43, 0.28);

  --header-bg: rgba(238, 245, 219, 0.78);
}

@font-face {
  font-family: "HeroFont";
  src: url("assets/fonts/hero-font.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Base Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* ===== Layout ===== */
.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  max-width: 52ch;
  color: rgba(43, 43, 43, 0.8);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-nav a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 16px var(--color-shadow);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--color-shadow);
}

.header-nav i {
  font-size: 1.1rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url("assets/hero.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      var(--color-overlay-mid),
      var(--color-overlay-dark)
    ),
    linear-gradient(
      135deg,
      rgba(254, 95, 85, 0.16),
      rgba(240, 182, 127, 0.12),
      rgba(199, 239, 207, 0.08)
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-text-light);
  max-width: 700px;
  padding: 5rem 0;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(6rem, 12vw, 11.5rem);
  line-height: 1.02;
  font-weight: 400;
  font-family: "HeroFont", Georgia, "Times New Roman", serif;
  letter-spacing: 0.04em;
  color: #eef5db;

  -webkit-text-stroke: 14px #000000;
  paint-order: stroke fill;

  text-shadow:
    0 0 5px rgba(0, 0, 0, 1),
    0 0 10px rgba(0, 0, 0, 1),
    0 0 18px rgba(0, 0, 0, 1),
    0 0 28px rgba(0, 0, 0, 0.96),
    0 0 42px rgba(0, 0, 0, 0.82),
    0 0 60px rgba(0, 0, 0, 0.62);
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: clamp(4.25rem, 16vw, 6.5rem);
    -webkit-text-stroke: 3px #000000;
  }
}

.hero-text {
  margin: 0 0 2rem;
  max-width: 52ch;
  font-size: 1.08rem;
}

.download-links,
.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px var(--color-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px var(--color-shadow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-strong), var(--color-accent));
  color: var(--color-text-light);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--color-text-light);
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
}

/* ===== Screenshots ===== */
.screenshots {
  background-color: var(--color-bg);
}

.screenshot-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.screenshot-track::-webkit-scrollbar {
  height: 10px;
}

.screenshot-track::-webkit-scrollbar-thumb {
  background-color: rgba(43, 43, 43, 0.18);
  border-radius: 999px;
}

.screenshot-card {
  flex: 0 0 min(72vw, 560px);
  scroll-snap-align: start;
  border: 1px solid rgba(43, 43, 43, 0.08);
  border-radius: 1.5rem;
  overflow: hidden;
  background-color: var(--color-surface-soft);
  box-shadow: 0 16px 30px var(--color-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 36px rgba(43, 43, 43, 0.16);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.screenshot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.screenshot-button img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.94);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: min(96vw, 1600px);
  max-height: 90vh;
  width: auto;
  height: auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 600px) {
  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* ===== Features ===== */
.features {
  background-color: var(--color-surface-soft);
}

.feature-banners {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-banner {
  position: relative;
  min-height: 420px;
  border-radius: 1.75rem;
  overflow: hidden;
  background-color: #000000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(43, 43, 43, 0.08);
  box-shadow: 0 18px 36px rgba(43, 43, 43, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(43, 43, 43, 0.2);
}

.feature-banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.52) 38%,
      rgba(0, 0, 0, 0.2) 100%
    ),
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.05) 100%
    );
}

.feature-banner-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 2.25rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
}

.feature-banner-content h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.feature-banner-content p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
  max-width: 42ch;
}

/* Background images */
.feature-graphics {
  background-image: url("assets/TiP_promo_1_web.jpg");
}

.feature-animation {
  background-image: url("assets/TiP_promo_2_web.gif");
}

.feature-custom-li {
  background-image: url("assets/TiP_promo_3_web.jpg");
}

.feature-variations {
  background-image: url("assets/TiP_promo_4_web.jpg");
}

.feature-sim-vn {
  background-image: url("assets/TiP_promo_5_web.jpg");
}

.feature-no-rng {
  background-image: url("assets/TiP_promo_6_web.jpg");
}

/* Alternate text placement for visual rhythm */
.feature-banners .feature-banner:nth-child(even) .feature-banner-overlay {
  background:
    linear-gradient(
      to left,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.52) 38%,
      rgba(0, 0, 0, 0.2) 100%
    ),
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.05) 100%
    );
}

.feature-banners .feature-banner:nth-child(even) .feature-banner-content {
  margin-left: auto;
  text-align: left;
}

/* Responsive */
@media (max-width: 900px) {
  .feature-banner {
    min-height: 340px;
  }

  .feature-banner-content {
    min-height: 340px;
    max-width: 100%;
    padding: 1.5rem;
  }

  .feature-banner-content h3 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .feature-banner-overlay,
  .feature-banners .feature-banner:nth-child(even) .feature-banner-overlay {
    background:
      linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.45) 48%,
        rgba(0, 0, 0, 0.14) 100%
      );
  }

  .feature-banners .feature-banner:nth-child(even) .feature-banner-content {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .feature-banner {
    min-height: 300px;
    border-radius: 1.25rem;
  }

  .feature-banner-content {
    min-height: 300px;
    padding: 1.25rem;
  }

  .feature-banner-content p {
    font-size: 1rem;
  }
}

/* ===== Support CTA ===== */
.support {
  background-color: var(--color-bg);
}

.support-box {
  padding: 3rem 2rem;
  border-radius: 1.75rem;
  background:
    linear-gradient(
      135deg,
      rgba(240, 182, 127, 0.95),
      rgba(254, 95, 85, 0.9)
    );
  color: var(--color-text-light);
  box-shadow: 0 18px 36px rgba(43, 43, 43, 0.14);
  text-align: center;
}

.support-box h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.1;
  text-align: center;
}

.support-box p {
  margin: 0 auto 1.5rem;
  max-width: 52ch;
}

.support .support-links {
  justify-content: center;
}

/* Primary action: SubscribeStar */
.support .btn-primary {
  background: #ffffff;
  color: #b93a32;
  border: 2px solid #ffffff;
  box-shadow: 0 12px 28px rgba(43, 43, 43, 0.18);
}

.support .btn-primary:hover,
.support .btn-primary:focus-visible {
  background: #fff7f5;
  color: #9f2f28;
}

/* Secondary action: UniFans */
.support .btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 22px rgba(43, 43, 43, 0.12);
}

.support .btn-secondary:hover,
.support .btn-secondary:focus-visible {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ===== Footer ===== */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface-soft);
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  margin: 0;
  color: rgba(43, 43, 43, 0.8);
}

/* ===== Focus States ===== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent-strong);
  outline-offset: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .screenshot-card {
    flex: 0 0 min(82vw, 520px);
  }
}

@media (max-width: 900px) {
  .section {
    padding: 4rem 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 8vw, 4.5rem);
  }

  .screenshot-card {
    flex: 0 0 min(86vw, 500px);
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 60px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .header-nav a {
    width: 38px;
    height: 38px;
  }

.header-nav img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

  .section {
    padding: 3.5rem 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-text {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .download-links,
  .support-links {
    flex-direction: column;
  }

  .support-box {
    padding: 2.25rem 1.25rem;
  }

  .screenshot-card {
    flex: 0 0 88vw;
    border-radius: 1.2rem;
  }
}