/* Randaberg Dyrepensjonat – landlig. Elfenben, skoggrønt og varm ravgul. Egenhostede skrifter. */
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/fonts/cormorant-normal.woff2') format('woff2'); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/fonts/cormorant-italic.woff2') format('woff2'); font-weight: 500 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('assets/fonts/dmsans.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --papir: #f6f3eb;
  --flate: #fffdf8;
  --blekk: #000;
  --blekk-dempet: #000;
  --bla: #cfe7f7;
  --bla-mork: #9fcdee;
  --aksent: #946019;
  --aksent-lys: #e6bd6c;
  --linje: #d6d7c9;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --brodtekst: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bredde: min(1240px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font: 17px/1.65 var(--brodtekst); color: var(--blekk); background: var(--papir); }
a { color: inherit; text-underline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(46px, 6.2vw, 88px); margin-bottom: 22px; }
h2 { font-size: clamp(34px, 4.2vw, 58px); margin-bottom: 20px; }
h3 { font-size: clamp(28px, 2.6vw, 36px); margin-bottom: 14px; }
p { max-width: 66ch; }
.wrap { width: var(--bredde); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--aksent); outline-offset: 4px; }
::selection { background: var(--blekk); color: var(--papir); }
.hopp { position: absolute; left: 16px; top: -80px; z-index: 30; padding: 12px 16px; background: var(--flate); }
.hopp:focus { top: 12px; }

/* Topp */
.topp { border-bottom: 1px solid var(--linje); }
.topp-rad { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.merke { text-decoration: none; display: block; line-height: 1.05; }
.merke strong { display: block; font: 600 clamp(24px, 2.4vw, 30px)/1.05 var(--display); letter-spacing: -.02em; }
.merke img { display: block; width: auto; height: clamp(38px, 4vw, 48px); }
.merke span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--blekk-dempet); text-wrap: balance; }
.meny { display: flex; align-items: center; gap: 26px; }
.meny a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-size: 15px; }
.meny a:hover { text-decoration: underline; text-decoration-color: var(--aksent); }
.meny-knapp { display: none; min-height: 44px; padding: 8px 16px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; cursor: pointer; }

.knapp { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 13px 26px; background: var(--bla); color: var(--blekk); border: 1px solid var(--blekk); text-decoration: none; font-weight: 600; transition: transform 160ms ease-out, background 160ms ease-out; }
.knapp:hover { transform: translateY(-2px); background: var(--bla-mork); }
.knapp.omriss { background: var(--bla); color: var(--blekk); }
.knapp.omriss:hover { background: var(--bla-mork); }
.tekstlenke { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--aksent); }

