/*! Theme Name: Ousia */
/*! Author: Lasse Jellum */
/*! Author URI: https://jellum.net */
/*! Version: 0.4.2 */
/*! Text Domain: ousia */


button.menu-toggle {
  color: transparent;
  display: contents;
}
:root {
  /* Fluid typography settings */
  --min-fluid-width: 360;
  --max-fluid-width: 1920;
  --min-font: 16;
  --max-font: 40;
  --font-calc: calc( var(--min-font) * 1px + (var(--max-font) - var(--min-font)) * ( (100vw - (var(--min-fluid-width)) * 1px) / ( var(--max-fluid-width) - var(--min-fluid-width)) ));
  --font-size: min(max(var(--min-font) * 1px, var(--font-calc)), var(--max-font) * 1px);
  --font-size-2: 0.9em; /* Added for button styles */
  /* Typography */
  --font-family-1: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Layout variables */
  --inline-width: 33;
  --inline-wide: 46;
  --min-width: calc(99vw - (var(--font-size) * 3));
  --x-width: calc(var(--font-size) * var(--inline-width));
  --max-width: min(var(--min-width), var(--x-width));
  --wide-width: min(100vw, var(--font-size) * var(--inline-wide));
  --half-width: 1440px;
  --margin: 1.2rem;
  --margin-px: var(--font-size);
  --header-height: 4em;
  --admin: 0px;
  --magic: 360px; /* Default value for responsive layouts */
  /* Colors */
  --bg-color: hsl(36, 24%, 96%);
  --text-color: hsl(65, 17%, 15%);
  --accent-color: hsl(36, 71%, 53%);
  --accent-contrast: hsl(0, 0%, 100%);
  --dark-accent-color: hsl(36, 18%, 38%);
  --light-accent-color: hsla(127, 46%, 33%, 0.25);
  --lightest-color: hsl(0, 0%, 100%);
  --darkest-color: hsl(40, 4%, 14%);
  --shadow-color: hsla(0, 0%, 0%, 0.2);
  --link-color: var(--accent-color);
  /* Spacing */
  --spacing-1: 0.5em;
  --spacing-2: 1em;
  --spacing-3: 2em;
  --spacing-4: 4em;
  /* Animations */
  --time: 320ms;
  --time-slow: 700ms;
  --timing-fly: cubic-bezier(0.19, 1, 0.22, 1);
  --timing-menu: cubic-bezier(0.65, 0.08, 0.07, 1.1);
  --timing-swing: cubic-bezier(0.55, 0, 0.1, 1);
  --timing-swift: cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-bar {
  --admin: 32px;
}

/* Vertical Rhythm */
p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Heading Styles */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

h1 {
  font-size: calc(1.802em + 1.355 * (100vw - var(--min-fluid-width) * 1px) / (var(--max-fluid-width) - var(--min-fluid-width)));
}

h2 {
  font-size: calc(1.602em + 0.767 * (100vw - var(--min-fluid-width) * 1px) / (var(--max-fluid-width) - var(--min-fluid-width)));
}

h3 {
  font-size: calc(1.424em + 0.353 * (100vw - var(--min-fluid-width) * 1px) / (var(--max-fluid-width) - var(--min-fluid-width)));
}

h4 {
  font-size: calc(1.266em + 0.067 * (100vw - var(--min-fluid-width) * 1px) / (var(--max-fluid-width) - var(--min-fluid-width)));
}

/* Header specific */
header.header {
  padding-top: 1em;
}

.admin-bar header#header {
  top: 46px;
}
@media (min-width: 782px) {
  .admin-bar header#header {
    top: 32px;
  }
}

.show-menu #menu-container {
  transform: translate(0px);
  opacity: 1;
}
.show-menu #menu-container ul:nth-child(1) {
  transition-delay: 200ms;
}
.show-menu nav#menu li:nth-child(2) {
  transition-delay: 250ms;
}
.show-menu nav#menu li:nth-child(3) {
  transition-delay: 300ms;
}
.show-menu nav#menu li:nth-child(4) {
  transition-delay: 350ms;
}
.show-menu nav#menu li:nth-child(5) {
  transition-delay: 400ms;
}
.show-menu nav#menu li:nth-child(6) {
  transition-delay: 450ms;
}
.show-menu nav#menu li:nth-child(7) {
  transition-delay: 500ms;
}
.show-menu nav#menu li:nth-child(8) {
  transition-delay: 550ms;
}
.show-menu nav#menu li:nth-child(9) {
  transition-delay: 600ms;
}

