/*
Theme Name: Samariten Dokumentär
Description: Ett eget WordPress-tema för Samariten Ambulans.
Version: 0.2.3
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: samariten
*/

:root {
  --bar: 72px;
  --samariten-font: "Segoe UI", Arial, sans-serif;
  --edge: clamp(16px, 3.35vw, 55px);
  --navy: #091b34;
  --teal: #073634;
  --ground: #092522;
  --yellow: #ffcf13;
  --paper: #f4f4f4;
  --white: #f8fbfa;
  color: var(--navy);
  font: 100%/1.5 "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--navy); }
img, svg { display: block; }
img { max-inline-size: 100%; block-size: auto; }
a { color: inherit; }
[hidden] { display: none !important; }

:where(a, summary, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--navy);
}

.samariten-site { display: flex; flex-direction: column; min-block-size: 100vh; min-block-size: 100svh; }
.admin-bar .samariten-site { min-block-size: calc(100svh - var(--wp-admin--admin-bar--height, 32px)); }

.skip-link {
  position: fixed;
  inset: .75rem auto auto 1rem;
  z-index: 100000;
  transform: translateY(calc(-100% - 1rem));
  background: var(--paper);
  color: var(--navy);
  padding: .6rem 1rem;
}
.skip-link:focus { transform: none; }

.site-header, .site-footer { min-block-size: var(--bar); }
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--edge);
  background: var(--paper);
}
.site-brand { display: block; width: min(179px, 55vw); }
.site-brand img { inline-size: 100%; block-size: auto; }

