/* svanungen – hjemme hos hege
   Ett stilark, ingen byggetrinn. Endre farger og fonter i :root. */

@font-face {
  font-family: "Advent Pro";
  src: url("/fonts/advent-pro-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --ink: #6b6b6b;          /* brødtekst (4,9:1 mot hvit) */
  --ink-strong: #474747;
  --accent: #c98f84;       /* dempet rosa, brukes på understreking og hover */
  --bg: #ffffff;

  --font-display: "Advent Pro", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Yantramanav", "Helvetica Neue", Arial, sans-serif;

  --step-0: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);   /* brødtekst */
  --step-title: clamp(2.25rem, 1.4rem + 4vw, 3.75rem); /* sidetittel */
  --measure: 40rem;
  --hero-reserve: 36rem; /* topp, meny, hero-tekst og knapp: det som tar plass over tegningen */

  /* meny: skriftstørrelse og avstand følger skjermbredden, så den holder seg på én linje */
  --nav-size: clamp(0.85rem, 0.6rem + 1.2vw, 1rem);
  --nav-gap: clamp(0.25rem, 4vw, 1.5rem);
  --nav-pad: clamp(0.3rem, 1.6vw, 0.6rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
}

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

a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--ink-strong);
  font-family: var(--font-ui);
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- topp ---------- */

.site-header {
  position: relative;
  width: 100%;
  max-width: 75rem;
  margin-inline: auto;
  isolation: isolate;
  min-height: clamp(5.5rem, min(14vw, 17vh), 9rem);
  display: grid;
  place-items: center;
  padding: 0.9rem 1rem;
  overflow: hidden;
}

.site-header__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-title {
  margin: 0;
  padding: 0.12em 0.5em 0.2em;
  background: rgba(255, 255, 255, 0.78);
  font-size: var(--step-title);
  font-weight: 200;
  line-height: 1;
  text-transform: lowercase;
  color: var(--ink);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  padding: 1rem 1rem 0.5rem;
  background: var(--bg);
}

/* to menypunkter (forsiden og parykk): plass til større skrift */
.site-nav--duo {
  --nav-size: clamp(1.05rem, 0.85rem + 1.1vw, 1.25rem);
  --nav-gap: clamp(1.25rem, 8vw, 2.5rem);
  --nav-pad: clamp(0.4rem, 2vw, 0.75rem);
}

.site-nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0 var(--nav-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.65rem var(--nav-pad);
  font-family: var(--font-ui);
  font-size: var(--nav-size);
  white-space: nowrap;
  font-weight: 400;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
}

.site-nav a:hover,
.site-nav a.is-book {
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.site-nav a.is-book:hover {
  text-decoration-color: var(--ink-strong);
}

/* ---------- innhold ---------- */

main {
  flex: 1 0 auto;
  width: 100%;
  padding: clamp(1.5rem, 6vh, 3.5rem) clamp(1.5rem, 7vw, 2.5rem) 4rem;
}

.prose {
  max-width: var(--measure);
  margin-inline: auto;
}

.prose > * {
  margin-block: 0;
}

.prose > * + * {
  margin-top: 1.6em;
}

.prose h1,
.prose h2 {
  font-size: inherit;
  font-weight: 500;
}

.prose h2 {
  margin-top: 2em;
}

.prose h1 + *,
.prose h2 + * {
  margin-top: 0.6em;
}

.prose--airy > * + * {
  margin-top: 1.8em;
}

/* ---------- hero (forsiden) ---------- */

.hero {
  padding-bottom: 0;
}

.hero .prose {
  max-width: 56rem;
}

.lede {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink-strong);
}

/* første skjermbilde: hero-tekst, knapp og hele tegningen. Tegningen skaleres ned etter
   skjermhøyden (aldri beskåret), og avstandene krymper med høyden. */
.hero .prose > * + * {
  margin-top: clamp(1.75rem, 7.5vh, 5rem);
}

.hero .figure--wide {
  height: auto;
  max-height: max(11rem, calc(100svh - var(--hero-reserve)));
  object-fit: contain;
  margin-block: clamp(1.75rem, 7.5vh, 5rem);
}

/* penselstrek i dempede papirfarger (SVG i index.html) */
.fade {
  width: min(100%, 38rem);
  margin: clamp(3rem, 9vw, 5.5rem) auto;
  opacity: 0.95;
}

.fade svg {
  display: block;
  width: 100%;
  height: clamp(1.4rem, 3.6vw, 2rem);
}

.prose--section {
  margin-top: clamp(3.5rem, 9vw, 6rem);
}

.prose--contact {
  margin-top: clamp(3.5rem, 9vw, 6rem);
}

/* Tekstbryting: jevne linjer, og brudd bare mellom fraser (.nb) */
.prose {
  text-wrap: pretty;
}

.prose:not(.prose--left) {
  text-wrap: balance;
}

.nb {
  display: inline-block;
  max-width: 100%;
}

.prose--left {
  text-align: left;
}

.figure {
  margin-inline: auto;
}

.figure--wide {
  width: min(100%, 50rem);
  margin-block: 4rem;
}

.figure--small {
  width: min(55%, 15rem);
  margin-top: 4.5rem;
}

.note {
  font-size: 1rem;
}

address {
  font-style: normal;
}

address .adr {
  display: block;
  margin-bottom: 1.1em;
}

.button {
  display: inline-block;
  padding: 0.72rem 2.2rem 0.58rem;
  border: 1px solid var(--ink-strong);
  border-radius: 999px;
  background-color: var(--ink-strong);
  background-image: linear-gradient(to bottom, #565656, #474747 55%, #404040);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 4px rgba(0, 0, 0, 0.16);
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--bg);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.button:hover {
  background-color: var(--bg);
  background-image: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  color: var(--ink-strong);
}

.button:active {
  box-shadow: none;
  transform: translateY(1px);
}

/* ---------- bunn ---------- */

.site-footer {
  flex-shrink: 0;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 300;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
  color: inherit;
}

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

.site-footer__links {
  margin-top: 0.25rem !important;
}

/* store skjermer: skaler alt (rem) opp, så siden ikke blir liten i et hav av hvitt */
@media (min-width: 1800px) {
  html {
    font-size: 112.5%;
  }
}

@media (min-width: 2400px) {
  html {
    font-size: 137.5%;
  }
}

/* liggende mobil: lavere topp, og tegningen får full størrelse (den kommer under første skjermbilde) */
@media (orientation: landscape) and (max-height: 500px) {
  .site-header {
    min-height: 4.5rem;
  }

  .hero .figure--wide {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  .site-header__bg,
  .site-nav {
    display: none;
  }
}

main > picture + .prose,
main > .prose + picture {
  display: block;
  margin-top: 2rem;
}