.show-menu #header nav#menu > div {
  transform: translateX(0%);
}

.show-menu {
  overflow: hidden;
}

.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0 1em 1em -0.7em rgba(0, 0, 0, 0.1);
}

main {
  margin-top: var(--header-height);
  transition: transform var(--time) var(--timing-menu);
}

#primary {
  transition: transform var(--time) var(--timing-menu);
}

.slide {
  transform: translateX(-230px);
}

.show-header {
  top: 0px !important;
}

#header {
  color: var(--accent-color);
  background-color: var(--bg-color);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0 1em 1em -0.7em rgba(0, 0, 0, 0.1);
}
#header button.menu-toggle {
  -webkit-tap-highlight-color: transparent;
}
#header button.menu-toggle:focus {
  outline: none;
}
#header button.menu-toggle:focus-visible {
  outline: 2px solid var(--accent-color);
}
#header a {
  color: var(--link-color);
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
}
#header a #menu {
  display: flex;
  align-items: center;
}
#header svg {
  fill: var(--text-color);
  transition: transform var(--time);
  z-index: 3;
  width: 2em;
}
#header svg.search {
  fill: transparent;
  stroke: var(--text-color);
  stroke-width: 2px;
  height: 2.2em;
  margin: 0em 0.25em 0.21em;
}
#header.sticky #menu > div {
  box-shadow: -1em 0 1em -0.7em rgba(0, 0, 0, 0.1);
}
#header nav .show-menu li {
  transform: translate(0px);
  opacity: 1;
}
#header nav .show-menu li:nth-child(1) {
  transition-delay: 200ms;
}
#header nav .show-menu li:nth-child(2) {
  transition-delay: 250ms;
}
#header nav .show-menu li:nth-child(3) {
  transition-delay: 300ms;
}
#header nav .show-menu li:nth-child(4) {
  transition-delay: 350ms;
}
#header nav .show-menu li:nth-child(5) {
  transition-delay: 400ms;
}
#header nav .show-menu li:nth-child(6) {
  transition-delay: 450ms;
}
#header nav .show-menu li:nth-child(7) {
  transition-delay: 500ms;
}
#header nav .show-menu li:nth-child(8) {
  transition-delay: 550ms;
}
#header nav .show-menu li:nth-child(9) {
  transition-delay: 600ms;
}
#header nav ul#menu-hovedmeny {
  margin: 0;
  display: flex;
  flex-direction: row;
}
#header nav li {
  list-style-type: none;
  color: var(--link-color);
  font-weight: 300;
  letter-spacing: 1px;
}
#header nav ul#menu-hovedmeny {
  flex-direction: column;
}
#header nav .menu-item > a {
  color: var(--link-color);
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 1px;
  padding: var(--spacing-1);
}
#header nav .menu-item > a:hover {
  display: block;
}
#header nav rect {
  transition: var(--time) var(--timing-menu);
  transform-origin: center;
  will-change: transform opacity;
}
#header nav rect:nth-of-type(1), #header nav rect:nth-of-type(3) {
  transition: transform var(--time) var(--timing-swift) 300ms, opacity 1ms linear 300ms;
}
#header nav rect:nth-of-type(2), #header nav rect:nth-of-type(4) {
  transition-delay: 0ms;
}

@media (max-width: 768px) {
  .second-menu {
    display: none;
  }
  #menu-container {
    position: fixed;
    top: calc(var(--header-height) + var(--admin));
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    transition: transform 300ms var(--timing-menu);
    transform: translateX(110%);
    z-index: 1;
    min-width: 230px;
    box-shadow: -1em 0 1em -0.7em rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    overflow-y: auto;
  }
  #menu-container li {
    transform: translate(30vh);
    opacity: 0;
    transition: 300ms ease-out;
    transition-property: transform, opacity;
  }
  #menu .show-menu {
    transform: translateX(0%);
  }
  .show-menu #menu-container li {
    transform: translate(0vh);
    opacity: 1;
  }
}
.show-menu #navigation rect:nth-of-type(1) {
  transform: translatey(12px);
  opacity: 0;
  transition-delay: 0ms, 300ms;
}
.show-menu #navigation rect:nth-of-type(2) {
  transform: rotate(225deg);
  transition-delay: 300ms;
}
.show-menu #navigation rect:nth-of-type(3) {
  transform: translatey(-12px);
  opacity: 0;
  transition-delay: 0ms, 300ms;
}
.show-menu #navigation rect:nth-of-type(4) {
  transform: rotate(-225deg);
  transition-delay: 300ms;
}

