:root {
  --lto-orange: #e8631f;
  --lto-orange-dark: #c4501a;
  --lto-ink: #1b1912;
  --lto-cream: #f6f3eb;
  --lto-cream-dark: #efebdf;
  --lto-teal: #3e7c77;
}

[data-theme="light"] {
  --background-color: var(--lto-cream);
  --primary-foreground-color: #4a473e;
  --secondary-foreground-color: var(--lto-ink);
  --primary-subtle-color: var(--lto-orange) !important;
  --secondary-subtle-color: var(--lto-cream-dark);
  --titles-color: var(--lto-ink);
  --link-color: var(--lto-teal);
  --primary-border-color: #c9c0ae;
  --secondary-border-color: #ddd6c7;
  --footer-background-color: var(--lto-ink);
  --transparent-background-color: rgba(246, 243, 235, 0.98);
  --header-menu-gradient-second-color: var(--lto-cream);
}

[data-theme="dark"] {
  --background-color: #11100c;
  --primary-foreground-color: #d7d1c5;
  --secondary-foreground-color: #ffffff;
  --primary-subtle-color: var(--lto-orange) !important;
  --secondary-subtle-color: #211e17;
  --titles-color: #f6f3eb;
  --link-color: #78aaa5;
  --footer-background-color: #080704;
}

body,
button,
input,
textarea {
  font-family: "Work Sans", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.m-nav,
.m-button,
.m-heading__meta,
.m-article-card__tag,
.m-featured-article__tag,
.m-pagination {
  font-family: "Oswald", "Arial Narrow", sans-serif;
}

.m-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.m-nav .nav-current > a,
.m-nav a:hover {
  color: var(--lto-orange) !important;
}

.lto-logo img,
.m-logo.lto-logo img {
  height: 73px !important;
  max-height: 73px !important;
  width: auto !important;
}

@media (min-width: 768px) {
  .m-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .m-nav {
    height: 73px;
    overflow-y: visible;
  }

  .m-logo.lto-logo {
    height: 73px;
  }

  .m-nav__left {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.m-header.with-picture {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.m-header.with-picture .m-menu__main {
  background: rgba(246, 243, 235, 0.96);
}

.m-header.with-picture .m-nav a,
.m-header.with-picture .m-icon-button {
  color: var(--lto-ink);
}

.lto-hero {
  position: relative;
  height: clamp(520px, 68vh, 760px);
  overflow: hidden;
  background: var(--lto-ink);
}

.lto-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(27, 25, 18, 0.08), rgba(27, 25, 18, 0.16));
  pointer-events: none;
}

.lto-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease;
}

.lto-hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.lto-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: lto-hero-pan 16s ease-in-out infinite alternate;
}

@keyframes lto-hero-pan {
  from { transform: scale(1.04); }
  to { transform: scale(1.11) translate3d(-0.7%, -0.7%, 0); }
}

.lto-hero__captions {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 110px 30px 50px;
  pointer-events: none;
}

.lto-hero__caption {
  grid-area: 1 / 1;
  max-width: 12ch;
  margin: 0;
  color: #ffffff;
  font-family: "Great Vibes", cursive;
  font-size: clamp(54px, 8vw, 118px);
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.lto-hero__caption.is-active {
  opacity: 1;
  transform: translateY(0);
}

.lto-hero__dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.lto-hero__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  background: transparent;
}

.lto-hero__dot.is-active {
  border-color: var(--lto-orange);
  background: var(--lto-orange);
}

.m-article-card,
.m-featured-article {
  border: 1px solid rgba(221, 214, 199, 0.75);
}

.m-button.filled,
.l-post-content .kg-button-card a.kg-btn,
.l-post-content button:not(.m-icon-button) {
  background-color: var(--lto-orange);
}

.m-button.filled:hover,
.l-post-content .kg-button-card a.kg-btn:hover {
  background-color: var(--lto-orange-dark);
}

