/* ==========================================================================
   Pronghorn Bicycles Logan — shared site styles
   Loaded by every page except 404.html.

   Paths in this file resolve relative to /assets/, not to the page.
   ========================================================================== */

:root {
  --bg:        #0d0d0f;
  --bg-soft:   #16161b;
  --red:       #e8242a;
  --red-hot:   #ff463c;
  --ink:       #f5f2ec;
  --muted:     #9a9aa4;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  /* Ridgeline MTB team colors, sampled from ridgelinemtb.org — used on
     co-branded pages so the partnership reads as a partnership. */
  --rl-navy:      #0e377a;
  --rl-navy-deep: #032549;
  --rl-green:     #449a41;
  --rl-green-hot: #5fc25a;

  --ig:  #e1306c;
  --fb:  #1877f2;
  --yt:  #ff0000;

  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* ---- Atmosphere --------------------------------------------------------- */

/* Heavily darkened mountain-biking photo + a warm glow over a deep base.
   Layers stack top→bottom: glow, dark wash, then the cover-cropped photo.
   Pages retint the glow by overriding --glow-top / --glow-bottom. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--glow-top, rgba(232, 36, 42, 0.30)), transparent 55%),
    radial-gradient(90% 60% at 50% 120%, var(--glow-bottom, rgba(232, 36, 42, 0.12)), transparent 60%),
    linear-gradient(180deg, rgba(11,11,14,0.80) 0%, rgba(9,9,12,0.88) 45%, rgba(6,6,8,0.96) 100%),
    url("bg.jpg") center / cover no-repeat;
  background-color: #08080a;
}

/* Fine film grain for premium texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layout ------------------------------------------------------------- */

.stage {
  position: relative;
  z-index: 1;
  max-width: var(--stage-max, 460px);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 3.25rem) 1.5rem
           calc(env(safe-area-inset-bottom) + 2rem);
  display: flex;
  flex-direction: column;
}

/* Narrow, centered "link in bio" treatment (the home page). */
.stage--centered {
  align-items: center;
  text-align: center;
}

/* ---- Badge -------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.5rem 1rem 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--red-hot));
  box-shadow: 0 0 0 0 rgba(255, 70, 60, 0.6);
  animation: ping 2.4s var(--ease) infinite;
}

/* ---- Mark --------------------------------------------------------------- */

.mark {
  position: relative;
  margin: 2.5rem 0 1.75rem;
  display: grid;
  place-items: center;
}
.mark img {
  width: 116px;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 26px rgba(232, 36, 42, 0.45));
  animation: float 6s ease-in-out infinite;
}
/* concentric "speed" rings echoing the pronghorn's pace */
.mark .ring {
  position: absolute;
  border: 1px solid rgba(232, 36, 42, 0.22);
  border-radius: 50%;
  z-index: 1;
  animation: pulse 4.5s var(--ease) infinite;
}
.mark .ring.r1 { width: 180px; height: 180px; }
.mark .ring.r2 { width: 250px; height: 250px; animation-delay: 0.9s; opacity: 0.7; }
.mark .ring.r3 { width: 330px; height: 330px; animation-delay: 1.8s; opacity: 0.45; }

/* ---- Wordmark ----------------------------------------------------------- */

.wordmark {
  font-family: "Anton", "Archivo", sans-serif;
  font-weight: 400;
  font-size: clamp(2.9rem, 17vw, 4rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d9d4cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark .accent {
  display: block;
  color: var(--red);
  background: linear-gradient(180deg, var(--accent-hot, var(--red-hot)), var(--accent-base, var(--red)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Location strip ----------------------------------------------------- */

.location {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.location::before,
.location::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red));
}
.location::after { transform: scaleX(-1); }

.tagline {
  margin-top: 1.1rem;
  max-width: 22rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.tagline b { color: var(--ink); font-weight: 600; }

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  --accent: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease),
              border-color 0.3s var(--ease),
              background 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}
.btn--solid {
  border-color: transparent;
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(232, 36, 42, 0.9);
}
.btn--solid:hover,
.btn--solid:focus-visible {
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  border-color: transparent;
  box-shadow: 0 18px 38px -14px rgba(232, 36, 42, 0.95);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

/* ---- Forms -------------------------------------------------------------- */

.form {
  width: 100%;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field {
  width: 100%;
  min-height: 58px;
  padding: 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.3s var(--ease);
}
.field::placeholder { color: var(--muted); }
.field:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
}

.notice {
  width: 100%;
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.6;
}
.notice--error {
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
  background: color-mix(in srgb, var(--red) 12%, transparent);
}

/* Present for screen readers and bots, invisible to sighted users. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Link cards (socials & friends) ------------------------------------- */

.socials {
  width: 100%;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.social {
  --accent: var(--red);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  padding: 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 0.35s var(--ease),
              border-color 0.35s var(--ease),
              background 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
/* accent wash that sweeps in on hover/press */
.social::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.social > * { position: relative; z-index: 1; }

.social .icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  color: var(--ink);
  transition: color 0.35s var(--ease),
              background 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.social .icon svg { width: 22px; height: 22px; display: block; }

.social .meta {
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
}
.social .meta .name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.social .meta .handle {
  font-size: 0.8rem;
  color: var(--muted);
}

.social .arrow {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}
.social .arrow svg { width: 18px; height: 18px; display: block; }

/* hover / active (works for touch tap too) */
.social:hover,
.social:focus-visible,
.social:active {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent),
              0 4px 12px -6px rgba(0, 0, 0, 0.5);
  outline: none;
}
.social:hover::before,
.social:focus-visible::before,
.social:active::before { opacity: 1; }
.social:hover .icon,
.social:focus-visible .icon,
.social:active .icon {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.social:hover .arrow,
.social:focus-visible .arrow,
.social:active .arrow {
  color: var(--ink);
  transform: translateX(4px);
}

.social.ig { --accent: var(--ig); }
.social.fb { --accent: var(--fb); }
.social.yt { --accent: var(--yt); }

/* ---- Footer ------------------------------------------------------------- */

.foot {
  margin-top: auto;
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}
.site-link {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-link:hover { color: var(--red-hot); border-color: var(--red-hot); }
.copyright {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.credit {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: rgba(154, 154, 164, 0.65);
}
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--ink); }

/* ---- Entrance animation ------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.85s var(--ease) forwards;
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.30s; }
.d4 { animation-delay: 0.42s; }
.d5 { animation-delay: 0.54s; }
.d6 { animation-delay: 0.64s; }
.d7 { animation-delay: 0.74s; }
.d8 { animation-delay: 0.84s; }
.d9 { animation-delay: 0.96s; }

/* ---- Keyframes ---------------------------------------------------------- */

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(255, 70, 60, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 70, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 70, 60, 0); }
}
@keyframes pulse {
  0%   { transform: scale(0.82); opacity: 0.0; }
  35%  { opacity: 0.55; }
  100% { transform: scale(1.25); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