#header-inner {
  height: var(--header-height);
  max-width: calc(100% - var(--margin) * 2);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-content: space-between;
}

#navigation {
  display: flex;
  align-items: center;
}

#branding {
  display: flex;
  align-items: center;
}

.custom-logo-link {
  max-width: 20vw;
}

.custom-logo {
  height: 75%;
  width: auto;
}
.custom-logo h4 {
  font-size: 1.2em;
  font-weight: 500;
}

@media (min-width: 768px) {
  #header #navigation {
    flex-direction: row-reverse;
  }
  #header #navigation #menu-container > ul {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
  }
  #header .menu-item a {
    letter-spacing: 0px;
    padding: 0.4em;
    font-size: 1em;
  }
  #header #menu svg {
    display: none;
  }
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--bg-color);
  clip: auto !important;
  clip-path: none;
  color: var(--text-color);
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.menu-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle[aria-expanded=true] + #menu-container {
  transform: translateX(0);
}
.menu-toggle svg {
  width: 28px;
  height: 28px;
}
.menu-toggle svg rect {
  fill: var(--text-color);
}

@media (min-width: 768px) {
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms, visibility 300ms;
  }
  .menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
  }
  nav li {
    display: flex;
  }

}
@media (max-width: 768px) {
  ul.sub-menu {
    height: 0;
    overflow: hidden;
    transition: height 300ms ease;
  }
  .menu-item-has-children:after {
    content: "+";
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 300ms ease;
    pointer-events: none;
  }
  .show-sub-menu:after {
    transform: translateY(-50%) rotate(45deg);
  }
  .show-sub-menu .sub-menu {
    height: auto;
  }
}
.alignright {
  float: right;
}

.alignleft {
  float: left;
}

.alignfull:not(.wp-block-columns, p, h1) {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
  max-width: 100%;
}
.alignfull:not(.wp-block-columns, p, h1) img {
  height: auto;
  max-height: 100vh;
  object-fit: cover;
}

.alignwide img {
  height: auto;
  max-height: 100vh;
  object-fit: cover;
}

.wc-block-grid__products .wc-block-grid__product-image img {
  height: auto;
}

.wp-block-image img {
  height: auto;
}

.wp-block-cover {
  overflow: hidden;
}

@media (max-width: 768px) {
  .wp-block-image {
    margin: 1em auto;
    width: 100%;
  }
  .wp-block-cover {
    margin: 0;
    max-width: 100%;
  }
}
.wp-block-image figure.aligncenter {
  margin: 0;
  display: grid;
  place-content: center;
}

.wp-block-media-text__content * {
  max-width: 27em;
}

.has-media-on-the-right .wp-block-media-text__content {
  display: flex;
  flex-direction: column;
  align-content: flex-end;
  flex-wrap: wrap;
}

/* Moved to central layout pattern in style.scss */
@media (max-width: 767px) {
  figcaption {
    margin-left: var(--font-size);
    margin-right: var(--font-size);
  }
}

/* Moved to central layout pattern in style.scss */
section > table {
  /* Additional styles can be added here if needed */
}

.nav-links {
  display: flex;
  line-height: 1.1;
  margin: 4em 0;
}

.nav-next {
  text-align: right;
}

.nav-links a:hover {
  text-decoration: none;
}
.nav-links a:hover .post-title {
  text-decoration: underline;
}

a.more-link {
  display: block;
  text-align: right;
}

/*
 * All quickfixes have been moved to their appropriate files:
 * - figcaption and section > table styles moved to _blocks.scss
 * - .products .product img and span.onsale styles moved to woocommerce/_archive.scss
 */
