@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400..700&family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&display=swap");


/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --ek-wall: #f6f4ef;              /* warm white page */
  --ek-wall-dark: #ebe7de;         /* deeper section */
  --ek-paper: #ffffff;
  --ek-line: #e2ddd2;

  --ek-ink: #222222;
  --ek-ink-soft: #5c5850;
  --ek-charcoal: #2a2a28;          /* footer, feature band */
  --ek-on-dark: #e9e5dc;

  --ek-oak: #a8743f;               /* decorative accent */
  --ek-oak-deep: #7e5326;          /* oak that reads on white */

  --ek-font-ui: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ek-font-letter: "Cormorant Garamond", Garamond, Georgia, serif;

  --ek-container: 1200px;
  --ek-gutter: clamp(1rem, 4vw, 2.5rem);
  --ek-radius: 4px;
}


/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ek-font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ek-ink);
  background-color: var(--ek-wall);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--ek-oak-deep);
}

a:hover {
  color: var(--ek-ink);
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--ek-font-ui);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ek-ink);
}

p {
  margin: 0 0 1em;
}

p:empty,
h1:empty,
h2:empty,
h3:empty {
  display: none;
}

.lw-content-container {
  max-width: calc(var(--ek-container) + 2 * var(--ek-gutter));
  margin: 0 auto;
  padding: 0 var(--ek-gutter);
}


/* ==========================================================================
   3. Parts that need the theme's scripts or the live shop
   ========================================================================== */

.lw-hamburger-button,
.site-search-wrapper,         /* live product search */
#nav-search,
.social-media-wrapper,        /* icons without links */
.reg-section:has(.ekero-map), /* map without a location */
.pum:not(.pum-active) {       /* catalogue pop-up */
  display: none !important;
}


/* ==========================================================================
   4. Header: logo and menu
   ========================================================================== */

.lw-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--ek-line);
}

.lw-site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: calc(var(--ek-container) + 2 * var(--ek-gutter));
  min-height: 72px;
  margin: 0 auto;
  padding: 0 var(--ek-gutter);
}

.lw-logo-container {
  display: block;
  flex: none;
}

.lw-logo-container img {
  display: block;
  width: auto;
  height: 30px;
}

/* Logo still waiting for the lazy-load script: show it as a background */
.lw-logo-container:has(> img.lazyload) {
  width: 252px;
  height: 30px;
  background: url("/wp-content/uploads/2018/12/ekero%CC%88-logo.png") left center / contain no-repeat;
}

.lw-main-navigation .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lw-main-navigation .menu a {
  position: relative;
  display: block;
  padding: 0.5rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ek-ink);
  text-decoration: none;
}

.lw-main-navigation .menu a:hover {
  color: var(--ek-oak-deep);
}

.lw-main-navigation .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.2rem;
  height: 2px;
  background-color: var(--ek-oak);
}

@media (max-width: 767px) {
  .lw-site-header-inner {
    justify-content: center;
    padding-top: 0.9rem;
  }

  .lw-main-navigation {
    width: calc(100% + 2 * var(--ek-gutter));
    margin-inline: calc(-1 * var(--ek-gutter));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lw-main-navigation::-webkit-scrollbar {
    display: none;
  }

  .lw-main-navigation .menu {
    flex-wrap: nowrap;
    width: max-content;
    padding: 0.25rem calc(var(--ek-gutter) - 0.6rem) 0.4rem;
  }

  .lw-main-navigation .menu a {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
  }
}


/* ==========================================================================
   5. Header photo and the farewell letter
   ========================================================================== */

#header-image,
#header-image.lazyload {
  display: block;
  height: clamp(16rem, 42vw, 32rem);
  background-color: var(--ek-wall-dark);
  background-position: center;
  background-size: cover;
}

/* Home page photo, in case the lazy-load script never swaps it in */
.home #header-image.lazyload {
  background-image: url("/wp-content/uploads/2022/05/NINIX-360-EXTENDABLE-TABLE-NINIX-55T-DINING-CHAIRS-RUG-2543-1-1920x1152-2.jpg") !important;
}

#start-about {
  position: relative;
  z-index: 2;
  padding: 0 var(--ek-gutter);
  margin-top: clamp(-7rem, -10vw, -3rem);
}

.start-about-text {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.75rem);
  background-color: var(--ek-paper);
  box-shadow: 0 30px 60px -36px rgba(34, 34, 34, 0.4);
}

