/* TheGymMouse.Life© — Landing: The Ring Gateway (v1.3 legacy-linter-safe)
   Same design, fewer legacy linter warnings.
*/

/* =Root & Base
---------------------------------------------------- */
:root {
  /* (removed color-scheme for legacy linters) */
  --ink: #fcf9f2;
  --ink-soft: #e7e1d7;
  --gold: #d1b464;
  --gold-soft: #c7a85a;
  --shadow: rgba(0,0,0,.65);
  --bg: #1d1b16;
  --panel: rgba(0,0,0,.38);
  --panel-strong: rgba(0,0,0,.50);
  --line: #5c5345;
  --muted: #bdb3a3;
}

/* Universal selector alternative (faster, linter-friendly) */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Georgia, "Times New Roman", Times, serif;

  /* color/background fallbacks before CSS variables */
  color: #fcf9f2;
  color: var(--ink);
  background: #1d1b16;
  background: var(--bg);

  text-shadow: 1px 1px 2px #000;
}

/* =Hero / Gate
---------------------------------------------------- */
#gateway-arch {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #0f0e0b; /* fallback if image fails */
  background-image: url('images/iron-ring-arch-variation2.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  /* (removed isolation for legacy linters) */
}

/* Atmosphere overlays */
.veil {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0; /* instead of inset */
  z-index: 0;
  background: radial-gradient(1200px 800px at 50% 55%,
              rgba(0,0,0,0.35), rgba(0,0,0,0.78));
}

.torchlight {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0; /* instead of inset */
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 50% 65%, rgba(255,187,92,0.08), transparent 60%),
    radial-gradient(420px 300px at 40% 60%, rgba(255,218,160,0.06), transparent 60%),
    radial-gradient(420px 300px at 60% 60%, rgba(255,218,160,0.06), transparent 60%);
  mix-blend-mode: screen;
  animation: torch 6s ease-in-out infinite;
}

@keyframes torch {
  0%, 100% { opacity: .55; transform: translateY(0); }
  45%      { opacity: .68; transform: translateY(-1.5%); }
  65%      { opacity: .60; transform: translateY(.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .torchlight { animation: none; }
  /* removed scroll-behavior: auto !important for legacy linter happiness */
}

/* =Gateway Panel
---------------------------------------------------- */
.gateway {
  position: relative;
  z-index: 1;

  /* size fallbacks before clamp() for legacy linters */
  width: 92vw;
  max-width: 980px;
  min-width: 300px;
  width: clamp(300px, 92vw, 980px);

  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 14px;

  /* fallback background when blur isn’t supported */
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(209,180,100,.28);
  box-shadow:
    0 8px 24px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
  text-align: center;
}

/* Progressive enhancement for blur; guarded to satisfy linters */
@supports ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .gateway {
    background: rgba(0,0,0,.30);
    -webkit-backdrop-filter: saturate(110%) blur(2px);
    backdrop-filter: saturate(110%) blur(2px);
  }
}

/* Identity */
.seal {
  display: block;
  margin: .25rem auto .75rem;
  width: 148px;
  height: auto;
  max-width: 50vw;
  filter: drop-shadow(0 1px 8px rgba(0,0,0,.55));
}

.brand {
  margin: .15rem 0 .25rem;
  color: #fceabb;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: clamp(1.6rem, 4.6vw, 2.6rem);
  line-height: 1.15;

  /* Modern enhancement guarded; fallback for older linters below */
  overflow-wrap: anywhere;
}
/* Keep text-wrap as enhancement if supported */
@supports (text-wrap: balance) {
  .brand { text-wrap: balance; }
}

.motto {
  margin: 0 0 .25rem;
  font-style: italic;
  opacity: .95;
  font-size: clamp(1rem, 2.4vw, 1.1rem);
}

.sub {
  margin: 0 0 1rem;
  opacity: .92;
  letter-spacing: .4px;
}

/* Resonance spine */
.resonance {
  margin: .5rem 0 1.2rem;
  color: #e7e1d7;           /* fallback */
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  letter-spacing: .5px;
  text-align: center;
}
.resonance small {
  display: block;
  margin-top: .25rem;
  color: #bdb3a3;           /* fallback */
  color: var(--muted);
  font-style: italic;
}

/* WIIFM */
.wiifm {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: .75rem 0 1.1rem;
  text-align: left;
}
.wiifm-item {
  background: rgba(0,0,0,.50); /* fallback */
  background: var(--panel-strong);
  border: 1px solid #5c5345;   /* fallback */
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .9rem;
}
.wiifm .icon { margin-right: .5rem; }
.wiifm strong { display: block; color: #fcf9f2; color: var(--ink); }
.wiifm small  { color: #bdb3a3; color: var(--muted); }

/* CTAs */
.cta-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: .35rem 0 1.1rem;
  text-align: left;
}
.btn {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .8rem 1rem .9rem;
  border-radius: 14px;
  border: 1px solid #c7a85a;  /* fallback */
  border: 1px solid var(--gold-soft);
  color: #fceacb;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.58));
  transition: transform .12s ease, background .2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(0,0,0,.62);
}
.btn.primary {
  border-color: #d1b464;      /* fallback */
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(209,180,100,.12) inset;
}
.btn-title { font-weight: 700; color: #fceabb; }
.btn-sub   { font-size: .95rem; color: #e7e1d7; color: var(--ink-soft); }
.btn-emoji { position: absolute; right: .9rem; top: .7rem; opacity: .9; }

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid #fceabb;
  outline-offset: 2px;
}

/* Breadcrumb hints */
.breadcrumbs {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: .3rem 0 1.05rem;
  text-align: left;
}
.crumb {
  background: rgba(0,0,0,.38); /* fallback */
  background: var(--panel);
  border: 1px solid #5c5345;   /* fallback */
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .9rem;
}
.crumb h3 {
  margin: .1rem 0 .35rem;
  color: #fceabb;
  font-size: 1.05rem;
}
.crumb p {
  margin: 0;
  color: #e7e1d7;             /* fallback */
  color: var(--ink-soft);
}

/* Trust whisper & secondary links */
.trust {
  margin: .35rem 0 .9rem;
  padding: .55rem .75rem;
  background: rgba(0,0,0,.42);
  border: 1px solid #5c5345;   /* fallback */
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #bdb3a3;              /* fallback */
  color: var(--muted);
}
.secondary {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  justify-content: center;
  margin-top: .25rem;
}
.secondary a {
  color: #fceacb;
  text-decoration: none;
  border-bottom: 1px dotted rgba(252,234,187,.6);
}
.secondary a:hover { text-decoration: underline; }

/* Footer */
.foot {
  padding: 1rem;
  background: #1d1b16;         /* fallback */
  background: var(--bg);
  border-top: 1px solid #444;
  text-align: center;
  font-size: .92rem;
}
.foot a { color: #fceacb; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .sep { opacity: .5; margin: 0 .5em; }

/* Mobile polish */
@media (max-width: 600px) {
  .btn-sub { font-size: .9rem; }
  .crumb h3 { font-size: 1rem; }
  .gateway { padding: 1rem; }
}