body {
  /* Iphone 12 Pro Max - 2778x1284 pixels at 458ppi */
  /* Macbook air */
  /* 1920px */
  /* 2250 */
  /* 2304 */
  /* 2484 */
  /* 2680 */
}
@media (min-width: 340px) and (max-width: 360px) {
  body {
    --magic: 360px;
  }
}
@media (min-width: 361px) and (max-width: 375px) {
  body {
    --magic: 375px;
  }
}
@media (min-width: 376px) and (max-width: 384px) {
  body {
    --magic: 384px;
  }
}
@media (min-width: 385px) and (max-width: 390px) {
  body {
    --magic: 390px;
  }
}
@media (min-width: 391px) and (max-width: 549px) {
  body {
    --magic: 414px;
  }
}
@media only screen and (device-width: 428px) and (-webkit-device-pixel-ratio: 3) {
  body {
    --magic: 480px;
  }
}
@media (min-width: 550px) and (max-width: 640px) {
  body {
    --magic: 640px;
  }
}
@media (min-width: 641px) and (max-width: 720px) {
  body {
    --magic: 720px;
  }
}
@media (min-width: 721px) and (max-width: 750px) {
  body {
    --magic: 750px;
  }
}
@media (min-width: 751px) and (max-width: 767px) {
  body {
    --magic: 768px;
  }
}
@media (min-width: 768px) and (max-width: 900px) {
  body {
    --magic: 360px;
  }
}
@media (min-width: 900px) and (max-width: 1140px) {
  body {
    --magic: 390px;
  }
}
@media (min-width: 1141px) and (max-width: 1280px) {
  body {
    --magic: 640px;
  }
}
@media (min-width: 1281px) and (max-width: 1440px) {
  body {
    --magic: 720px;
  }
}
@media (min-width: 1441px) and (max-width: 1500px) {
  body {
    --magic: 750px;
  }
}
@media (min-width: 1500px) and (max-width: 1536px) {
  body {
    --magic: 768px;
  }
}
@media (min-width: 1537px) and (max-width: 1919px) {
  body {
    --magic: 828px;
  }
}
@media (min-width: 1200px) and (max-width: 1300px) and (-webkit-device-pixel-ratio: 2) {
  body {
    --magic: 621px;
  }
}
@media (min-width: 1300px) and (max-width: 1440px) and (-webkit-device-pixel-ratio: 2) {
  body {
    --magic: 720px;
  }
}
@media (min-width: 1920px) and (max-width: 2249px) {
  body {
    --magic: 1080px;
  }
}
@media (min-width: 2250px) and (max-width: 2299px) {
  body {
    --magic: 1125px;
  }
}
@media (min-width: 2300px) and (max-width: 2449px) {
  body {
    --magic: 1152px;
  }
}
@media (min-width: 2450px) and (max-width: 2679px) {
  body {
    --magic: 1242px;
  }
}
@media (min-width: 2680px) and (max-width: 2879px) {
  body {
    --magic: 1440px;
  }
}

@media (min-width: 340px) and (max-width: 768px) {
  .woocommerce-product-gallery__image {
    overflow: hidden;
  }
  .woocommerce-product-gallery__image img.wp-post-image {
    width: var(--magic);
    transform: translatex(calc((var(--magic) - 100vw) / -2));
    /* deprecated margin-left:  calc((var(--magic) - 100vw) / -2) */
  }
}
@media (min-width: 768px) and (max-width: 2879px) {
  main .product .woocommerce-product-gallery {
    width: var(--magic);
  }
  main .product .summary {
    width: calc(100% - var(--magic));
  }
}
/* 2880 */
@media (min-width: 2880px) {
  main .product .summary {
    width: 1440px;
  }
}
#footer {
  background: var(--bg-color);
  margin-top: 4em;
  min-height: 20vh;
  padding: 2em 0 0 0;
  /* Layout moved to central pattern in style.scss */
}
#footer .footer-columns {
  display: grid;
  gap: 2em;
  justify-content: space-around;
}
#footer .footer-col {
  display: grid;
  justify-items: center;
}
#footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#footer li {
  display: flex;
  justify-content: center;
}
#footer a {
  text-decoration: none;
  color: var(--link-color);
}
#footer h2 {
  font-size: 1.4em;
  margin: 0;
}
#footer #copyright {
  text-align: center;
  padding: 5em 0;
}
@media (min-width: 768px) {
  #footer .footer-columns {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

body {
  color: var(--text-color);
  font-size: var(--font-size);
  background-color: var(--bg-color);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.35;
}

/* Central responsive layout pattern - elements that should be constrained to max-width and centered */
header > *,
article > *,
section > *,
footer > *,
.wp-block-embed,
.wp-block-image,
.wp-block-pullquote,
figcaption,
section > table,
.woocommerce-order > *,
.footer-columns {
  max-width: var(--max-width);
  margin-inline: auto;
}

.alignwide {
  --max-width: var(--wide-width);
}

main a, .product a {
  color: var(--link-color);
  font-weight: 400;
  font-variant: normal;
  text-decoration: none;
}
main a:hover, .product a:hover {
  text-decoration: underline;
}
