/* === Tokens === */
:root {
  --bg: #e6e6e7;
  --text: #171717;
  --muted: #5c5c5c;
  --dark: #404040;
  --red: #c8102e;
  --red-hover: #a00c25;
  --link: #a70d26;
  --body-font: "Verdana", "Open Sans", "Arial", "Helvetica", sans-serif;
  --display-font: "Space Grotesk", "Verdana", "Arial", sans-serif;
}

/* === Basis === */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
}

h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

/* === Hero === */
.hero {
  position: relative;
  color: #fff;
  background: #2b2b2d url("assets/MitFSV_baggrund.jpg") center / cover no-repeat;
}

.hero-logo {
  position: absolute;
  top: 45px;
  left: 60px;
}

.hero-logo img { width: 220px; }

.hero-content {
  width: 100%;
  max-width: 490px;
}

.hero h1 {
  font-size: clamp(3rem, 4.4vw, 5.25rem);
  font-weight: bold;
  line-height: 1.1;
}

.hero-sub {
  font-size: clamp(1.125rem, 1.5vw, 1.75rem);
  line-height: 1.4;
  margin-top: 0.5rem;
}

.btn-login {
  display: block;
  margin-top: 3rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: clamp(1.25rem, 1.6vw, 1.875rem);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s;
}

.btn-login:hover,
.btn-login:focus-visible { background: var(--red-hover); color: #fff; }

.hero-stores p {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 1.375rem;
  text-align: center;
  margin: 2rem 0 1.25rem;
}

/* Kun på mobil – på større skærme ligger linket i nyhedssektionen */
.hero-link {
  display: none;
  margin-top: 2.25rem;
  color: #fff;
  font-weight: bold;
  font-size: 1.125rem;
  text-underline-offset: 0.2em;
}

.hero-link img {
  display: inline-block;
  width: 1.3em;
  margin-left: 0.4rem;
  vertical-align: -0.25em;
}

/* === App-knapper === */
.store-buttons {
  display: flex;
  gap: 1.5rem;
}

.store-buttons a { flex: 0 1 225px; }
.store-buttons img { width: 100%; }

/* === Nyhed === */
.eyebrow {
  font-weight: bold;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.news h2 {
  font-family: var(--display-font);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.4vw, 4rem);
  line-height: 1.2;
  margin-top: 1.5rem;
  max-width: 15em;
}

.news-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--display-font);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.6vw, 1.875rem);
  color: var(--link);
  text-underline-offset: 0.15em;
}

.news-link img {
  display: inline-block;
  width: 1.1em;
  margin-left: 0.4rem;
  vertical-align: -0.15em;
}

.stores-label {
  margin: 5rem 0 1.25rem;
  font-size: clamp(1.25rem, 1.4vw, 1.625rem);
  color: var(--muted);
}

.label-wide {
  font-family: var(--display-font);
  font-weight: 500;
}

.label-touch { font-style: italic; }

.news-qr {
  display: flex;
  align-items: flex-start;
  gap: 2.25rem;
}

.news-qr img { width: 210px; }

.news-qr p {
  max-width: 300px;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(1.125rem, 1.8vw, 2.125rem);
  line-height: 1.55;
}

.news-phone img { width: 380px; }

/* === Footer === */
footer {
  padding: 5rem 1rem 1.5rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--dark);
}

.footer-org {
  font-weight: bold;
  margin-bottom: 2rem;
}

footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* === Desktop (≥ 1200px): todelt layout === */
@media (min-width: 1200px) {
  /* Alle desktop-mål er i rem, så layoutet skalerer med viewporten:
     ca. 12px ved 1920×1080, ca. 9.5px på en lille laptop, max 16px.
     Den faste del (0.375rem) gør at brugerens Ctrl+zoom stadig virker
     og at browserens skriftstørrelse respekteres. Lodrette afstande
     følger også højden (vh), så indholdet passer på lave skærme. */
  html { font-size: clamp(0.5625rem, calc(0.375rem + min(0.3vw, 0.55vh)), 1rem); }

  .page {
    display: grid;
    grid-template-columns: 40% 1fr;
  }

  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: min(10rem, 14vh) 2rem 4rem;
  }

  .hero-logo { top: 2.8rem; left: 3.75rem; }
  .hero-logo img { width: 13.75rem; }
  .hero-content { max-width: 30.5rem; margin-top: min(12rem, 16vh); }
  .btn-login { margin-top: min(3rem, 5vh); }
  .hero h1 { font-size: 5.25rem; }
  .hero-sub { font-size: 1.75rem; }
  .btn-login { font-size: 1.875rem; }
  .sub-mobile, .hero-stores, .label-touch { display: none; }

  .news {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "text  phone"
      "qr    phone";
    align-items: center;
    min-height: 100vh;
    padding: min(9.4rem, 13vh) 4.5rem 0 3.5rem;
  }

  .news h2 { font-size: 4rem; }
  .news-link { font-size: 1.875rem; }
  .stores-label { font-size: 1.625rem; margin-top: min(5rem, 7vh); }
  .store-buttons a { flex-basis: 14rem; }

  .news-text { grid-area: text; }
  .news-qr { grid-area: qr; margin-top: min(6rem, 6vh); }
  .news-qr img { width: 13rem; }
  .news-qr { align-items: center; }
  .news-qr p { max-width: 22rem; font-size: 2.125rem; }
  /* Teksten må gerne gå ind over telefonens kolonne – telefonen står nederst */
  .news-text { position: relative; z-index: 1; }
  .news-phone { grid-area: phone; justify-self: end; align-self: end; margin-bottom: 5vh; }
  /* Telefonen styres af højden (ca. halvdelen af skærmen som i mockuppen),
     så den aldrig skæres af nederst */
  .news-phone img {
    width: auto;
    height: min(64rem, 60vh);
    max-width: none; /* bevar proportionerne – kolonnen giver plads i stedet */
    filter: drop-shadow(20px 30px 30px rgba(0, 0, 0, 0.25));
  }
}

/* === Tablet og mobil: hero øverst, centreret === */
@media (max-width: 1199px) {
  .hero {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 260px 1.5rem 3.5rem;
  }

  .hero {
    background-position: center 35%;
  }

  .hero-content { max-width: 480px; }
  .hero h1 { font-size: clamp(3rem, 8vw, 4.25rem); }
  .hero-sub { font-size: clamp(1.25rem, 2.6vw, 1.625rem); }
  .btn-login { font-size: 1.5rem; }
  .news h2 { font-size: clamp(1.75rem, 4.4vw, 2.75rem); }
  .news-link { font-size: clamp(1.125rem, 2.2vw, 1.375rem); }
  .news-qr, .label-wide, .link-her { display: none; }
  .store-buttons { justify-content: flex-start; }
  .hero-stores .store-buttons { justify-content: center; }

  .news {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    padding: 4rem 4rem 0;
  }

  .news-phone img {
    width: 330px;
    filter: drop-shadow(20px 30px 30px rgba(0, 0, 0, 0.25));
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .sub-mobile { display: none; }
}

/* === Mobil (< 768px): kun hero med logo, login og app-knapper === */
@media (max-width: 767px) {
  .hero {
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 6rem;
    background-image: url("assets/MitFSV_baggrund_mobil.jpg");
    background-position: center top;
  }

  .hero-logo { position: static; margin-bottom: 4.5rem; }
  .hero-logo img { width: min(300px, 62vw); }

  /* Logoet bærer navnet – overskriften beholdes til skærmlæsere */
  .hero h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .hero-sub, .news { display: none; }
  .btn-login { margin-top: 0; }
  .hero-link { display: inline-block; }

  .store-buttons { gap: 1.5rem; }
  .store-buttons a { flex: 1 1 0; }

  footer { padding-top: 2.5rem; font-size: 1.05rem; }
}
