/* Regnum Animale – top navigation and split hero (curved photo). Uses the colour variables of the main stylesheet. */
:root { --ra-header-h: 72px; }
html { scroll-padding-top: calc(var(--ra-header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

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

/* ---------------------------------------------------------------- header */
.ra-header {
  position: sticky; top: 0; z-index: 1000; height: var(--ra-header-h);
  background: hsl(var(--card)); box-shadow: 0 2px 18px -8px rgb(0 0 0 / 0.25);
}
.ra-header-inner {
  height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.ra-logo {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.75rem; line-height: 1;
  color: hsl(var(--foreground)); text-decoration: none; white-space: nowrap;
}
.ra-logo-img { display: block; width: 44px; height: 44px; flex: none; object-fit: contain; }
.ra-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.2vw, 1.75rem); }
.ra-nav-link {
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: hsl(var(--primary)); text-decoration: none; padding: 0.4rem 0; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.ra-nav-link:hover { border-bottom-color: hsl(var(--accent)); }
.ra-nav-btn {
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); text-decoration: none; white-space: nowrap;
  padding: 0.7rem 1.25rem; border-radius: 0.25rem; transition: filter 0.15s;
}
.ra-nav-btn:hover { filter: brightness(1.25); }
.ra-nav-ig { display: inline-flex; padding: 0.4rem; color: hsl(var(--foreground)); border-radius: 0.25rem; }
.ra-nav-ig svg { width: 22px; height: 22px; }
.ra-nav-ig:hover { color: hsl(var(--primary)); }
.ra-logo:focus-visible, .ra-nav a:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }

/* ------------------------------------------------------------------ hero */
.ra-hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch;
  min-height: clamp(560px, calc(100svh - var(--ra-header-h)), 900px);
  background: hsl(var(--background)); overflow: hidden;
}
.ra-hero-text {
  align-self: center; padding: 3rem 2rem 3rem max(2rem, calc((100vw - 1200px) / 2));
}
.ra-h1 { margin: 0 0 1.5rem; font-weight: 600; }
.ra-eyebrow {
  display: block; margin-bottom: 1.25rem; font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: clamp(1.35rem, 2.3vw, 2.1rem); line-height: 1.15; color: hsl(var(--primary)); text-wrap: balance;
}
.ra-eyebrow::after { content: ''; display: block; width: 3.5rem; height: 3px; margin-top: 1rem; background: hsl(var(--accent)); }
.ra-title {
  display: block; font-family: 'Cormorant Garamond', serif; font-weight: 600; letter-spacing: 0.02em; line-height: 0.95;
  font-size: clamp(2.8rem, 5.2vw, 5.4rem); color: hsl(var(--foreground)); text-wrap: balance;
}
.ra-lead-wrap { max-width: 34rem; margin: 0 0 2rem; }
.ra-lead-head { margin: 0 0 0.9rem; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.25; color: hsl(var(--foreground)); text-wrap: balance; }
.ra-lead { max-width: 34rem; margin: 0 0 0.9rem; font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.6; color: hsl(var(--muted-foreground)); }
.ra-lead-close { margin: 0; font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.5; font-weight: 600; color: hsl(var(--primary)); }

.ra-hero-media { position: relative; min-height: 0; overflow: hidden; border-top-left-radius: 24% 50%; border-bottom-left-radius: 24% 50%; }
.ra-hero-media picture { display: block; height: 100%; }
.ra-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

@media (max-width: 899px) {
  .ra-hero { grid-template-columns: 1fr; min-height: 0; }
  .ra-hero-text { padding: 2.5rem 1.5rem 2rem; }
  .ra-hero-media { width: 100%; height: min(125vw, 85svh); border-radius: 0; border-top-left-radius: 50% 12%; border-top-right-radius: 50% 12%; }
  .ra-hero-media img { object-position: 60% 50%; }
}
@media (max-width: 560px) {
  :root { --ra-header-h: 64px; }
  .ra-header-inner { padding: 0 0.75rem; gap: 0.5rem; }
  .ra-logo { font-size: 1.3rem; gap: 0.45rem; }
  .ra-logo-img { width: 34px; height: 34px; }
  .ra-nav { gap: 0.5rem; }
  .ra-nav-link, .ra-nav-btn { font-size: 0.85rem; letter-spacing: 0.03em; }
  .ra-nav-btn { padding: 0.5rem 0.7rem; }
  .ra-nav-ig { padding: 0.2rem; }
  .ra-nav-ig svg { width: 20px; height: 20px; }
}
@media (max-width: 440px) {
  .ra-logo { font-size: 1.05rem; }
  .ra-nav-link, .ra-nav-btn { font-size: 0.75rem; letter-spacing: 0.02em; }
  .ra-nav-btn { padding: 0.45rem 0.55rem; }
}
/* narrow phones: only the logo symbol stays (the hero shows the name) so the links never collide with it */
@media (max-width: 420px) { .ra-logo-text { display: none; } .ra-logo-img { width: 38px; height: 38px; } }

/* ------------------------------------------------------- "Stöd oss" block (hidden) */
/* The block is hidden on the start page. The original is kept in backup/stod-oss-block.html.
   The hero's "Stöd oss" button still points to #stod and opens the dialog in support.js. */
#stod { display: none !important; }


/* Phone: the menu has 7 items and does not fit 390px. It scrolls sideways inside the header instead of pushing the page wider. */
@media (max-width: 700px) {
  .ra-header-inner { min-width: 0; }
  .ra-logo { flex: none; }
  .ra-nav { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .ra-nav::-webkit-scrollbar { display: none; }
  .ra-nav > a { flex: none; }
}

/* ------------------------------------------------ start page: djurriket + Swish */
/* The "djurriket" section sits right under the hero image. Its top padding is set here because the py-16 utility is not in the compiled CSS. */
.ra-djurriket { padding-top: clamp(2.5rem, 5vw, 4rem); }
/* Swish image (same link and picture as "Engagera dig") between the "djurriket" section and "Uppmärksammat arbete". */
.ra-swish-block { max-width: 20rem; margin: 3rem auto 0; }
.ra-swish-block a { display: block; border-radius: 1rem; overflow: hidden; box-shadow: 0 25px 60px -25px rgb(0 0 0 / 0.45); }
.ra-swish-block a:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 4px; }
.ra-swish-block img { display: block; width: 100%; height: auto; }

