/* ============================================================
   FenderOne — static site styles
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  --background: #0a0a0a;
  --background-alt: #121212;
  --surface: #141414;
  --surface-elevated: #1a1a1a;
  --accent-teal: #2dd4bf;
  --accent-cyan: #22d3ee;
  --gold: #d4a574;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --radius-card: 24px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --maxw: 80rem; /* 1280px */
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background: var(--background);
  color: #ffffff;
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Ensure the hidden attribute always wins over class display rules */
[hidden] {
  display: none !important;
}

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

.page {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--background);
}

/* ============================================================
   Shared utilities
   ============================================================ */
.eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-teal);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.section-sub {
  margin-top: 1rem;
  color: var(--text-muted);
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.gradient-text {
  background: linear-gradient(135deg, #2dd4bf 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 0.05em;
}

/* Card with subtle gradient hairline border */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-card);
}

.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #2dd4bf40, #22d3ee20);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glow-teal {
  box-shadow:
    0 0 40px rgba(45, 212, 191, 0.15),
    0 0 80px rgba(34, 211, 238, 0.08);
}
.glow-teal-hover:hover {
  box-shadow:
    0 0 50px rgba(45, 212, 191, 0.25),
    0 0 100px rgba(34, 211, 238, 0.12);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--background);
  background: linear-gradient(to right, var(--accent-teal), var(--accent-cyan));
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn--pill {
  border-radius: 9999px;
  padding: 0.875rem 1.5rem;
}
.btn--rect {
  border-radius: 0.75rem;
  padding: 0.875rem 1.5rem;
  width: 100%;
}
.btn--pill:hover {
  transform: scale(1.04);
}
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Reusable image scrims */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scrim--top {
  background: linear-gradient(to top, rgba(10, 10, 10, 0.7), transparent 60%);
}
.scrim--top-soft {
  background: linear-gradient(to top, rgba(20, 20, 20, 0.6), transparent 60%);
}
.scrim--top-strong {
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.2) 50%, transparent);
}
.scrim--left {
  background: linear-gradient(to right, rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.4) 40%, transparent);
}

/* Scroll reveal */
.reveal {
  opacity: 1;
  transform: translateY(24px);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  transform: translateY(0);
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 1rem 0;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-card);
  padding: 0.75rem 1rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.nav__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
}
.nav__link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav__link:hover {
  color: #fff;
}
.nav__link--highlight {
  color: var(--accent-teal);
}

@media (min-width: 640px) {
  .nav {
    border-radius: 9999px;
  }
  .nav__title {
    font-size: 1.125rem;
  }
  .nav__link {
    font-size: 0.875rem;
  }
}
@media (min-width: 768px) {
  .header {
    padding: 1rem 2rem 0;
  }
  .nav {
    padding: 0.75rem 1.5rem;
    gap: 1rem;
  }
  .nav__links {
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .nav__links {
    gap: 2rem;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  margin: 7rem 1rem 0;
}
.hero__frame {
  position: relative;
  min-height: 32rem;
  width: 100%;
}
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--background);
}
.hero-ken-burns {
  position: absolute;
  inset: 0;
  animation: hero-ken-burns 20s linear infinite alternate;
  will-change: transform;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
}
.hero__scrim--vertical {
  background: linear-gradient(to top, var(--background), rgba(10, 10, 10, 0.6) 40%, rgba(10, 10, 10, 0.2));
}
.hero__scrim--horizontal {
  background: linear-gradient(to right, rgba(10, 10, 10, 0.8), transparent 45%);
}
.hero__content {
  position: relative;
  z-index: 10;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 1.5rem;
}
.hero__title {
  max-width: 48rem;
  margin-top: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero__lede {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.hero__cta {
  margin-top: 2rem;
}

@keyframes hero-ken-burns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@media (min-width: 640px) {
  .hero__frame {
    min-height: 36rem;
  }
  .hero__content {
    padding: 3rem 2rem;
  }
  .hero__title {
    font-size: 3rem;
  }
  .hero__lede {
    font-size: 1.125rem;
  }
}
@media (min-width: 768px) {
  .hero {
    margin: 6rem 2rem 0;
  }
  .hero__frame {
    min-height: 28rem;
  }
  .hero__content {
    padding: 3.5rem 3rem;
  }
  .hero__title {
    font-size: 3.75rem;
  }
}
@media (min-width: 1024px) {
  .hero__frame {
    min-height: 32rem;
  }
  .hero__content {
    padding: 4rem;
  }
  .hero__title {
    font-size: 4.5rem;
  }
}

/* ============================================================
   On the Trail
   ============================================================ */
.trail {
  margin: 0 1rem;
  padding: 4rem 0;
}
.trail__intro {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
}
.trail__lede {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.trail__sub {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.trail__copy .section-title {
  margin-top: 1rem;
}
.trail__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
}
.trail__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trail__grid {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.trail__feature {
  overflow: hidden;
}
.trail__feature-media {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--surface);
}
.trail__feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.trail__feature-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 28rem;
  padding: 1.5rem;
}
.trail__feature-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.trail__stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}
.stat__value {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.stat__label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.stat__divider {
  height: 1px;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .trail {
    margin: 0 2rem;
    padding: 6rem 0;
  }
  .trail__grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .trail__feature {
    grid-column: span 3;
  }
  .trail__stats {
    grid-column: span 2;
    padding: 2rem;
  }
  .trail__feature-copy {
    padding: 2rem;
  }
}
@media (min-width: 1024px) {
  .trail__intro {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .trail__lede {
    font-size: 1.125rem;
  }
}

/* ============================================================
   Shop
   ============================================================ */
.shop {
  margin: 0 1rem;
  padding: 5rem 0;
}
.shop__card-wrap {
  max-width: 56rem;
  margin: 0 auto;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.shop__card-wrap:hover {
  transform: translateY(-8px) scale(1.02);
}
.shop__card {
  display: block;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.shop__media {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
}
.shop__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.shop__card:hover .shop__media img {
  transform: scale(1.02);
}
.shop__overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.5rem;
}
.shop__name {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.shop__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-teal);
  transition: color 0.2s ease;
}
.shop__card:hover .shop__link {
  color: #fff;
}

@media (min-width: 768px) {
  .shop {
    margin: 0 2rem;
    padding: 7rem 0;
  }
  .shop__media {
    aspect-ratio: 2 / 1;
  }
  .shop__overlay {
    padding: 2rem;
  }
}

/* ============================================================
   How It Works
   ============================================================ */
.how {
  margin: 0 1rem;
  padding: 5rem 0;
}
.how__grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.how__step {
  text-align: center;
}
.how__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--surface);
}
.how__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.how__body {
  position: relative;
  z-index: 10;
  padding: 0 2rem 2rem;
}
.how__icon {
  position: relative;
  z-index: 10;
  margin: -1.75rem auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(34, 211, 238, 0.1)),
    var(--surface-elevated);
  color: var(--accent-teal);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}
