/* Main front-end stylesheet for Sylwia Atmosphere theme. */

:root {
  --shadow-soft: 0 18px 38px rgba(20, 25, 21, 0.28);
  --surface: rgba(255, 243, 215, 0.93);
  --surface-strong: rgba(21, 39, 34, 0.88);
  --radius-lg: 26px;
  --radius-md: 16px;
  --anchor-offset: 118px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #0f1c18;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

html.is-anchor-scrolling {
  scroll-snap-type: none !important;
}

body {
  font-family: "Lora", Georgia, serif;
  color: var(--tone-ink);
  background-image:
    linear-gradient(118deg, rgba(16, 34, 28, 0.7), rgba(231, 196, 108, 0.26)),
    radial-gradient(circle at 82% 12%, rgba(242, 106, 47, 0.32), transparent 34%),
    url("../img/bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.site-header {
  position: fixed;
  top: 42px;
  left: calc(50% + 10px);
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 50px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 2.4vw, 28px);
  border-radius: 999px;
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(6, 16, 14, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  color: #edf5f0;
  box-shadow: 0 20px 42px rgba(2, 6, 5, 0.42);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: nav-enter 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: visible;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
}

.site-header .navbar-toggler {
  width: 52px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 0;
  border-radius: 14px;
  background: rgba(7, 19, 16, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(49, 181, 123, 0.22);
}

.site-header .navbar-toggler-icon {
  width: 1.36rem;
  height: 1.36rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(243,250,246,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.site-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding-left: 104px;
}

.site-logo-preview {
  position: absolute;
  left: -62px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 160px;
  border-radius: 12px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.0);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  transform: none;
  transform-origin: center;
  filter: drop-shadow(0 3px 8px rgba(2, 8, 6, 0.26));
}

.site-logo-preview .custom-logo-link {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.site-logo-preview .custom-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-title {
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  font-size: clamp(1rem, 0.88rem + 0.8vw, 1.42rem);
  font-weight: 700;
  line-height: 1;
  color: #f4fbf7;
  text-shadow: 0 1px 8px rgba(4, 10, 9, 0.28);
}

.site-tagline {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(240, 248, 244, 0.84);
}

.site-brand-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.primary-menu ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.primary-menu {
  margin-left: auto;
}

.primary-menu .navbar-nav {
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.primary-menu a {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.primary-menu .nav-link {
  color: #edf7f2;
  opacity: 0.9;
  position: relative;
}

.primary-menu .nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(240, 248, 244, 0.95);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
  transform: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  opacity: 1;
}

.primary-menu a:hover::after,
.primary-menu a:focus-visible::after {
  transform: scaleX(1);
}

@media (min-width: 992px) {
  .site-header .navbar-toggler {
    display: none;
  }

  .site-header .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}

.scroll-showcase {
  margin-top: 0;
}

/* Keep background-carrying sections truly edge-to-edge even if parent wrappers add constraints. */
.hero,
.story-sticky {
  width: 100vw;
  width: 100dvw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* iOS Safari safe-area compensation for real devices with side insets. */
@supports (padding: max(0px)) {
  .hero,
  .story-sticky {
    width: calc(100dvw + env(safe-area-inset-left) + env(safe-area-inset-right));
    margin-left: calc(50% - 50vw - env(safe-area-inset-left));
    margin-right: calc(50% - 50vw - env(safe-area-inset-right));
  }
}

.snap-section {
  scroll-snap-align: start;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal-on-scroll.delay-1 {
  transition-delay: 0.09s;
}

.reveal-on-scroll.delay-2 {
  transition-delay: 0.18s;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: min(44vh, 340px);
  border-radius: 999px;
  background: rgba(255, 243, 215, 0.24);
  overflow: hidden;
  z-index: 60;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to bottom, var(--tone-fresh), var(--tone-accent));
  transform-origin: top;
  transform: scaleY(0);
}

.hero {
  --hero-bg-h: url("../img/bg.jpg");
  --hero-bg-v: url("../img/vbg.jpg");
  --hero-bg-active: var(--hero-bg-h);
  margin-top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: clamp(120px, 18vh, 180px) clamp(20px, 8vw, 120px) clamp(56px, 10vh, 110px);
  border-radius: 0;
  background-image: var(--hero-bg-active);
  background-size: cover;
  background-position: center;
  box-shadow: none;
  animation: none;
  position: relative;
}

@media (orientation: portrait) {
  .hero {
    --hero-bg-active: var(--hero-bg-v, var(--hero-bg-h));
  }
}

.hero::after {
  content: none;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c3a2f;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.06em;
  line-height: 0.9;
  font-size: clamp(3.4rem, 2.7rem + 6.4vw, 8.6rem);
  margin: 0;
  color: #ffffff;
  text-shadow:
    0 4px 10px rgba(0, 0, 0, 0.42),
    0 10px 28px rgba(0, 0, 0, 0.36),
    0 0 2px rgba(0, 0, 0, 0.4);
}

.hero p {
  margin: 18px 0 0;
  max-width: 42ch;
  color: #ffffff;
  font-size: clamp(1.06rem, 1rem + 0.58vw, 1.44rem);
  line-height: 1.55;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.42);
}

.scroll-hint {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.46);
}

.scroll-hint span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--tone-accent), var(--tone-fresh));
  animation: pulse 1.8s ease infinite;
}

.story-track {
  margin-top: 0;
}

.story-step {
  min-height: 120vh;
  position: relative;
}

.story-sticky {
  --step-bg-active: var(--step-bg-h, var(--step-bg, url("../img/bg.jpg")));
  position: sticky;
  top: 0;
  min-height: 100vh;
  border-radius: 0;
  background-image:
    linear-gradient(122deg, rgba(16, 33, 28, 0.72), rgba(14, 28, 24, 0.4)),
    linear-gradient(12deg, rgba(242, 106, 47, 0.26), rgba(49, 181, 123, 0.2)),
    var(--step-bg-active),
    url("../img/bg.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: none;
  color: var(--tone-cream);
  display: grid;
  grid-template-columns: 72px minmax(0, 840px);
  gap: 18px;
  align-content: end;
  padding: clamp(24px, 6vw, 86px) clamp(20px, 8vw, 120px) clamp(56px, 12vh, 108px);
  backdrop-filter: blur(2px);
  overflow: visible;
}

.story-sticky.story-sticky--content-bottom {
  align-content: end;
}

.story-sticky.story-sticky--content-top {
  align-content: start;
  padding-top: clamp(96px, 12vh, 150px);
  padding-bottom: clamp(26px, 5vh, 64px);
}

@media (orientation: portrait) {
  .story-sticky {
    --step-bg-active: var(--step-bg-v, var(--step-bg-h, var(--step-bg, url("../img/bg.jpg"))));
  }
}

.story-sticky::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(14, 24, 21, 0.78), rgba(14, 24, 21, 0));
}