/* Keep post feature photography readable instead of forcing every image into
   Liebling's full-viewport cover crop. */
.post-template .m-hero.with-picture {
  min-height: 0;
  overflow: visible;
  padding: 117px 24px 0;
  background: var(--background-color);
}

.post-template .m-hero__picture.in-post {
  position: relative;
  inset: auto;
  width: min(1180px, 100%);
  height: auto;
  max-height: none;
  overflow: hidden;
  border-radius: 10px;
  background: var(--secondary-subtle-color);
  box-shadow: var(--article-shadow-normal);
}

.post-template .m-hero__picture.in-post img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(620px, 68vh);
  margin: 0 auto;
  object-fit: contain;
}

.lto-blog-page {
  padding-top: 96px;
}

.lto-blog-heading {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 30px 24px;
  text-align: center;
}

.lto-blog-heading p {
  margin: 0 0 8px;
  color: var(--lto-orange);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lto-blog-heading h1 {
  margin: 0 0 10px;
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.lto-blog-heading span {
  color: var(--primary-foreground-color);
  font-size: 1.05rem;
}

.lto-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 64px;
}

.lto-load-more[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.lto-contact-page {
  padding-top: 93px;
}

.lto-contact-hero {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 60px 24px;
  color: #ffffff;
  text-align: center;
  background:
    linear-gradient(rgba(27, 25, 18, 0.48), rgba(27, 25, 18, 0.58)),
    url("../images/bg-contacts.jpg") center / cover no-repeat;
}

.lto-contact-hero p {
  margin: 0 0 8px;
  color: var(--lto-orange);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lto-contact-hero h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.lto-contact-hero span {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.lto-contact-layout {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
}

.lto-contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lto-contact-detail,
.lto-contact-form-panel {
  border: 1px solid var(--secondary-border-color);
  border-radius: 12px;
  background: var(--background-color);
  box-shadow: var(--article-shadow-normal);
}

.lto-contact-detail {
  padding: 24px;
}

.lto-contact-detail__label {
  display: block;
  margin-bottom: 6px;
  color: var(--lto-orange);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lto-contact-detail a,
.lto-contact-detail address {
  color: var(--titles-color);
  font-size: 1rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.lto-contact-map {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--secondary-border-color);
  border-radius: 12px;
}

.lto-contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

.lto-contact-form-panel {
  padding: clamp(28px, 5vw, 48px);
}

.lto-contact-form-panel > h2,
.lto-contact-success h2 {
  margin: 0 0 8px;
  color: var(--titles-color);
  font-size: clamp(2rem, 4vw, 3rem);
}

.lto-contact-form-panel > p {
  margin: 0 0 30px;
}

.lto-contact-form {
  display: grid;
  gap: 20px;
}

.lto-contact-field {
  display: grid;
  gap: 7px;
}

.lto-contact-field label {
  color: var(--titles-color);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
}

.lto-contact-field input,
.lto-contact-field textarea {
  width: 100%;
  border: 1px solid var(--primary-border-color);
  border-radius: 7px;
  background: var(--background-color);
  color: var(--secondary-foreground-color);
  font: inherit;
  padding: 13px 14px;
}

.lto-contact-field input:focus,
.lto-contact-field textarea:focus {
  border-color: var(--lto-orange);
  outline: 3px solid rgba(232, 99, 31, 0.18);
}

.lto-contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.lto-contact-consent input {
  margin-top: 3px;
  accent-color: var(--lto-orange);
}

.lto-contact-submit {
  justify-self: start;
  border: 0;
}

.lto-contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
}

.lto-contact-success {
  margin-bottom: 28px;
  border-left: 4px solid var(--lto-teal);
  border-radius: 6px;
  background: var(--secondary-subtle-color);
  padding: 20px 22px;
}

.lto-contact-success p {
  margin: 0;
}

.page-about .l-post-content .kg-image-card {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  margin: 46px auto 0 !important;
}

.page-about .l-post-content .kg-image-card img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--article-shadow-normal);
}

.page-about .l-post-content .kg-image-card figcaption {
  padding-top: 10px;
  font-size: 0.82rem;
  text-align: center;
}

.lto-memories-page {
  padding-top: 93px;
}

.lto-memories-hero {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 70px 24px;
  text-align: center;
  background: var(--lto-cream-dark);
}

.lto-memories-hero p,
.lto-section-heading p,
.lto-memory-share__intro > p {
  margin: 0;
  color: var(--lto-orange);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lto-memories-hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
}

.lto-memories-hero > span {
  max-width: 680px;
  margin-bottom: 14px;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.lto-memories-gallery {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0;
}

.lto-section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.lto-section-heading h2,
.lto-memory-share__intro h2 {
  margin: 6px 0 0;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
}

.lto-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.lto-memory-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--secondary-subtle-color);
  box-shadow: var(--article-shadow-normal);
}

.lto-memory-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.lto-memory-item:hover img,
.lto-memory-item:focus-visible img {
  transform: scale(1.045);
}

.lto-memory-share {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 56px;
  padding: 76px max(24px, calc((100% - 1180px) / 2));
  background: var(--secondary-subtle-color);
  scroll-margin-top: 110px;
}

.lto-memory-share__intro > span {
  display: block;
  margin-top: 20px;
  line-height: 1.65;
}

.lto-memory-share__intro ul {
  margin: 26px 0 0;
  padding-left: 20px;
  list-style: disc;
}

.lto-memory-share__intro li {
  margin-bottom: 8px;
}

.lto-memory-form-panel {
  border: 1px solid var(--secondary-border-color);
  border-radius: 12px;
  background: var(--background-color);
  box-shadow: var(--article-shadow-normal);
  padding: clamp(28px, 5vw, 48px);
}

.lto-memory-form {
  display: grid;
  gap: 20px;
}

.lto-memory-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lto-memory-upload {
  display: grid;
  gap: 9px;
  border: 2px dashed var(--primary-border-color);
  border-radius: 10px;
  padding: 22px;
}

.lto-memory-upload > label {
  color: var(--titles-color);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
}

.lto-memory-upload > span {
  font-size: 0.84rem;
}

.lto-memory-preview {
  width: min(100%, 360px);
  max-height: 260px;
  margin-top: 10px;
  border-radius: 8px;
  object-fit: cover;
}

.lto-memory-file-error {
  margin: 0;
  color: #b3261e;
  font-size: 0.88rem;
  font-weight: 600;
}

.lto-memory-submit {
  justify-self: start;
  border: 0;
}

.lto-footer {
  --lto-footer-surface: #eaf7fa;
  --lto-footer-text: #496474;
  --lto-footer-title: #063f5a;
  background: var(--lto-footer-surface);
  color: var(--lto-footer-text);
}

.lto-footer__top {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0 66px;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.42fr) minmax(0, 0.9fr);
  gap: 30px;
}

