/* =========================================================================
   sections.css — per-section composition
   ========================================================================= */

/* -------------------------------------------------- Hero (split layout, no gradients) */
.hero {
  position: relative; isolation: isolate;
  background: var(--c-purple); color: var(--text-on-dark);
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 64em) {
  .hero { grid-template-columns: 1.08fr 0.92fr; min-height: clamp(600px, 86vh, 880px); }
}

/* text block — solid purple, sigill sits at the top */
.hero__text {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: var(--space-3);
  width: min(100%, 660px); margin-inline: auto;
  padding: calc(var(--header-h) + var(--space-5)) var(--gutter) var(--space-8);
}
@media (min-width: 64em) {
  .hero__text { width: auto; margin: 0; padding: var(--space-8) clamp(2rem, 5vw, 5rem); }
}
.hero__sigill { width: clamp(92px, 9vw, 128px); height: auto; margin-bottom: var(--space-1); filter: brightness(0) invert(1) sepia(1) brightness(1.05); }
.apply__sigill { filter: brightness(0) invert(1); }
.hero .eyebrow { color: var(--c-salmon); }
.hero__title { font-size: clamp(2.4rem, 1.5rem + 3.2vw, 4.1rem); line-height: .98; }
.hero__title em { font-style: normal; color: var(--accent-energetic); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.hero .btn--ghost { border-color: var(--line-on-dark); color: var(--c-cream); }
.hero .btn--ghost:hover { background: var(--c-cream); color: var(--c-near-black); border-color: var(--c-cream); }

/* kollage image — fills right panel on desktop, hidden on mobile */
.hero__media { background: var(--c-near-black); overflow: hidden; }
@media (max-width: 63.99em) { .hero__media { display: none; } }
.hero__kollage {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.hero__media .mosaic { display: none; }
.hero__tint { display: none; }

/* -------------------------------------------------- About / Om fonden */
.about__grid { align-items: start; gap: clamp(2rem, 5vw, 4rem); }
.about__body p + p { margin-top: var(--space-3); }
.about__aside {
  background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section--soft .about__aside, .section--alt .about__aside { background: var(--c-cream); }
.about__aside .stats { grid-template-columns: 1fr; gap: var(--space-4); text-align: left; }
.about__aside .stat__num { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.05rem); }
.about__aside .stat { padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.about__aside .stat:last-child { padding-bottom: 0; border-bottom: 0; }

/* -------------------------------------------------- Stipendiater */
.stip__intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-5); }
.stip__hint { font-family: var(--font-caption); text-transform: uppercase; letter-spacing: .1em;
  font-size: var(--step--1); color: var(--text-muted); }
/* Mosaic gaps and image placeholders match whichever dark section the
   grid is currently placed on — not hardcoded, since that section's
   background colour has changed more than once during design review. */
.section--purple #stipMosaic, .section--purple #stipMosaic .tile { background: var(--c-purple); }
.section--taupe  #stipMosaic, .section--taupe  #stipMosaic .tile { background: var(--c-taupe); }
.mosaic-fallback {
  display: none; padding: var(--space-4); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg); color: var(--text-muted); font-family: var(--font-serif);
}

/* -------------------------------------------------- Application / Ansökan */
.application__card {
  background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem); box-shadow: var(--shadow-soft);
  display: grid; gap: var(--space-3); max-width: 760px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: .5rem; align-self: start;
  font-family: var(--font-caption); text-transform: uppercase; letter-spacing: .1em;
  font-size: var(--step--1); padding: .45rem .9rem; border-radius: var(--radius-pill);
}
/* display: inline-flex above wins over the browser's default [hidden] rule
   in the cascade — without this, a hidden pill would still render. */
.status-pill[hidden] { display: none; }
.status-pill::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.status-pill--closed { background: rgba(130,100,95,.16); color: var(--c-taupe); }
.status-pill--open   { background: rgba(150,55,55,.14);  color: var(--accent); }

/* Pillen direkt under en sektionsrubrik (just nu bara "Så ansöker du")
   får lite extra luft under sig. */
#steg .status-pill { margin-bottom: var(--space-2); }

/* Ljusa varianter ovan är byggda för en creme-bakgrund (application-kortet).
   På en mörk sektion (lila/taupe) behöver pillen egna, mörk-anpassade
   färger — oavsett VILKEN sektion som råkar vara mörk just nu. */
.section--purple .status-pill--closed, .section--taupe .status-pill--closed {
  background: rgba(255,255,255,.14); color: var(--c-salmon);
}
.section--purple .status-pill--open, .section--taupe .status-pill--open {
  background: rgba(225,100,65,.28); color: var(--c-cream);
}
.application__period {
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-2);
  letter-spacing: -0.01em; text-transform: uppercase; color: var(--text);
}
.application__note { color: var(--text-muted); }
.apply__sigill { width: clamp(92px, 12vw, 128px); height: auto; margin: 0 auto var(--space-3); }

/* open/closed toggle — flip the section class to switch (see README) */
.application__open { display: none; }
.application.is-open .application__closed { display: none; }
.application.is-open .application__open { display: block; }
.form-embed { width: 100%; border: 0; border-radius: var(--radius); min-height: 1200px; background: var(--c-sand); }

/* -------------------------------------------------- Om Axel Johnson / boilerplate */
.boiler { padding-block: var(--space-6); }
.boiler__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.boiler__text {
  font-size: var(--step-0); color: rgba(255,245,230,.7); line-height: 1.6;
}
.boiler__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
  justify-items: center; text-align: center;
}
.boiler__num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 0.5rem + 1.6vw, 2rem);
  line-height: 1; letter-spacing: -.01em; text-transform: uppercase;
  white-space: nowrap; color: var(--c-orange-red);
}
.boiler__logo { height: 160px; width: auto; display: block; margin-left: -43px; margin-bottom: var(--space-4); }
.boiler__label {
  font-family: var(--font-caption); text-transform: uppercase;
  letter-spacing: .08em; font-size: var(--step--1);
  color: rgba(255,245,230,.5); margin-top: .5rem; line-height: 1.3;
}
.boiler__foot {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-4);
}
.boiler__link {
  font-family: var(--font-caption); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--c-orange-red); text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.boiler__link:hover { color: var(--c-cream); }
.boiler__copy {
  font-family: var(--font-caption); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: .1em; opacity: .4;
}
@media (max-width: 47.99em) {
  .boiler__body { grid-template-columns: 1fr; gap: var(--space-5); }
  .boiler__stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-4) var(--space-2); }
  .boiler__logo { height: 100px; margin-left: auto; margin-right: auto; margin-bottom: var(--space-3); }
  .boiler__num { font-size: clamp(1.3rem, 5vw, 1.8rem); }
  .boiler__label { font-size: .65rem; }
}