.story-index {
  position: relative;
  z-index: 1;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2rem, 1.7rem + 1.8vw, 3.2rem);
  letter-spacing: 0.08em;
  color: rgba(255, 243, 215, 0.84);
}

.story-copy {
  position: relative;
  z-index: 1;
}



.story-copy > h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.06em;
  font-size: clamp(2.2rem, 1.8rem + 2.2vw, 4rem);
  line-height: 0.92;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.story-copy > h2 a {
  color: inherit;
  text-decoration: none;
}

.story-copy > h2 a:hover,
.story-copy > h2 a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.story-copy > p {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  max-width: 44ch;
  font-size: clamp(1.02rem, 0.96rem + 0.34vw, 1.24rem);
  line-height: 1.58;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.story-rich-content {
  margin-top: 16px;
  max-width: min(74vw, 840px);
  /*max-height: min(58vh, 620px);*/
  overflow: auto;
  padding-right: 8px;
}

.story-rich-content > :first-child {
  margin-top: 0;
}

.story-rich-content p,
.story-rich-content li {
  margin: 0 0 1em;
  color: #f2f7f1;
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem);
  line-height: 1.65;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.story-rich-content h2,
.story-rich-content h3,
.story-rich-content h4 {
  margin: 0 0 0.45em;
  color: #fff7e7;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.story-rich-content ul,
.story-rich-content ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.story-rich-content a {
  color: #f7d98f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.story-rich-content .wp-block-columns {
  gap: clamp(14px, 2vw, 28px);
  margin-bottom: 1.15em;
}

.story-rich-content .wp-block-column {
  min-width: 0;
}

.story-rich-content .wp-block-group,
.story-rich-content .wp-block-cover,
.story-rich-content .wp-block-media-text,
.story-rich-content .wp-block-image {
  margin-bottom: 1.1em;
}

.story-rich-content::-webkit-scrollbar {
  width: 8px;
}

.story-rich-content::-webkit-scrollbar-thumb {
  background: rgba(255, 243, 215, 0.45);
  border-radius: 999px;
}

.story-step--1 {
  --step-bg: url("../img/bg1.jpg");
}

.story-step--2 {
  --step-bg: url("../img/bg2.jpg");
}

.story-step--3 {
  --step-bg: url("../img/bg3.jpg");
}

.cards {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translateY(16px);
  opacity: 0;
  animation: drift-up 0.7s ease forwards;
}

.card:nth-child(2) {
  animation-delay: 0.12s;
}

.card:nth-child(3) {
  animation-delay: 0.24s;
}

.card h3 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.callout {
  margin-top: 24px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--tone-cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.contact-panel {
  margin-top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(34px, 8vw, 120px);
  border-radius: 0;
  color: var(--tone-cream);
  background-image:
    linear-gradient(128deg, rgba(14, 24, 21, 0.82), rgba(20, 38, 32, 0.58)),
    url("../img/bg3.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: none;
}

.contact-panel h3 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.05em;
  font-size: clamp(2.2rem, 1.8rem + 2.2vw, 4.2rem);
  line-height: 0.92;
}

.contact-panel p {
  margin: 16px 0 24px;
  max-width: 48ch;
  color: #eef4e7;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.22rem);
  line-height: 1.58;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--tone-accent);
  color: var(--tone-cream);
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
  transition: filter 0.24s ease;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.08);
}

.content-wrap {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(244, 236, 215, 0.95);
  box-shadow: var(--shadow-soft);
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(31, 37, 33, 0.15);
}

.site-footer {
  margin-top: 0;
  padding: 12px 20px 18px;
  text-align: center;
  color: #dce6d7;
  font-size: 0.94rem;
  background: rgba(9, 16, 14, 0.94);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.84);
    opacity: 0.64;
  }

  70% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.84);
    opacity: 0.64;
  }
}