.how__step-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-teal);
}
.how__title {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.how__text {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .how {
    margin: 0 2rem;
    padding: 7rem 0;
  }
  .how__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-head {
    margin-bottom: 4rem;
  }
}

/* ============================================================
   Contact
   ============================================================ */
.contact {
  margin: 0 1rem;
  padding: 5rem 0;
}
.contact__card {
  max-width: 42rem;
  margin: 0 auto;
  overflow: hidden;
}
.contact__inner {
  padding: 2rem;
}
.contact__title {
  font-size: 1.875rem;
}
.contact__lede {
  margin-top: 1rem;
  color: var(--text-muted);
}
.contact__form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.field {
  display: flex;
  flex-direction: column;
}
.field__label {
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.req {
  color: var(--accent-teal);
}
.field__input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-elevated);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field__input::placeholder {
  color: var(--text-dim);
}
.field__input:focus {
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.3);
}
.field__input--textarea {
  resize: vertical;
  min-height: 8rem;
}
.field__input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact__error {
  border-radius: 0.75rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #fca5a5;
}

.contact__submit-label,
.contact__submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.spin {
  animation: spin 1s linear infinite;
}
.spin__track {
  opacity: 0.25;
}
.spin__head {
  opacity: 0.75;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success state */
.contact__success {
  margin-top: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.1);
  padding: 2rem 1.5rem;
  text-align: center;
}
.contact__success-icon {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  border-radius: 9999px;
  background: rgba(45, 212, 191, 0.2);
  color: var(--accent-teal);
}
.contact__success-title {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}
.contact__success-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.contact__another {
  margin-top: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--accent-teal);
  transition: color 0.2s ease;
}
.contact__another:hover {
  color: var(--accent-cyan);
}

@media (min-width: 640px) {
  .contact__row {
    grid-template-columns: 1fr 1fr;
  }
  .btn--rect {
    width: auto;
  }
}
@media (min-width: 768px) {
  .contact {
    margin: 0 2rem;
    padding: 7rem 0;
  }
  .contact__inner {
    padding: 3rem;
  }
  .contact__title {
    font-size: 2.25rem;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  overflow-x: clip;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--background-alt);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1rem;
}
.footer__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer__brand-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.footer__name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}
.footer__tagline {
  max-width: 20rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}
.footer__link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.footer__link:hover {
  color: #fff;
}
.footer__bottom {
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  text-align: center;
}
.footer__copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .footer__inner {
    padding: 4rem 2rem;
  }
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer__brand {
    align-items: flex-start;
  }
  .footer__tagline {
    text-align: left;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-ken-burns {
    animation: none;
  }
  .reveal {
    transform: none;
    transition: none;
  }
  .shop__card-wrap:hover {
    transform: none;
  }
}
