/*
Theme Name: Sogndal RIB – Fjord
Template: twentytwentyfive
Version: 3.0.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: sogndal-rib-child
License: GPLv2 or later
*/
html{scroll-behavior:smooth;scroll-padding-top:32px}
.fjord-brand{display:block;position:relative;width:clamp(114px,13.8vw,162px);aspect-ratio:1140/510;overflow:hidden;flex-shrink:0;background:transparent}
.fjord-brand img{position:absolute;top:0;left:0;width:134.737%;max-width:none;height:auto;transform:translate(-13.02%,-26.367%);filter:url('#fjord-logo-alpha');display:block}
.fjord-logo-motion{display:block;width:100%;height:auto;overflow:visible}
@media(prefers-reduced-motion:no-preference){
  .fjord-header .fjord-logo-mountain,.fjord-header .fjord-logo-boat{animation:fjord-mountain-draw 3s ease-in-out both}
  .fjord-header .fjord-logo-text{animation:fjord-logo-caption 1s ease 2.2s both}
}
@keyframes fjord-mountain-draw{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes fjord-logo-caption{from{opacity:0}to{opacity:1}}
.fjord-brand:focus-visible{outline:3px solid #74cabe;outline-offset:5px}
.fjord-header:has(.fjord-brand){padding-block:12px}
.fjord-footer .fjord-brand{width:126px}
.fjord-hero{background-color:#0a1d24;background-image:linear-gradient(90deg,rgba(5,20,27,.86),rgba(5,20,27,.52) 55%,rgba(5,20,27,.12)),linear-gradient(0deg,rgba(5,20,27,.6),transparent 50%),url('assets/images/fjord-hero.jpg');background-size:cover;background-position:center 58%;border-bottom:1px solid #36525a;color:#eaf3f1}
.fjord-hero h1{max-width:15ch;font-size:clamp(2.75rem,5vw,4.75rem);line-height:1.08;letter-spacing:-.035em;text-wrap:balance}
.fjord-kicker{font-family:ui-monospace,monospace;font-size:.8rem;letter-spacing:.16em;text-transform:uppercase;color:#74cabe}
.fjord-section{padding-block:clamp(36px,5vw,64px)}
.fjord-hero.fjord-section{padding-block:clamp(64px,8vw,110px);margin-block-start:0}
.fjord-hero p:not(.fjord-kicker){max-width:48ch;font-size:clamp(1rem,1.5vw,1.2rem);line-height:1.65}
.fjord-hero .fjord-kicker{color:#c4eee6}
.fjord-hero .wp-block-button.is-style-outline .wp-block-button__link{color:#fff;border-color:#d6e9e6;background:rgba(5,20,27,.28)}
.home .wp-site-blocks > main,.home .wp-block-post-content{margin-block-start:0}
#avgangar.fjord-section > *{max-width:none}
#avgangar.fjord-section > p{max-width:65ch;margin-left:0;margin-right:0}
.fjord-header .wp-block-site-title{font-size:clamp(1rem,1.5vw,1.35rem)}
@media(max-width:600px){.fjord-hero{background-position:60% center;background-image:linear-gradient(90deg,rgba(5,20,27,.84),rgba(5,20,27,.48)),url('assets/images/fjord-hero.jpg')}.fjord-hero .wp-block-buttons{gap:12px}.fjord-hero .wp-block-button__link{padding:14px 20px}}
.fjord-header{border-bottom:1px solid #36525a;padding-block:20px}
.fjord-footer{border-top:1px solid #36525a;padding-block:40px}
.fjord-section .fb-tour-card{background:#112a31;border-color:#36525a}
a:focus-visible,button:focus-visible{outline:3px solid #74cabe;outline-offset:5px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Continuous photo sections. Images remain visible without JavaScript. */
.home .wp-block-post-content{overflow-x:clip}
.fjord-hero,.fjord-scene{position:relative;isolation:isolate;overflow:hidden;overflow:clip}
.fjord-hero.fjord-section{min-height:78svh;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;background-image:none;border:0}
.fjord-hero::before{content:"";position:absolute;inset:-90px 0;z-index:-2;background:url('assets/images/fjord-hero.jpg') center 58%/cover no-repeat;transform:translate3d(0,var(--fjord-shift,0px),0)}
.fjord-hero::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(5,20,27,.82),rgba(5,20,27,.35) 65%,rgba(5,20,27,.12)),linear-gradient(0deg,#0a1d24,transparent 28%)}
.fjord-hero > .alignwide{width:100%;box-sizing:border-box}
.fjord-scene{min-height:78svh;display:flex;align-items:flex-end;background:#0a1d24;margin-block:0!important;padding:clamp(48px,8vw,112px) max(24px,calc((100% - 1200px)/2));box-sizing:border-box;color:#eaf3f1}
.fjord-scene-image{position:absolute;inset:-90px 0;z-index:-2;width:100%;height:calc(100% + 180px);max-width:none;object-fit:cover;object-position:center 48%;transform:translate3d(0,var(--fjord-shift,0px),0)}
@media(prefers-reduced-motion:no-preference){
  .fjord-scene[data-ken-burns="true"] .fjord-scene-image{transform:translate3d(var(--fjord-pan,0px),var(--fjord-shift,0px),0) scale(var(--fjord-zoom,1.04));transform-origin:50% 45%}
}
.fjord-scene::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#0a1d24 0%,rgba(10,29,36,.06) 24%,rgba(10,29,36,.12) 42%,rgba(10,29,36,.88) 87%,#0a1d24 100%)}
.fjord-scene-content{max-width:760px;position:relative}
.fjord-scene h2{font-size:clamp(2.25rem,4.5vw,4.5rem);line-height:1.1;letter-spacing:-.035em;max-width:18ch;text-wrap:balance;margin:16px 0 28px;color:#fff;text-shadow:0 2px 20px #0a1d24}
.fjord-scene .fjord-kicker{color:#c4eee6}
.fjord-scene-link{display:inline-block;padding:14px 22px;border:1px solid #c4eee6;border-radius:8px;color:#fff;background:rgba(10,29,36,.45);text-decoration:none;font-weight:600}
.fjord-scene-link:hover{background:#74cabe;color:#0a1d24}
.home #avgangar,.home #turar{padding-block:clamp(48px,7vw,88px);margin-block:0}
@media(max-width:767px){.fjord-hero.fjord-section{min-height:70svh}.fjord-scene{min-height:65svh}.fjord-hero::before{inset:0;background-position:60% center;transform:none}.fjord-scene-image{inset:0;height:100%;transform:none}.fjord-scene h2{max-width:16ch}}
@media(prefers-reduced-motion:reduce){.fjord-hero::before,.fjord-scene-image{transform:none!important}}

/* Floating front-page navigation. Only the gradient fades, never the logo. */
body.home{--fjord-header-height:88px}
body.home .fjord-header{position:fixed;top:var(--fjord-admin-offset,0px);left:0;right:0;width:100%;max-width:none;margin:0!important;box-sizing:border-box;z-index:1000;min-height:var(--fjord-header-height);padding:12px max(24px,calc((100vw - 1200px)/2));border:0;background:transparent}
body.home .fjord-header::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(110deg,rgba(5,20,35,.5),rgba(10,34,48,.5) 60%,rgba(13,44,56,.5));opacity:var(--fjord-bar-opacity,0)}
body.home .fjord-header > .wp-block-group{min-height:64px;margin-block:0;gap:20px}
body.home .fjord-hero.fjord-section{padding-top:calc(clamp(64px,8vw,110px) + var(--fjord-header-height));}
body.home{scroll-padding-top:110px}
html:has(body.home){scroll-padding-top:calc(110px + var(--fjord-admin-height,0px))}
body.home.admin-bar .fjord-header{top:var(--fjord-admin-offset,32px)}
.fjord-header .wp-block-navigation__responsive-container.is-menu-open{background:#0a1d24;color:#eaf3f1}
@media(max-width:767px){body.home{--fjord-header-height:72px}body.home .fjord-header > .wp-block-group{min-height:48px}body.home .fjord-header{padding-inline:20px}}
@media(min-width:601px) and (max-width:782px){body.home.admin-bar .fjord-header{top:var(--fjord-admin-offset,46px)}}

/* Short cinematic opening; CSS always releases the page, even without JS. */
.fjord-intro{position:fixed;inset:0;z-index:99990;background:radial-gradient(ellipse at 55% 65%,#173e58,#061726 75%);display:grid;place-items:center;animation:fjord-intro-out 1.3s cubic-bezier(.4,0,.2,1) 4.2s forwards}
.fjord-intro[hidden]{display:none}
.fjord-intro-mark{width:min(64vw,550px);text-align:center}
.fjord-intro .fjord-brand{width:100%;pointer-events:none}
.fjord-intro-mark p{font: .7rem ui-monospace,monospace;letter-spacing:.3em;color:#9ec6df;margin-top:32px}
.fjord-intro-skip{position:absolute;right:clamp(20px,4vw,60px);bottom:32px;background:transparent;border:0;border-bottom:1px solid #9ec6df;padding:12px 0;color:#eaf3f1;font:inherit;font-size:.85rem;cursor:pointer}
.fjord-intro .fjord-logo-mountain,.fjord-intro .fjord-logo-boat{animation:fjord-mountain-draw 3s ease-in-out both}
.fjord-intro .fjord-logo-text{animation:fjord-logo-caption 1.2s ease 1.9s both}
.fjord-intro-mark p{animation:fjord-logo-caption 1s ease 2.8s both}
@keyframes fjord-intro-out{to{opacity:0;visibility:hidden;pointer-events:none}}
body.home .fjord-header .fjord-logo-mountain,body.home .fjord-header .fjord-logo-boat,body.home .fjord-header .fjord-logo-text{animation:none}
body.home{background:#081c2d}
body.home .fjord-hero.fjord-section{min-height:94svh;align-items:center;justify-content:flex-end;padding-bottom:clamp(48px,7vw,90px)}
body.home .fjord-hero h1{font-size:clamp(3.2rem,6.6vw,6.6rem);font-weight:500;letter-spacing:-.045em;max-width:14ch}
body.home .fjord-hero p:not(.fjord-kicker){font-size:1rem;max-width:46ch}
body.home .fjord-hero::after{background:linear-gradient(90deg,rgba(5,22,39,.52),rgba(5,22,39,.05) 80%),linear-gradient(0deg,#081c2d,transparent 60%)}
body.home .fjord-scene{min-height:72svh;background:#081c2d}
body.home .fjord-scene::after{background:linear-gradient(180deg,#081c2d,rgba(8,28,45,.08) 22%,rgba(8,28,45,.06) 42%,rgba(8,28,45,.86) 90%,#081c2d)}
body.home .fjord-scene h2{font-weight:500}
body.home .fjord-kicker{color:#a7cfe6}
body.home #avgangar,body.home #turar{padding-block:48px}
body.home .fb-tour-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(280px,calc((100% - 48px)/3));grid-template-columns:none;overflow-x:auto;gap:24px;scroll-snap-type:x proximity;padding:4px 4px 20px;scrollbar-color:#8dbbd4 #102c42;scrollbar-width:auto}
body.home .fb-tour-card{scroll-snap-align:start;background:#102c42;border-color:#31516a}
body.home .fb-tour-link,body.home .wp-block-button:not(.is-style-outline) .wp-block-button__link{background:#afd2e7;color:#081c2d!important}
.fjord-tour-hint{font-size:.8rem;color:#afd2e7}
@media(max-width:767px){.fjord-intro-mark{width:78vw}body.home .fjord-hero.fjord-section{min-height:88svh}body.home .fjord-scene{min-height:62svh}body.home .fb-tour-grid{grid-auto-columns:86%}}
@media(prefers-reduced-motion:reduce){.fjord-intro{display:none}.fjord-intro *{animation:none!important}}

@font-face{font-family:Alegreya;src:url('assets/fonts/Alegreya.ttf') format('truetype');font-weight:400 900;font-style:normal;font-display:swap}
body.home .fjord-hero h1,body.home .fjord-scene h2,.fjord-section h2,.fjord-section h3,.fjord-editorial h2,.fjord-story h2{font-family:Alegreya,Georgia,serif;font-weight:400;letter-spacing:-.015em;line-height:1.12}
body.home .fjord-hero h1{font-size:clamp(3rem,6vw,6rem);max-width:16ch}
.fjord-editorial{display:grid;grid-template-columns:1fr 1fr;gap:clamp(28px,6vw,88px);align-items:center;max-width:1200px;margin:0 auto;padding:clamp(56px,8vw,110px) 24px;box-sizing:border-box}
.fjord-editorial figure{margin:0}.fjord-editorial img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:50% 45%}
.fjord-editorial h2{font-size:clamp(2rem,4vw,3.8rem);text-wrap:balance;margin:20px 0}
.fjord-editorial p:not(.fjord-kicker){max-width:40ch;line-height:1.8}
.fjord-scene.fjord-scene-open .fjord-scene-image{object-position:50% 70%}
@media(max-width:767px){.fjord-editorial{grid-template-columns:1fr;padding:48px 24px;gap:28px}.fjord-editorial img{aspect-ratio:4/3}}

/* Static fallback; the continuous opening/story works on mobile and desktop. */
.fjord-story{background:#081c2d;margin-block:0!important}
.fjord-story-stage,.fjord-story-slide,.fjord-story-copy,.fjord-scene-content{margin-block:0}
figure.fjord-story-photo,figure.fjord-scene-image{margin:0;max-width:none}
figure.fjord-story-photo img,figure.fjord-scene-image img{width:100%;height:100%;object-fit:cover;display:block}
.fjord-scene-link a,.fjord-story-skip a{color:inherit;text-decoration:none}
.fjord-scene-link,.fjord-story-skip{margin-block:0}
@media(prefers-reduced-motion:no-preference){
  .fjord-scene.fjord-ken-burns .fjord-scene-image{transform:translate3d(var(--fjord-pan,0px),var(--fjord-shift,0px),0) scale(var(--fjord-zoom,1.04));transform-origin:50% 45%}
}
/* In the editor all chapters remain visible and individually selectable. */
.editor-styles-wrapper .fjord-story-stage{position:static;height:auto}
.editor-styles-wrapper .fjord-story-slide{position:relative;opacity:1;min-height:500px}
.editor-styles-wrapper .fjord-story-copy{transform:none;opacity:1}
.editor-styles-wrapper .fjord-story-photo,.editor-styles-wrapper .fjord-scene-image{z-index:0}
.editor-styles-wrapper .fjord-story-copy,.editor-styles-wrapper .fjord-scene-content{position:relative;z-index:1}
.fjord-story-slide{position:relative;min-height:72svh;display:flex;align-items:center;isolation:isolate;overflow:hidden;padding:80px max(24px,calc((100% - 1200px)/2));box-sizing:border-box}
.fjord-story-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.fjord-story-slide::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(4,18,33,.72),rgba(4,18,33,.16)),linear-gradient(0deg,#081c2d,transparent 35%,transparent 75%,rgba(8,28,45,.5))}
.fjord-story-copy{max-width:720px;color:#eaf3f1}
.fjord-story h2{font-size:clamp(2.7rem,5.5vw,5.7rem);max-width:16ch;margin:20px 0;text-wrap:balance}
.fjord-story-copy > p:last-child{max-width:40ch;font-size:clamp(1rem,1.5vw,1.2rem)}
.fjord-story-skip{display:block;padding:18px 24px;text-align:center;color:#afd2e7;background:#081c2d}
.fjord-story-opening{display:block;padding:0;min-height:0}
.fjord-story-opening::after{display:none}
.fjord-story-opening .fjord-hero{margin:0!important;width:100%;max-width:none}
@media(prefers-reduced-motion:no-preference){
  .home .wp-block-post-content{overflow:visible}
  .fjord-story.is-scroll-story{height:400svh;position:relative}
  .fjord-story.is-scroll-story .fjord-story-stage{position:sticky;top:0;height:100svh;overflow:hidden;isolation:isolate}
  .fjord-story.is-scroll-story .fjord-story-slide{position:absolute;inset:0;min-height:0;height:100%;opacity:var(--story-opacity,0)}
  .fjord-story.is-scroll-story .fjord-story-slide:first-child{opacity:1}
  .fjord-story.is-scroll-story .fjord-story-slide[inert]{pointer-events:none}
  body.home .fjord-story.is-scroll-story .fjord-hero.fjord-section{height:100%;min-height:0;padding-bottom:90px}
  .fjord-story.is-scroll-story .fjord-hero > .alignwide{transform:translate3d(0,var(--story-text-y,0px),0);opacity:var(--story-copy-opacity,1)}
  .fjord-story.is-scroll-story .fjord-hero::before{transform:scale(var(--story-scale,1.06))}
  .fjord-story.is-scroll-story .fjord-story-photo{transform:scale(var(--story-scale,1.06));object-position:50% 48%}
  .fjord-story.is-scroll-story .fjord-story-copy{transform:translate3d(0,var(--story-text-y,0px),0);opacity:var(--story-copy-opacity,1)}
  .fjord-story.is-scroll-story .fjord-story-skip{position:absolute;bottom:18px;right:24px;z-index:5;background:rgba(8,28,45,.6);border-radius:8px}
  .fjord-scene-content{transform:translate3d(0,var(--fjord-text-shift,0px),0)}
  .fjord-scene-image{inset:-180px 0;height:calc(100% + 360px)}
  .fjord-scene-image{transform:translate3d(0,var(--fjord-shift,0px),0)}
}
@media(max-width:767px) and (prefers-reduced-motion:no-preference){
  .fjord-story-slide{padding:88px 24px 100px}
  .fjord-story-opening{padding:0}
  .fjord-story.is-scroll-story .fjord-story-copy{max-width:100%}
  .fjord-story h2{font-size:clamp(2.1rem,9vw,3.6rem)}
  .fjord-story-copy > p:last-child{font-size:1rem;line-height:1.5}
  .fjord-story.is-scroll-story .fjord-story-skip{bottom:max(12px,env(safe-area-inset-bottom));right:16px;padding:12px 16px;font-size:.875rem}
  body.home .fjord-story.is-scroll-story .fjord-hero h1{font-size:clamp(2.2rem,9vw,3.8rem)}
  body.home .fjord-story.is-scroll-story .fjord-hero.fjord-section{padding-top:88px;padding-bottom:84px}
}
@media(max-height:560px) and (prefers-reduced-motion:no-preference){
  .fjord-story.is-scroll-story .fjord-story-stage{height:560px}
  .fjord-story.is-scroll-story{height:2240px}
}