@keyframes nav-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -16px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 980px) {
  :root {
    --anchor-offset: 106px;
  }

  html {
    scroll-snap-type: y proximity;
  }

  .site-header {
    top: 26px;
    left: calc(50% + 8px);
    width: calc(100% - 34px);
    align-items: center;
    padding: 10px 12px;
    border-radius: 999px;
  }

  .site-brand {
    min-height: 52px;
    padding-left: 84px;
  }

  .site-logo-preview {
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
  }

  .site-brand-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .primary-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    margin: 0;
    padding: 0 4px;
    z-index: 70;
  }

  .primary-menu.collapse:not(.show) {
    display: none;
  }

  .primary-menu.collapse.show {
    display: block;
  }

  .primary-menu ul {
    gap: 6px;
  }

  .primary-menu .navbar-nav {
    margin: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(17, 35, 29, 0.12);
    padding: 14px;
    box-shadow: 0 12px 24px rgba(7, 14, 12, 0.14);
  }

  .primary-menu .nav-item {
    width: 100%;
  }

  .primary-menu .nav-link {
    display: block;
    width: 100%;
    min-height: 68px;
    display: flex;
    align-items: center;
    padding: 20px 18px;
    border-radius: 14px;
    color: #142b25;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .primary-menu .nav-link::after {
    background: rgba(20, 43, 37, 0.8);
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-sticky {
    grid-template-columns: 64px 1fr;
    padding: 24px 20px 48px;
  }

  .scroll-progress {
    right: 8px;
    width: 3px;
    height: min(36vh, 220px);
  }
}

@media (max-width: 700px) {
  :root {
    --anchor-offset: 96px;
  }

  body {
    background-image: none;
    background-color: #0f1c18;
    background-attachment: scroll;
  }

  html,
  body {
    overscroll-behavior-y: none;
  }

  .site-header {
    top: 18px;
    left: calc(50% + 6px);
    width: calc(100% - 18px);
    padding: 10px 10px;
    border-radius: 999px;
  }

  .primary-menu {
    top: calc(100% + 8px);
    padding: 0 2px;
  }

  .site-shell {
    width: 100%;
    padding-top: 0;
  }

  .site-brand {
    gap: 8px;
    min-height: 44px;
    padding-left: 76px;
  }

  .site-logo-preview {
    left: -27px;
    width: 110px;
    height: 100px;
  }

  .site-title {
    font-size: clamp(0.95rem, 0.84rem + 1.4vw, 1.12rem);
  }

  .site-tagline {
    font-size: 0.68rem;
  }

  .site-header .navbar-toggler {
    width: 62px;
    height: 56px;
    border-radius: 16px;
  }

  .site-header .navbar-toggler-icon {
    width: 1.56rem;
    height: 1.56rem;
  }

  .hero {
    min-height: 100svh;
    padding: 108px 18px 44px;
    border-radius: 0;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 1.7rem + 7vw, 4.2rem);
    line-height: 0.92;
  }

  .primary-menu ul {
    flex-wrap: nowrap;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .primary-menu .navbar-nav {
    padding: 16px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .story-step {
    min-height: 108vh;
  }

  .story-sticky {
    top: 0;
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 0;
    padding: 96px 18px 40px;
  }

  .story-sticky.story-sticky--content-top {
    padding-top: 96px;
    padding-bottom: 40px;
  }

  .story-index {
    font-size: 1.8rem;
  }

  .story-copy > h2 {
    font-size: clamp(1.7rem, 1.4rem + 4vw, 2.5rem);
  }

  .story-copy > p {
    font-size: 1rem;
    max-width: 31ch;
  }

  .story-rich-content {
    max-width: 100%;
    max-height: min(52svh, 440px);
  }

  .story-rich-content p,
  .story-rich-content li {
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .scroll-progress {
    display: none;
  }

  .callout {
    flex-direction: column;
    align-items: flex-start;
  }

}
