:root {
  color-scheme: light dark;

  --bg: #f2f6ed;
  --bg-accent: #e4edd7;
  --surface: #ffffff;
  --surface-soft: #f4f8ef;
  --text: #22301f;
  --muted: #55664d;
  --brand: #5c743d;
  --brand-strong: #4a5d32;
  --accent: #6f8b4c;
  --line: #d0dbca;
  --masthead-bg: linear-gradient(
    90deg,
    #f3f7ef 0%,
    #e3ebd7 26%,
    #bed09f 58%,
    #5c743d 100%
  );
  --header-bg: var(--masthead-bg);
  --topnav-bg: var(--masthead-bg);
  --footer-bg: #1c2a21;
  --footer-text: #eaf2ea;
  --btn-text: #f7fefb;
  --btn-bg: linear-gradient(135deg, #7f9d5b 0%, #5c743d 100%);
  --btn-bg-hover: linear-gradient(135deg, #93b66a 0%, #678346 100%);
  --topnav-text: #f7ffef;
  --topnav-link-bg: rgba(255, 255, 255, 0.09);
  --topnav-link-border: rgba(255, 255, 255, 0.3);
  --topnav-link-bg-hover: rgba(255, 255, 255, 0.2);
  --topnav-link-border-hover: rgba(255, 255, 255, 0.52);
  --shadow: 0 14px 32px rgba(28, 42, 33, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a11;
    --bg-accent: #1b2616;
    --surface: #1a2416;
    --surface-soft: #202d1b;
    --text: #e8efe0;
    --muted: #b6c8ad;
    --brand: #9ec37a;
    --brand-strong: #84a364;
    --accent: #b9d395;
    --line: #314028;
    --masthead-bg: linear-gradient(
      90deg,
      #f3f7ef 0%,
      #e3ebd7 26%,
      #bed09f 58%,
      #5c743d 100%
    );
    --header-bg: var(--masthead-bg);
    --topnav-bg: var(--masthead-bg);
    --footer-bg: #0f170c;
    --footer-text: #e0ebd7;
    --btn-text: #f2fbf7;
    --btn-bg: linear-gradient(135deg, #7ea35d 0%, #607d44 100%);
    --btn-bg-hover: linear-gradient(135deg, #93b66f 0%, #6f9050 100%);
    --topnav-text: #eff9e4;
    --topnav-link-bg: rgba(255, 255, 255, 0.08);
    --topnav-link-border: rgba(255, 255, 255, 0.25);
    --topnav-link-bg-hover: rgba(255, 255, 255, 0.16);
    --topnav-link-border-hover: rgba(255, 255, 255, 0.44);
    --shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: 135%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 20% -20%,
      var(--bg-accent) 0%,
      rgba(0, 0, 0, 0) 46%
    ),
    linear-gradient(
      180deg,
      var(--bg-accent) 0%,
      var(--bg) 240px,
      var(--bg) 100%
    );
  color: var(--text);
  font:
    1rem "Trebuchet MS",
    "Segoe UI",
    Tahoma,
    Geneva,
    Verdana,
    sans-serif;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.site-shell {
  max-width: 1100px;
  margin: 24px auto 30px;
  padding: 0 16px;
}

.masthead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 150px;
  background: var(--masthead-bg);
}

.site-header {
  width: 100%;
  background: transparent;
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 320px) 1fr;
  z-index: 2;
  min-height: 120px;
}

.fx-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  mix-blend-mode: normal;
  contain: strict;
}

.header-logo {
  overflow: hidden;
  border-right: 1px solid var(--line);
  position: relative;
  z-index: 1;
  padding: 20px;
  display: grid;
  align-items: center;
  background: transparent;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-brand {
  min-height: 101px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 12px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.header-brand a {
  color: #f8fef0;
  font-size: clamp(1.15rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-shadow:
    0 1px 0 rgba(36, 46, 26, 0.5),
    0 2px 12px rgba(12, 21, 10, 0.35);
}

.header-tagline {
  margin: 0;
  color: #eff9e0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(15, 23, 12, 0.35);
}

.site-topnav {
  width: 100%;
  border: 0;
  border-top: 0;
  background: transparent;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--topnav-text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  position: relative;
  z-index: 2;
  min-height: 30px;
}

.topnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.topnav-list a {
  display: inline-block;
  padding: 4px 1px;
  border-radius: 0;
  color: #fbfff4;
  font-size: 0.84rem;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  letter-spacing: 0.12em;
  text-shadow:
    0 1px 1px rgba(6, 13, 8, 0.75),
    0 0 8px rgba(249, 255, 233, 0.42);
  -webkit-text-stroke: 0.35px rgba(24, 40, 15, 0.72);
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.topnav-list a:hover {
  color: #ffffff;
  filter: none;
  text-shadow:
    0 0 8px rgba(255, 255, 218, 0.62),
    0 2px 8px rgba(17, 27, 13, 0.45);
  transform: translateY(-1px);
}

.topnav-list a[aria-current="page"] {
  color: #fff9cc;
  text-shadow:
    0 0 10px rgba(255, 255, 206, 0.9),
    0 0 18px rgba(255, 255, 231, 0.68),
    0 2px 8px rgba(18, 31, 13, 0.6);
  transform: translateY(-1px) scale(1.08);
  position: relative;
}

.topnav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a3d1d 0%, #5c743d 40%, #f3cc64 100%);
  box-shadow:
    0 0 6px rgba(243, 204, 100, 0.55),
    0 1px 0 rgba(25, 39, 17, 0.7);
}

.nav-date {
  opacity: 0.94;
  font-size: 0.75rem;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(17, 27, 13, 0.35);
}

.site-main {
  width: 100%;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
  padding: 26px;
}

.site-footer {
  width: 100%;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 24px;
}

.page-content {
  width: min(980px, 100%);
  margin-inline: auto;
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: var(--brand);
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.page-intro {
  color: var(--muted);
  max-width: 70ch;
  margin: 0 0 20px;
  font-size: 1.02rem;
}

p {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.home-hero__logo-wrap {
  display: grid;
  place-items: center;
  background: var(--surface);
  min-height: 190px;
  padding: 12px;
}

.home-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.panel--soft {
  background: var(--surface-soft);
}

.home-content,
.home-sidebar {
  padding: 20px;
}

.home-content {
  font-size: 1.02rem;
}

.home-sidebar {
  color: var(--muted);
  font-size: 0.98rem;
}

.home-sidebar a {
  font-weight: 700;
}

.home-sidebar p {
  margin: 0 0 14px;
}

.subhead {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.gallery-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.gallery-card a {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 230px;
  padding: 14px;
  text-align: center;
}

.gallery-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  transition:
    transform 0.24s ease,
    filter 0.24s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
  filter: saturate(1.06);
}

.gallery-card__title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.gallery-card__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.cta-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

.gallery-pagination {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.gallery-pagination__status {
  color: var(--muted);
  font-weight: 700;
}

.rock-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  gap: 22px;
  align-items: start;
}

.rock-detail__image {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
}

.rock-detail__image img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.26s ease;
}

.rock-detail__image:hover img {
  transform: scale(1.03);
}

.product-meta {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.product-meta div {
  display: grid;
  gap: 2px;
}

.product-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.product-meta dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.rock-detail__nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rock-detail__spacer {
  flex: 1;
}

.tour-lead {
  display: flow-root;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}

.tour-lead__photo {
  float: right;
  margin-left: 16px;
  margin-bottom: 8px;
  width: min(42%, 320px);
  border-radius: 10px;
  border: 1px solid var(--line);
  transition: transform 0.24s ease;
}

.tour-lead__photo:hover {
  transform: scale(1.02);
}

.tour-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.tour-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px;
}

.tour-card h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tour-card p {
  margin: 0 0 9px;
  font-size: 1rem;
}

.notfound-card {
  padding: 18px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 20px;
}

.footer-block h3 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 4px;
}

.footer-nav {
  display: grid;
  gap: 6px;
}

.footer-nav a,
.footer-block a {
  display: inline-block;
  width: fit-content;
  transition:
    color 0.16s ease,
    transform 0.16s ease,
    text-shadow 0.16s ease;
}

.footer-nav a,
.footer-block a {
  color: var(--footer-text);
  font-size: 0.96rem;
}

.footer-nav a:hover,
.footer-block a:hover {
  color: #ffffff;
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-block a:hover,
.footer-block a:focus-visible {
  color: #fff7b9;
  transform: translateX(3px) scale(1.03);
  text-shadow:
    0 0 8px rgba(255, 246, 181, 0.6),
    0 0 14px rgba(255, 255, 255, 0.35);
  outline: none;
}

.footer-contact {
  font-style: normal;
  font-size: 0.96rem;
  line-height: 1.55;
}

.btn-link {
  min-width: 170px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn-link:hover,
.btn-link:focus-visible {
  background: var(--btn-bg-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  outline: none;
}

@media (max-width: 980px) {
  .site-shell {
    margin-top: 0;
    padding: 0 12px 12px;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .nav-date {
    width: 100%;
    padding-top: 2px;
  }

  .rock-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding: 14px;
  }

  .header-brand {
    padding: 10px 12px;
  }

  .site-topnav {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .topnav-list {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-topnav a {
    font-size: 0.67rem;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero a {
    display: none;
  }

  .tour-lead__photo {
    float: none;
    width: 100%;
    margin: 0 0 12px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