.lto-footer__menu-column {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.lto-footer__heading {
  margin: 0 0 22px;
  color: var(--lto-footer-title);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-transform: uppercase;
}

.lto-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lto-footer__links li + li {
  margin-top: 9px;
}

.lto-footer__links a {
  color: var(--lto-footer-text);
  font-size: 0.9rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.lto-footer__links a:hover,
.lto-footer__links a:focus-visible {
  color: var(--lto-orange);
}

.lto-footer__follow-copy {
  max-width: 360px;
  margin: 0 0 25px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.lto-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lto-footer__social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 100, 116, 0.3);
  border-radius: 50%;
  color: #78909c;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lto-footer__social a:hover,
.lto-footer__social a:focus-visible {
  border-color: var(--lto-orange);
  color: var(--lto-orange);
  transform: translateY(-2px);
}

.lto-footer__social span {
  font-size: 0.9rem;
}

.lto-footer__donate input[type="image"] {
  display: block;
  width: auto;
  max-width: 148px;
  height: auto;
}

.lto-footer__brand {
  min-height: 250px;
  padding: 46px 24px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(73, 100, 116, 0.16);
  text-align: center;
}

.lto-footer__tagline {
  max-width: 740px;
  color: var(--lto-footer-title);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.25rem, 4.25vw, 3.35rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.18;
  text-transform: uppercase;
}

.lto-footer__tagline:hover,
.lto-footer__tagline:focus-visible {
  color: var(--lto-orange);
}

.lto-footer__divider {
  width: 1px;
  height: 46px;
  margin: 20px 0 34px;
  background: rgba(73, 100, 116, 0.34);
}

.lto-footer__social--brand {
  gap: 16px;
}

.lto-footer__social--brand a {
  width: 34px;
  height: 34px;
  border-radius: 0;
  transform: rotate(45deg);
}

.lto-footer__social--brand a span {
  transform: rotate(-45deg);
}

.lto-footer__social--brand a:hover,
.lto-footer__social--brand a:focus-visible {
  transform: rotate(45deg) translate(-2px, -2px);
}

.lto-footer__legal {
  padding: 19px 24px;
  border-top: 1px solid rgba(73, 100, 116, 0.16);
  color: var(--lto-footer-text);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 767px) {
  .lto-logo img,
  .m-logo.lto-logo img {
    height: 58px !important;
    max-height: 58px !important;
  }

  .lto-hero {
    height: 68vh;
    min-height: 480px;
  }

  .lto-hero__captions {
    padding-top: 90px;
  }

  .lto-hero__caption {
    font-size: clamp(46px, 14vw, 76px);
  }

  .lto-blog-page {
    padding-top: 65px;
  }

  .lto-blog-heading {
    padding-top: 44px;
  }

  .post-template .m-hero.with-picture {
    padding: 88px 12px 0;
  }

  .post-template .m-hero__picture.in-post {
    border-radius: 7px;
  }

  .post-template .m-hero__picture.in-post img {
    width: 100%;
    max-height: none;
  }

  .lto-contact-page {
    padding-top: 65px;
  }

  .lto-contact-layout {
    width: min(100% - 32px, 720px);
    padding: 44px 0;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .page-about .l-post-content .kg-image-card {
    width: min(78vw, 340px) !important;
    margin-top: 32px !important;
  }

  .lto-memories-page {
    padding-top: 65px;
  }

  .lto-memories-hero {
    min-height: 330px;
  }

  .lto-memories-gallery {
    width: min(100% - 32px, 720px);
    padding: 48px 0;
  }

  .lto-memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .lto-memory-share {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 16px;
  }

  .lto-memory-form__row {
    grid-template-columns: 1fr;
  }

  .lto-footer__top {
    width: min(100% - 40px, 560px);
    padding: 52px 0 58px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .lto-footer__menu-column {
    gap: 44px;
  }

  .lto-footer__heading {
    margin-bottom: 16px;
  }

  .lto-footer__brand {
    min-height: 245px;
    padding: 48px 20px 44px;
  }

  .lto-footer__tagline {
    max-width: 14ch;
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: 0.08em;
  }
}

@media (max-width: 520px) {
  .lto-memory-grid {
    grid-template-columns: 1fr;
  }

  .lto-memory-item {
    max-width: 390px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lto-hero__slide img {
    animation: none;
  }

  .lto-hero__slide,
  .lto-hero__caption {
    transition: none;
  }
}

/* Header and post-image cleanup */
@media (min-width: 768px) {
  .m-nav__right::before {
    display: none;
    content: none;
  }
}

.post-template .m-hero__picture.in-post {
  width: fit-content;
  max-width: 100%;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.post-template .m-hero__picture.in-post img {
  display: block;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 767px) {
  .post-template .m-hero__picture.in-post {
    width: 100%;
  }
}