.samariten-site .site-menu summary {
  color: var(--navy);
  font-family: var(--samariten-font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-block-size: 2.75rem;
  padding-inline: .4rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.125rem;
  font-weight: 700;
}
.samariten-site .site-menu summary::-webkit-details-marker { display: none; }
.samariten-site .site-menu summary svg { inline-size: 25px; block-size: 25px; }
.site-menu[open] summary { color: var(--teal); }
.site-menu nav {
  position: absolute;
  inset: 100% var(--edge) auto auto;
  inline-size: min(22rem, calc(100% - 2 * var(--edge)));
  padding: .45rem .9rem;
  background: var(--navy);
  border-block-start: 4px solid var(--yellow);
  color: var(--white);
  box-shadow: 0 .7rem 1.5rem #0005;
}
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu li + li { border-block-start: 1px solid #ffffff42; }
.samariten-site .site-menu nav a {
  color: var(--white);
  font-family: var(--samariten-font);
  display: flex;
  align-items: center;
  min-block-size: 3rem;
  padding: .45rem .35rem;
  overflow-wrap: anywhere;
  text-decoration: none;
  font-weight: 650;
}
.samariten-site .site-menu nav a:is(:hover, [aria-current="page"]) { color: var(--yellow); }

.site-footer {
  display: grid;
  place-items: center;
  padding: .5rem var(--edge);
  color: var(--white);
  background: var(--navy);
}
.samariten-site .site-social {
  color: var(--white);
  font-family: var(--samariten-font);
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-block-size: 2.75rem;
  font-size: 1rem;
  font-weight: 650;
  text-underline-offset: .24em;
}
.samariten-site .site-social svg { inline-size: 24px; block-size: auto; }

.page-main { flex: 1; background: #fff; }
.page-content {
  max-inline-size: 57rem;
  padding: clamp(1.5rem, 5vw, 4rem) var(--edge);
  margin: 0 auto;
  overflow-wrap: anywhere;
}
.page-content h1 {
  margin-block: 0 1.25rem;
  color: var(--teal);
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.05;
}
.page-content h1::after {
  content: "";
  display: block;
  margin-block-start: .35em;
  inline-size: 4.4rem;
  block-size: .35rem;
  background: var(--yellow);
}
.page-content > * + * { margin-block-start: 1em; }
.page-content a { text-underline-offset: .18em; }
.page-content input, .page-content select, .page-content textarea { max-inline-size: 100%; font: inherit; }

.site-footer-inner { display:block; padding:0; }
.site-header, .site-footer:not(.site-footer-inner) { min-height:var(--bar); padding-block:0; }
@media (max-width:850px) {
  :root { --bar:58px; }
  .site-brand { width:min(144px, 54vw); }
  .samariten-site .site-menu summary { gap:8px; font-size:.9375rem; }
  .samariten-site .site-menu summary svg { width:21px; height:21px; }
  .samariten-site .site-social { font-size:.875rem; }
  .samariten-site .site-social svg { width:22px; }
}
.home-main { flex:1 0 auto; color:var(--white); display:grid; grid-template-areas:"hero" "links" "news"; min-width:0; }
.home-photo { grid-area:hero; position:relative; isolation:isolate; overflow:hidden; min-height:clamp(430px,46vw,1050px); }
.home-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 57%; }

.home-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .8;
  pointer-events: none;
  background:
    radial-gradient(ellipse 56% 29% at 36% 0%, #06142164 0%, #0614215e 22%, #06142146 45%, #06142128 64%, #06142112 80%, #06142104 93%, #06142100 100%),
    radial-gradient(ellipse 57% 27% at 39% 105%, #06142172 0%, #06142168 23%, #0614214e 45%, #0614212e 65%, #06142113 81%, #06142104 93%, #06142100 100%),
    linear-gradient(90deg, #061421d9 0%, #061421c9 10%, #061421b6 17%, #061421a2 22%, #06142180 25%, #06142155 27%, #06142129 29%, #0614210b 31%, #06142100 34%);
}
.hero-copy { z-index:1; position:absolute; left:var(--edge); top:50%; transform:translateY(-50%); }
.hero-copy h1 { margin:0; color:#fff; font-weight:800; font-size:clamp(46px,4.8vw,110px); line-height:.98; letter-spacing:-.052em; text-shadow:0 2px 9px #07131d9c; }
.hero-copy h1 span { display:block; }
.hero-copy h1::after { content:""; display:block; width:76px; height:5px; margin:18px 0 12px; background:var(--yellow); }
.hero-copy p { margin:0; max-width:24ch; font-size:clamp(18px,1.57vw,31px); font-weight:680; line-height:1.18; text-shadow:0 1px 2px #07131df2,0 2px 5px #07131dc4; }
.hero-links { grid-area:links; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); background:var(--teal); }
.hero-link { min-width:0; min-height:90px; display:grid; grid-template-columns:38px minmax(0,1fr) 22px; gap:clamp(11px,1.12vw,22px); align-items:center; padding:12px clamp(15px,2.6vw,45px); border-right:1px solid var(--line); font-size:clamp(16px,1.6vw,27px); font-weight:700; }
.hero-link:last-child { border-right:0; }
.hero-link span { overflow-wrap:anywhere; line-height:1.1; }
.mark { width:38px; height:38px; }
.arrow { width:22px; height:22px; }
.feature-list { grid-area:news; background:#082b29; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:14px var(--edge); }
.feature-card { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) 20px; align-items:center; gap:10px; background:#073534f7; box-shadow:0 3px 18px #031c2529; border-left:5px solid var(--yellow); padding:11px 13px 12px 14px; }
.feature-card h2 { margin:0 0 3px; font-size:clamp(18px,1.42vw,25px); font-weight:750; letter-spacing:-.025em; line-height:1.11; }
.feature-card p { margin:0; color:#f1f7f5; font-size:clamp(13px,.94vw,16px); line-height:1.28; }
.feature-card:only-child { grid-column: 1 / -1; }
.feature-card .arrow { width:20px; height:20px; }



@media (min-width:1000px) {
  .home-main {
    --link-row-height: 90px;
    --hero-room: calc(100svh - var(--bar) - var(--link-row-height));
    --hero-height: max(340px, min(clamp(430px, 46vw, 1050px), var(--hero-room)), calc(var(--hero-room) - var(--bar)));
    grid-template-areas: "hero" "links";
    grid-template-rows: var(--hero-height) auto;
  }
  .admin-bar .home-main {
    --hero-room: calc(100svh - var(--bar) - var(--link-row-height) - var(--wp-admin--admin-bar--height, 32px));
  }
  .home-photo { min-height: 0; container-type: size; }
  .home-photo img { object-position: 50% 70%; }
  .hero-link { min-height: var(--link-row-height); }
  .feature-list { grid-area:hero; z-index:2; align-self:center; justify-self:end; transform:translateY(22px); width:clamp(205px,20vw,415px); margin-right:clamp(20px,2.3vw,45px); padding:0; background:transparent; grid-template-columns:1fr; gap:11px; }
  .feature-card { min-height:69px; }
}
@container (max-aspect-ratio: 8 / 5) or (min-aspect-ratio: 13 / 5) {
  .home-photo img { object-fit: contain; object-position: center; }
}
@media (max-width:850px) {


  .home-photo { min-height:clamp(230px,74.35vw,460px); }
  .home-photo img { object-position:32% 50%; }
  
  .home-photo::after {
    inset: 0 0 auto;
    height: clamp(76px, 22vw, 105px);
    background: linear-gradient(180deg, #07192bdd 0%, #07192bcd 24%, #07192bba 43%, #07192b90 54%, #07192b58 65%, #07192b2b 77%, #07192b0e 88%, #07192b00 100%);
    mask-image: linear-gradient(90deg, #0008 0%, #000b 9%, #000 17%, #000 85%, #000e 100%);
  }
  .hero-copy { inset:clamp(12px,3.8vw,24px) 12px auto max(16.3%,45px); transform:none; }
  .hero-copy h1 { font-size:clamp(23px,7.05vw,43px); letter-spacing:-.048em; }
  .hero-copy h1 span { display:inline; }
  .hero-copy h1::after { width:38px; height:4px; margin:7px 0 5px; }
  .hero-copy p { max-width:none; font-size:clamp(12px,3.5vw,18px); font-weight:650; }
  .hero-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hero-link { min-height:87px; grid-template-columns:minmax(0,1fr) 17px; grid-template-rows:29px auto; padding:10px 12px 11px; column-gap:6px; row-gap:8px; font-size:clamp(14px,4.08vw,20px); border-bottom:1px solid var(--line); }
  .hero-link:nth-child(even) { border-right:0; }
  .hero-link:nth-last-child(-n+2) { border-bottom:0; }
  .hero-link .mark { grid-column:1 / -1; width:26px; height:26px; justify-self:center; }
  .hero-link span { text-align:center; }
  .hero-link .arrow { width:17px; height:17px; }
  .feature-list { grid-template-columns:1fr; padding:13px 12px 15px; gap:8px; border-top:1px solid var(--line); }
  .feature-card { min-height:60px; padding:9px 11px 10px; }
  .feature-card h2 { font-size:18px; }


}
.hero-link, .feature-card { color:var(--white); text-decoration:none; }
.hero-link:hover, a.feature-card:hover { background:#10504c; }
.hero-link span, .feature-card p { overflow-wrap:anywhere; }
.feature-card-static { grid-template-columns:minmax(0,1fr); }
.home-main .feature-list[hidden] { display:none; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes incoming-links { from { transform:translateX(-.85rem); } to { transform: none; } }
  .hero-link { animation:incoming-links 290ms ease-out backwards; }
  .hero-link:nth-child(2) { animation-delay:25ms; }
  .hero-link:nth-child(3) { animation-delay:50ms; }
  .hero-link:nth-child(4) { animation-delay:75ms; }
}
@media (max-width:850px) {
  .home-main { flex:0 0 auto; }
  .home-main .hero-copy { overflow-wrap:anywhere; }
}

