/**
 * @file
 * SKATETrack theme styles.
 *
 * Converted from static HTML to Drupal 11 theme CSS.
 */

/* ------------------------------------------------------------------ */
/* Custom Properties                                                    */
/* ------------------------------------------------------------------ */
:root {
  --dark: #111111;
  --light: #f8f8f8;
  --gold: #FFB81C;
  --silver: #C1C6C8;
  --navy: #041E42;
}

/* ------------------------------------------------------------------ */
/* Custom Fonts                                                         */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "MetropolisBold";
  src: url("../fonts/ClarityCity-Bold.woff");
}
@font-face {
  font-family: "MetropolisRegular";
  src: url("../fonts/ClarityCity-Regular.woff");
}
@font-face {
  font-family: "MetropolisLight";
  src: url("../fonts/ClarityCity-ExtraLight.woff");
}

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

/* ------------------------------------------------------------------ */
/* Base                                                                 */
/* ------------------------------------------------------------------ */
body {
  font-family: "MetropolisRegular", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--light);
  background: var(--dark);
  line-height: 1.2;
}

/* Drupal skip-link – visually hidden until focused. */
.visually-hidden.focusable:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  clip: auto;
  overflow: visible;
  width: auto;
  height: auto;
}

/* ------------------------------------------------------------------ */
/* Navbar                                                               */
/* ------------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  /* background: rgba(0, 0, 0, 0.25); */
  background: #000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-links {
  display: flex;
  flex-direction: row;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar a,
.logo {
  color: white;
}

.navbar a {
  margin-left: 20px;
  font-weight: 500;
}

.navbar a:hover {
  color: var(--gold);
}

/* Hamburger button – hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate hamburger to X when open */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile styles */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
    margin-left: auto; /* push hamburger to the right edge */
  }

  /* Dissolve the Drupal block wrapper around the nav menu from the
     flex row so it doesn't push the hamburger toward the centre.
     The absolutely-positioned .nav-links dropdown still positions
     itself relative to the fixed .navbar as intended. */
  .navbar > *:has(.nav-links) {
    display: contents;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0 20px;
    list-style: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    padding: 10px 0;
  }

  .navbar a {
    margin-left: 0;
    font-size: 1.05rem;
  }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                 */
/* ------------------------------------------------------------------ */
.hero {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: white;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  letter-spacing: -1px;
}

.hero-title h1 {
  font-size: 32pt;
  font-weight: 100;
}

.hero-title span {
  display: inline-block;
  transition: transform 0.6s ease;
}

.hero-title:hover span {
  transform: translateY(-4px);
}

.accent {
  color: var(--silver);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ------------------------------------------------------------------ */
/* Email Subscription Box                                               */
/* ------------------------------------------------------------------ */
.email-hover-box {
  margin-top: 36px;
}

.email-hover-label {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 12px;
}

.email-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.email-form input[type="email"] {
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.95rem;
  outline: none;
  width: 220px;
  backdrop-filter: blur(4px);
  transition: border-color 0.3s ease;
}

.email-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.email-form input[type="email"]:focus {
  border-color: var(--gold);
}

.email-form button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: #000;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.3s ease;
}

.email-form button:hover {
  background: #000000;
  color: var(--gold);
  border: 1px solid var(--gold);
}

