/* Fansidan — trogen kopia av smillasundell.com. Alla url()/href/src i denna
   katalog är RELATIVA (ingen ledande "/"), så samma filer fungerar orört
   både under /fansidan/ och på en egen domän. Se web/fansidan/README för
   varför (src/api/static.ts bär motsvarande lärdom om /manual). */

@font-face {
  font-family: "Michroma";
  src: url("fonts/michroma-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #2f2b32;
  --black: #000000;
  --text: #ffffff;
  --accent: #1f2a86;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Michroma", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

a {
  color: inherit;
}

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

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

.section {
  padding: 4rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* ---------- header / menu ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.social-icons {
  display: flex;
  gap: 0.6rem;
}

.social-icons img {
  width: 25px;
  height: 25px;
}

.menu-button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  place-items: center;
  padding: 12px;
  cursor: pointer;
}

.menu-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--accent);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.menu-panel.is-open {
  transform: translateX(0);
}

.menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 2rem;
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-panel nav a {
  font-family: "Michroma", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  font-size: 1.1rem;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- hero ---------- */

/* R6: mobile first, and on a phone the hero's job is to show the fighter.
   The hero photo is LANDSCAPE (960x632, 2400x1581). A full-height hero on a
   390x844 phone is a 0.46 aspect box, so object-fit: cover scales the image
   by its HEIGHT and keeps a 292px-wide column of a 960px-wide picture —
   measured: only a sliver of one glove, Smilla entirely outside the frame.
   Two rules together fix it, and both are needed:
     - min-height 82vh keeps the crop window wider (356px of 960 at 390x844),
       because the less the box is stretched vertically the less is cut away
       horizontally;
     - object-position 92% puts that window over the subject, who stands in
       the right-hand third of the frame rather than the middle.
   Measured at 360x656, 390x692, 430x764 and 699x573: the whole figure is in
   frame at every one. Desktop is untouched below — there the box is wider
   than it is tall, the width drives the scale, and the original full-height
   composition is the right one. */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero .section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 92% center;
  z-index: 0;
}

@media (min-width: 700px) {
  .hero {
    min-height: 100vh;
  }

  .hero .section-bg {
    object-position: center 20%;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(47, 43, 50, 0.85));
  z-index: 1;
}

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

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 5rem);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin: 0 0 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 2px solid var(--text);
  border-radius: 999px;
  text-decoration: none;
  font-family: "Michroma", sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, color 0.2s ease;
}

.button:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-label {
  font-family: "Michroma", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-value small {
  display: block;
  font-weight: 400;
  opacity: 0.85;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 700px) {
  .about-grid {
    grid-template-columns: 320px 1fr;
  }
}

.about-grid img {
  border-radius: 4px;
}

.about-text p {
  margin: 0 0 1.1em;
}

/* ---------- feed ---------- */

.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 700px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feed-card p {
  margin: 0.75rem 0 0.25rem;
}

.feed-card time {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}

.feed-empty {
  text-align: center;
  opacity: 0.7;
}

/* ---------- partners ---------- */

.partners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: center;
}

.partners-grid img {
  margin: 0 auto 1rem;
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.contact .section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(31, 42, 134, 0.55), rgba(47, 43, 50, 0.85));
  z-index: 1;
}

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

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

.site-footer a {
  text-decoration: underline;
}

/* ---------- media page ---------- */

.media-header {
  padding: 6rem 1.25rem 1rem;
  text-align: center;
}

.gallery {
  columns: 1;
  column-gap: 0.75rem;
  padding: 0 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .gallery {
    columns: 2;
  }
}

.gallery figure {
  margin: 0 0 0.75rem;
  break-inside: avoid;
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  border-radius: 2px;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 85vh;
  width: auto;
  margin: 0 auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.lightbox-close {
  top: 1rem;
  right: 1.25rem;
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  padding: 0.5rem 1rem;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}
