/* TIMSUN — brand tokens & layout */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --green: #0db14b;
  --green-dim: #0a8f3c;
  --lime: #d7df23;
  --text: #ffffff;
  --muted: #b8b8b8;
  --border: rgba(13, 177, 75, 0.75);
  --header-h: 72px;
  --reveal-duration: 0.65s;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-distance: 28px;
  --font-display: "Oswald", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --radius: 14px;
  --container: min(1120px, calc(100% - 2.5rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(13, 177, 75, 0.12), transparent 55%),
    linear-gradient(180deg, #050505 0%, var(--bg) 40%, #080808 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--lime);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e8f04a;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(13, 177, 75, 0.35);
}

.header-inner {
  width: var(--container);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 42px;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav > a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 0.25rem 0;
}

.site-nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav > a:hover,
.site-nav > a.is-active {
  color: var(--lime);
}

.site-nav > a:hover::after,
.site-nav > a.is-active::after {
  transform: scaleX(1);
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.35rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(13, 177, 75, 0.45);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(13, 177, 75, 0.12);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(13, 177, 75, 0.45);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--lime);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero — split composition: copy left, mascot right */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 1.25rem) 0 3.5rem;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  -webkit-transform: translate(-50%, -50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(ellipse 45% 50% at 78% 55%, rgba(13, 177, 75, 0.2), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin-inline: auto;
}

.hero-text {
  max-width: 900px;
}

.hero-text .section-title {
  margin-bottom: 1.15rem;
  text-align: left;
}

.hero-mid {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2vw, 1.35rem);
  width: fit-content;
  max-width: 100%;
}

.hero-copy-col {
  flex: 0 1 auto;
  min-width: 0;
}

.hero-lead {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 52ch;
}

.hero-accent {
  color: var(--lime);
  font-weight: 600;
}

.hero-distributor {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-visual {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: min(78%, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 177, 75, 0.35) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.hero-mascot {
  position: relative;
  z-index: 1;
  width: clamp(140px, 18vw, 220px);
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
  animation: mascot-float 5s ease-in-out infinite;
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: #111;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--green);
}

.btn-outline:hover {
  background: rgba(13, 177, 75, 0.14);
  color: var(--lime);
  border-color: var(--lime);
}

.hero-enter {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-in 0.75s var(--reveal-ease) forwards;
}

.hero-mid.hero-enter {
  animation-delay: 0.2s;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 5rem 0 4.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
}

.section-title span {
  color: var(--lime);
}

.section-desc {
  margin: 0 auto;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1rem;
}

.panel {
  background: rgba(17, 17, 17, 0.85);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* Catalogue */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.catalogue-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.catalogue-card:hover {
  border-color: var(--lime);
  transform: translateY(-3px);
  color: inherit;
}

.catalogue-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(13, 177, 75, 0.15);
  color: var(--lime);
}

.catalogue-card-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.catalogue-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lime);
}

.catalogue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.catalogue-card-cta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.catalogue-card:hover .catalogue-card-cta {
  color: var(--lime);
}

/* Find Tyres grid */
.tyre-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.15rem 0.9rem;
}

.tyre-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.tyre-card-media {
  margin: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(13, 177, 75, 0.35);
  background: #0a0a0a;
  line-height: 0;
  cursor: zoom-in;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tyre-card-media:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
}

.tyre-card-media:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.tyre-card-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.tyre-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.2rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--lime);
  line-height: 1.2;
  transition: color 0.2s ease;
}

.tyre-buy:hover {
  color: #e8f04a;
}

.tyre-buy svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  fill: currentColor;
}

/* Product lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(920px, 100%);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(13, 177, 75, 0.5);
  border-radius: 8px;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--lime);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

/* Franchise */
.franchise-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-chip {
  appearance: none;
  border: 1px solid rgba(13, 177, 75, 0.45);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--green);
}

.filter-chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.franchise-groups {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.franchise-state-group[hidden] {
  display: none;
}

.franchise-state-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

.franchise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.franchise-card {
  position: relative;
  padding: 1.35rem 1.25rem 1.25rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.franchise-card:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
}

.franchise-badge {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(13, 177, 75, 0.18);
  color: var(--lime);
}

.franchise-badge.is-dealer {
  background: rgba(215, 223, 35, 0.15);
  color: var(--lime);
}

.franchise-num {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--green);
}

.franchise-card h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.25;
}

.franchise-address {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.franchise-phones {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.franchise-phones a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lime);
}

.franchise-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.franchise-empty[hidden] {
  display: none;
}

/* Feature video */
.feature-video-section {
  padding-top: 1.5rem;
}

.feature-video {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid rgba(13, 177, 75, 0.45);
  background: #000;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.feature-video-player {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  vertical-align: middle;
  background: #000;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid rgba(13, 177, 75, 0.25);
}

.footer-legal {
  text-align: center;
  padding: 0 1.25rem;
}

.copyright {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.credit {
  margin: 0;
  font-size: 0.9rem;
}

.credit a {
  color: #8a8a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credit a:hover {
  color: var(--lime);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-fade {
  transform: none;
}

.reveal-fade.is-visible {
  transform: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .tyre-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .franchise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tyre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .logo {
    height: 34px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions {
    gap: 0.65rem;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13, 177, 75, 0.3);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav > a {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav > a::after {
    display: none;
  }

  .header-social {
    margin: 1rem 0 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.75rem;
  }

  .site-header.is-nav-open {
    background: rgba(8, 8, 8, 0.95);
  }

  .hero {
    align-items: center;
    padding-bottom: 3rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text .section-title {
    text-align: center;
  }

  .hero-mid {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    margin-inline: auto;
  }

  .hero-copy-col {
    order: 1;
  }

  .hero-visual {
    order: 0;
    justify-content: center;
  }

  .hero-mascot {
    width: min(48%, 170px);
  }

  .hero-lead {
    max-width: 48ch;
    margin-inline: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .tyre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.75rem;
  }

  .tyre-buy {
    font-size: 0.66rem;
  }

  .franchise-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  .hero-mascot {
    width: min(52%, 150px);
  }

  .filter-chip {
    font-size: 0.72rem;
    padding: 0.45rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-enter {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-mascot {
    animation: none;
  }

  .catalogue-card:hover,
  .franchise-card:hover,
  .tyre-card-media:hover,
  .btn:hover {
    transform: none;
  }
}