/* ------------------------------------------------------------------ */
/* Section Dividers                                                     */
/* ------------------------------------------------------------------ */
.divider {
  border: none;
  height: 9px;
  background: var(--gold);
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Content Sections                                                     */
/* ------------------------------------------------------------------ */
.section {
  padding: 120px 10%;
  position: relative;
  overflow: hidden;
  color: white;
}

.section-app {
  padding: 85px 0%;
  position: relative;
  overflow: hidden;
  color: white;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.section-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.section-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.section-content {
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section-text {
  max-width: 1444px;
  margin: auto;
  font-size: 1.1rem;
}

.intro-text {
  max-width: 1024px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* Feature Cards                                                        */
/* ------------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(395px, 100%), 1fr));
  gap: 30px;
  margin: 20px auto 0;
  max-width: 1444px;
}

.card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.card img {
  padding: 15px;
  display: block;
}

/* Not crazy about this but the WYSIWYG is adding dimensions and it is */
/* messing up the display */
.card img {
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */
.footer {
  padding: 40px 0 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  z-index: 1;
}

/* ------------------------------------------------------------------ */
/* Scroll Animations                                                    */
/* ------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

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

/* Stagger delays for sequential scroll reveals */
.section-content > .reveal:nth-child(2),
.cards > .reveal:nth-child(2) {
  transition-delay: 0.15s;
}

.section-content > .reveal:nth-child(3),
.cards > .reveal:nth-child(3) {
  transition-delay: 0.3s;
}

.cards > .reveal:nth-child(4) {
  transition-delay: 0.45s;
}

/* Initial page fade-in */
.fade-in {
  animation: fadeIn 1.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* Scroll Emphasis Animation                                            */
/* ------------------------------------------------------------------ */
.scroll-emphasis span {
  position: relative;
  font-weight: 400;
  transition:
    font-weight 0.6s ease,
    color 0.6s ease;
}

.scroll-emphasis span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.scroll-emphasis.active span {
  font-weight: 700;
}

.scroll-emphasis.active span::after {
  transform: scaleX(1);
}

/* ------------------------------------------------------------------ */
/* Logo & Brand Typography                                              */
/* ------------------------------------------------------------------ */
.logo-bold {
  font-family: "MetropolisBold", sans-serif;
  font-weight: 700;
}

.logo-light {
  font-family: "MetropolisLight", sans-serif;
}

.gold {
  color: var(--gold);
  text-decoration: none;
}

.silver {
  color: var(--silver);
}

.navy {
  color: var(--navy);
}

.trademark {
  font-size: 9pt;
  font-family: sans-serif;
}

/* ------------------------------------------------------------------ */
/* Utilities                                                            */
/* ------------------------------------------------------------------ */
.center {
  text-align: center;
}

h3 {
  margin-bottom: 20px;
}

p.beta-information {
  margin-top: 15px;
  text-align: left;
  min-width: 370px;
  max-width: 600px;
  padding: 0 30px;
}

.copyright {
  position: relative;
  font-size: 9pt;
  top: -2px;
}

.card-text {
  line-height: 1.2;
  text-align: left;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ */
/* Highlighted / Status Messages                                        */
/* ------------------------------------------------------------------ */
/*
 * Fixed to the bottom of the viewport so status messages (saved, errors,
 * warnings) are visible at all scroll positions without disrupting layout.
 */
.highlighted {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.92); /* --navy with opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* border-top: 2px solid var(--gold); */
  color: var(--light);
}

[role="contentinfo"] {
  background-color: var(--gold);
  color: #000;
  padding: 8px 20px;
  border-radius: 15px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Drupal Admin Toolbar Offset                                          */
/* ------------------------------------------------------------------ */
/*
 * When the Drupal admin toolbar is visible it sits fixed at the top of the
 * viewport.  Drupal adds body classes we can key off:
 *   toolbar-fixed            – toolbar is in fixed (not absolute) mode
 *   toolbar-horizontal       – tabs rendered horizontally across the top
 *   toolbar-tray-open        – a toolbar tray (sub-menu) is currently open
 *
 * The JS behavior below keeps these values in sync dynamically; the CSS
 * rules here act as a reliable first-paint baseline.
 */
body.toolbar-fixed.toolbar-horizontal .navbar {
  top: 39px; /* height of the admin toolbar bar */
}

body.toolbar-fixed.toolbar-horizontal.toolbar-tray-open .navbar {
  top: 79px; /* toolbar bar (39px) + open horizontal tray (40px) */
}

/* ------------------------------------------------------------------ */
/* Privacy Page                                                         */
/* ------------------------------------------------------------------ */
.privacy {
  max-width: 1024px;
  margin: 0 auto;
}

.privacy ul {
  list-style-type: disc;
  padding-left: 40px;
}

.privacy li {
  margin-left: 30px;
}

.privacy p {
  padding: 5px 0 5px 40px;
}

.privacy h2 {
  margin: 10px 0;
}

.privacy .meta {
  text-align: center;
}