/* Hero */
.hero { padding: 32px 0 0; }
.hero-rutenett { display: grid; grid-template-columns: .95fr 1.2fr; gap: 56px; align-items: center; }
.kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--blekk); font-weight: 700; margin-bottom: 16px; }
.hero-ingress { font: 500 clamp(20px, 1.9vw, 25px)/1.4 var(--display); margin-bottom: 18px; max-width: 30ch; }
.hero-handlinger { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 26px; }
.hero-foto { position: relative; margin-bottom: 28px; }
.hero-foto > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.innfelt { position: absolute; left: -34px; bottom: -34px; width: min(34%, 230px); margin: 0; padding: 7px; background: var(--papir); box-shadow: 0 12px 30px #23352b26; transform: rotate(-3deg); }
.innfelt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.innfelt figcaption { padding: 6px 2px 1px; font: italic 500 16px/1.3 var(--display); text-align: center; }

/* Infopanel i hero */
.info { margin-top: 8px; background: var(--bla); color: var(--blekk); border-radius: 9px; padding: 30px 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.info-kol { padding-inline: 28px; border-left: 1px solid #00000033; }
.info-kol:first-child { padding-left: 0; border-left: 0; }
.info-kol:last-child { padding-right: 0; }
.info h2 { font: 700 13px/1.3 var(--brodtekst); letter-spacing: .09em; text-transform: uppercase; color: var(--blekk); margin-bottom: 16px; }
.info p, .info dd, .info dt { font-size: 15px; line-height: 1.5; }
.info p { margin-bottom: 10px; }
.info a { color: inherit; }
.info .stor { font: 600 clamp(26px, 2.5vw, 34px)/1.1 var(--display); letter-spacing: -.015em; }
.info dl { margin: 0; }
.pris-rad { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-block: 9px; border-bottom: 1px solid #0000002b; }
.pris-rad:first-child { padding-top: 0; }
.pris-rad dt { font-size: 15px; }
.pris-rad dt small { display: block; font-size: 13px; }
.pris-rad dd { margin: 0; font: 600 24px/1 var(--display); white-space: nowrap; }
.pris-merk { font-size: 13.5px !important; margin-top: 12px; }
.tid-rad { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid #0000002b; font-size: 15px; font-weight: 700; }
.tid-rad:first-of-type { padding-top: 0; }
.tid-rad strong { font: 600 22px/1.1 var(--display); }
.stengt { font-size: 13.5px !important; font-weight: 700; margin-top: 12px; }
[data-telefon-fast] { font-weight: 700; }
.status { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0 !important; padding: 9px 12px; background: #ffffff8c; border-radius: 6px; font-size: 14px !important; }
.status::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: #b9b9a8; }
.status.aapen::before { background: #7fd49a; }
.status[hidden] { display: none; }

/* Seksjoner */
section { scroll-margin-top: 16px; }
.tjenester { padding-block: 96px 40px; }
.tjenester-intro { max-width: 760px; margin-bottom: 36px; }
.tjeneste { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-block: 48px; border-top: 1px solid var(--linje); }
.tjeneste.omvendt .tjeneste-foto { order: 2; }
.tjeneste-foto img { width: 100%; border-radius: 3px; }
.foto-hund img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 60% 20%; }
.foto-katt img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 55%; }
.pris-brikke { display: inline-block; margin-bottom: 18px; padding: 5px 12px; background: #ebe7da; border-radius: 6px; font-size: 14px; font-weight: 600; }
.liste { padding-left: 20px; margin: 18px 0 22px; }
.liste li { margin-block: 9px; }
.fakta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin: 22px 0 26px; }
.fakta dt { font-weight: 700; font-size: 15px; }
.fakta dd { margin: 2px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--blekk-dempet); }
.bildeband { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; margin-bottom: 28px; }
.bildeband figure { margin: 0; }

/* Galleri med lysboks */
.galleri { padding-block: 24px 72px; }
.galleri .tjenester-intro { margin-bottom: 30px; }
.galleri-rutenett { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.galleri figure { margin: 0; }
.galleri-knapp { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.galleri-knapp img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.galleri-kattunge img { object-position: 50% 30%; }
.galleri figcaption { margin-top: 8px; font-size: 14px; color: var(--blekk-dempet); }
.lysboks { padding: 0; border: 0; background: transparent; max-width: min(1100px, 92vw); max-height: 92vh; overflow: hidden; }
.lysboks::backdrop { background: #14261cb8; }
.lysboks-scene { position: relative; }
.lysboks img { display: block; max-width: 100%; max-height: 86vh; width: auto; height: auto; margin-inline: auto; border-radius: 6px; }
.lysboks-tekst { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; max-width: min(80%, 560px); }
.lysboks-tekst span { display: inline-block; padding: 8px 18px; background: var(--papir); color: var(--blekk); border-radius: 10px; font: italic 500 17px/1.35 var(--display); box-shadow: 0 4px 16px #14261c44; }
.lysboks-lukk, .lysboks-pil { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--papir); color: var(--blekk); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px #14261c55; }
.lysboks-lukk { top: 10px; right: 10px; }
.lysboks-pil { top: 50%; transform: translateY(-50%); font-size: 28px; padding-bottom: 3px; }
.lysboks-forrige { left: 10px; }
.lysboks-neste { right: 10px; }
html.lysboks-laast, html.lysboks-laast body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .lysboks[open] { animation: fade-opp 220ms ease-out; }
  .lysboks-lukk, .lysboks-pil { transition: transform 160ms ease-out; }
  .lysboks-pil:hover { transform: translateY(-50%) scale(1.08); }
}
.bildeband img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.bildeband figcaption { margin-top: 8px; font-size: 14px; color: var(--blekk-dempet); }

/* Praktisk */
.praktisk { background: var(--bla); color: var(--blekk); padding-block: 88px; margin-top: 56px; }
.praktisk-rutenett { display: grid; grid-template-columns: .85fr 1.15fr; gap: 90px; }
.praktisk .tekstlenke { text-decoration-color: var(--blekk); }
.sporsmal details { border-bottom: 1px solid #00000040; }
.sporsmal details:first-child { border-top: 1px solid #00000040; }
.sporsmal summary { min-height: 60px; padding-block: 14px; display: flex; align-items: center; justify-content: space-between; gap: 22px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500; }
.sporsmal summary::-webkit-details-marker { display: none; }
.sporsmal summary::after { content: '+'; font-size: 28px; line-height: 1; }
.sporsmal details[open] summary::after { content: '−'; }
.sporsmal details p, .sporsmal details ul { margin: 0 0 18px; font-size: 16px; }
.sporsmal details ul { padding-left: 20px; }
.sporsmal details li { margin-block: 6px; }

/* Om oss */
.om-oss { padding-block: 96px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.om-oss img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.ansatte { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 0; border-top: 1px solid var(--linje); }
.ansatte li { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--linje); }
.ansatte span { color: var(--blekk-dempet); }
.liten { font-size: 15px; color: var(--blekk-dempet); }

/* Kontakt */
.kontakt { padding-block: 24px 96px; border-top: 1px solid var(--linje); padding-top: 88px; }
.kontakt-rutenett { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.telefon { display: block; margin: 22px 0 8px; font: 600 clamp(36px, 4vw, 56px)/1.1 var(--display); text-decoration: none; letter-spacing: -.025em; }
.epost { overflow-wrap: anywhere; }
.adresse { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--linje); font-style: normal; }
.bestill-valg { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Bunn */
.bunn { border-top: 1px solid var(--linje); padding-block: 28px; font-size: 14px; }
.bunn-rad { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }
.bunn a { text-decoration: none; }
.bunn a:hover { text-decoration: underline; }
.bunn-lenker { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.merknad { width: 100%; font-size: 13px; color: var(--blekk-dempet); margin: 6px 0 0; }

/* Mobilbar */
.mobilbar { display: none; }

/* Vilkår */
.dokument { padding-block: 64px 96px; max-width: 800px; }
.dokument h1 { font-size: clamp(40px, 5vw, 64px); }
.dokument h2 { font: 700 21px/1.3 var(--brodtekst); letter-spacing: 0; margin: 36px 0 8px; }
.dokument p { max-width: none; }
.utkast { padding: 14px 18px; background: #ebe7da; border: 1px solid var(--aksent); font-size: 15px; }

/* Nettbrett */
@media (max-width: 1100px) {
  .galleri-rutenett { grid-template-columns: repeat(3, 1fr); }
  .info { grid-template-columns: 1fr 1fr; gap: 32px 0; padding: 32px; }
  .info-kol:nth-child(odd) { padding-left: 0; border-left: 0; }
  .info-kol:nth-child(even) { padding-right: 0; }
  .info-kol:nth-child(n+3) { padding-top: 0; }
  .hero-rutenett, .tjeneste, .praktisk-rutenett, .om-oss, .kontakt-rutenett { gap: 44px; }
}

/* Mobil */
@media (max-width: 860px) {
  body { font-size: 16.5px; padding-bottom: 76px; }
  :root { --bredde: calc(100% - 40px); }
  .meny-knapp { display: inline-flex; align-items: center; }
  .meny { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; background: var(--papir); border-bottom: 1px solid var(--linje); box-shadow: 0 14px 24px #23352b1a; }
  .meny.apen { display: flex; }
  .meny a { border-bottom: 1px solid var(--linje); min-height: 52px; font-size: 17px; }
  .topp { position: relative; }
  .hero { padding-top: 28px; }
  .hero-rutenett, .tjeneste, .praktisk-rutenett, .om-oss, .kontakt-rutenett { grid-template-columns: 1fr; }
  .hero-foto { margin-bottom: 40px; }
  .innfelt { left: 10px; bottom: -34px; width: 38%; }
  .info { grid-template-columns: 1fr; padding: 26px 22px; gap: 0; }
  .info-kol, .info-kol:nth-child(n) { padding: 22px 0; border-left: 0; border-top: 1px solid #00000033; }
  .info-kol:first-child { padding-top: 0; border-top: 0; }
  .info-kol:last-child { padding-bottom: 0; }
  .tjenester { padding-top: 64px; }
  .tjeneste { padding-block: 36px; }
  .tjeneste.omvendt .tjeneste-foto { order: 0; }
  .fakta { grid-template-columns: 1fr; }
  .bildeband { grid-template-columns: 1fr 1fr; }
  .bildeband figure:last-child { grid-column: 1 / -1; }
  .galleri-rutenett { grid-template-columns: 1fr 1fr; }
  .praktisk { padding-block: 60px; }
  .om-oss { padding-block: 64px; }
  .kontakt { padding-top: 60px; padding-bottom: 72px; }
  .mobilbar { position: fixed; z-index: 25; inset: auto 0 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--papir); border-top: 1px solid var(--linje); box-shadow: 0 -8px 20px #23352b14; }
  .mobilbar .knapp { min-height: 52px; padding-inline: 12px; justify-content: center; }
  .dokument { padding-block: 40px 72px; }
}

@media (max-width: 420px) {
  .pris-rad { flex-direction: column; gap: 2px; }
  .pris-rad dd { font-size: 26px; }
}

@media print { .mobilbar, .meny-knapp { display: none; } .info, .praktisk { background: none; color: #000; } }

/* Cormorant har gamle tall (09 ser ut som o9). Telefon, priser og tider bruker brødtekstskriften. */
.info .stor, .tid-rad strong, .pris-rad dd, .telefon { font-family: var(--brodtekst); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.info .stor { font-size: clamp(24px, 2.2vw, 30px); }
.tid-rad strong { font-size: 19px; }
.pris-rad dd { font-size: 20px; }
.telefon { font-size: clamp(30px, 3.4vw, 46px); }

/* Animasjoner – bare for de som ikke har bedt om redusert bevegelse */
@media (prefers-reduced-motion: no-preference) {
  .vises { opacity: 0; transform: translateY(26px); transition: opacity 640ms ease, transform 640ms cubic-bezier(.22,.61,.36,1); transition-delay: calc(var(--i, 0) * 80ms); }
  .vises.synlig { opacity: 1; transform: none; }
  .hero-rutenett > div { animation: fade-opp 700ms cubic-bezier(.22,.61,.36,1) both; }
  .hero-rutenett > div:first-child { animation-delay: 60ms; }
  .hero-rutenett > div:last-child { animation-delay: 180ms; }
  .info { animation: fade-opp 700ms cubic-bezier(.22,.61,.36,1) 320ms both; }
  .tjeneste-foto, .bildeband figure, .galleri-knapp { overflow: hidden; border-radius: 3px; }
  .tjeneste-foto img, .bildeband img, .galleri-knapp img { transition: transform 550ms ease; }
  .tjeneste-foto:hover img { transform: scale(1.03); }
  .bildeband figure:hover img, .galleri-knapp:hover img, .galleri-knapp:focus-visible img { transform: scale(1.045); }
}
@keyframes fade-opp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