.start-about-text .link h1 {
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem);
  text-align: center;
  border-bottom: 1px solid var(--ek-line);
}

.start-about-text .link h1 span {
  font: inherit;
}

/* The contact line lost its details in the restore ("...finns vi på .") */
.start-about-text .link h3 {
  display: none;
}

/* The letter: pasted text with Arial at 22.5pt on white, evened out */
.start-about-text p,
.start-about-text p[style] {
  margin: 0 0 1em !important;
  font-family: var(--ek-font-letter);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.55;
  color: var(--ek-ink);
  background: none !important;
}

.start-about-text p span[style] {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}

.start-about-text p em,
.start-about-text p i {
  font-style: italic;
  font-weight: 500;
}

/* Signature: "Susanna och Anders" */
.home .start-about-text > p:nth-last-of-type(3) {
  margin-top: 0.25rem !important;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  font-weight: 600;
  color: var(--ek-oak-deep);
}

.home .start-about-text > p:nth-last-of-type(4) {
  margin-top: 1.75rem !important;
}


/* ==========================================================================
   6. Indoor / outdoor band
   ========================================================================== */

#select-furnitures-wrapper {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  color: var(--ek-on-dark);
  background-color: var(--ek-charcoal);
}

#select-furnitures-wrapper .lw-content-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 4rem;
}

/* A choice whose link points nowhere is left out */
.select-furnitures:has(> a.button[href=""]) {
  display: none;
}

.select-furnitures {
  text-align: center;
}

.select-furnitures h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 2rem + 3vw, 4.2rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--ek-font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ek-charcoal);
  text-decoration: none;
  background-color: var(--ek-on-dark);
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.button:hover {
  color: #ffffff;
  background-color: var(--ek-oak);
}


/* ==========================================================================
   7. Presentation (name and the barn) and the photo row
   ========================================================================== */

.reg-section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.reg-section.darker {
  background-color: var(--ek-wall-dark);
}

.reg-section .lw-content-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.reg-content.text h2 {
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.reg-content.text h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: 1.25rem;
  background-color: var(--ek-oak);
}

.reg-content.image img {
  display: block;
  width: 100%;
}

/* The barn photo, in case the lazy-load script never swaps it in */
.home #presentation .reg-content.image:has(> img.lazyload) {
  aspect-ratio: 3 / 2;
  background: url("/wp-content/uploads/2018/12/ladan-web.jpg") center / cover no-repeat;
}

@media (max-width: 767px) {
  .reg-section .lw-content-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Four outdoor-furniture photos as a row (their texts and links are empty) */
#puffar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  background-color: var(--ek-wall);
}

#puffar .puff {
  display: block;
  aspect-ratio: 4 / 5;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

#puffar .puff > * {
  display: none;
}

@media (max-width: 767px) {
  #puffar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==========================================================================
   8. Footer
   ========================================================================== */

.lw-footer-wrapper {
  color: var(--ek-on-dark);
  background-color: var(--ek-charcoal);
}

.lw-footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 2rem;
  max-width: calc(var(--ek-container) + 2 * var(--ek-gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--ek-gutter) 2rem;
}

.footer-title {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.lw-footer-wrapper p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.lw-footer-wrapper strong {
  font-weight: 600;
}

.lw-footer-wrapper a {
  color: #e7c79f;
}

.lw-footer-wrapper a:hover {
  color: #ffffff;
}

.lw-sub-footer-container {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lw-sub-footer-container-inner {
  max-width: calc(var(--ek-container) + 2 * var(--ek-gutter));
  margin: 0 auto;
  padding: 1.1rem var(--ek-gutter) 1.4rem;
  font-size: 0.85rem;
  color: rgba(233, 229, 220, 0.7);
}

.copyright-wrapper p {
  margin: 0;
}


/* ==========================================================================
   9. Catalogue pop-up (Popup Maker), only when it is opened
   ========================================================================== */

.pum.pum-active {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1rem 1rem;
  background-color: rgba(0, 0, 0, 0.55);
}

.pum-container {
  position: relative;
  width: min(640px, 100%);
  padding: 1.5rem;
  background-color: var(--ek-paper);
}

.pum-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  font-size: 1.6rem;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
}


/* ==========================================================================
   10. Focus and motion
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--ek-oak-deep);
  outline-offset: 2px;
}

#select-furnitures-wrapper :focus-visible,
.lw-footer-wrapper :focus-visible {
  outline-color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}