:root {
  --bg: #f6eddf;
  --surface: #fffaf2;
  --surface-soft: #f3eadb;
  --ink: #3a3329;
  --muted: #756b60;
  --line: rgba(92, 78, 62, 0.16);
  --blue: #6f91a6;
  --blue-dark: #526f80;
  --green: #849873;
  --green-soft: #edf2e8;
  --sand: #d9bd83;
  --shadow: 0 24px 70px rgba(95, 74, 52, 0.14);
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fbf4e8 0%, #f7ead8 42%, #f1eadf 100%);
  color: var(--ink);
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #d9bd83, var(--green));
  color: #fff;
  font-weight: 900;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.62rem;
  line-height: 1;
}

.brand small {
  display: block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-action,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.header-action {
  padding: 0 20px;
  background: var(--blue-dark);
  color: #fff;
}

.section-band {
  padding: clamp(48px, 7vw, 92px) clamp(20px, 4vw, 56px);
}

.hero {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(34px, 6vw, 82px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 4.1vw, 4.3rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.05rem, 3.6vw, 3.65rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-lead {
  max-width: 650px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.3vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button {
  gap: 10px;
  padding: 0 22px;
  background: #7f8f64;
  color: #fff;
  box-shadow: 0 16px 34px rgba(126, 107, 71, 0.24);
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  position: absolute;
  inset: 18px -18px -18px 18px;
  border-radius: 8px;
  background: #efe0c2;
  content: "";
}

.hero-visual img {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-finder {
  background: var(--surface);
}

.section-heading {
  max-width: 960px;
  margin-bottom: 42px;
}

.section-intro {
  max-width: 800px;
  margin-top: 18px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.07rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.category-card,
.tutorial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-card {
  min-height: 164px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.category-card:hover,
.category-card.active {
  border-color: rgba(132, 152, 115, 0.58);
  box-shadow: 0 16px 38px rgba(95, 74, 52, 0.1);
  transform: translateY(-2px);
}

.category-card span {
  display: inline-flex;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--sand);
  color: var(--green);
  font-weight: 900;
}

.category-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.product-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.product-toolbar strong,
.product-toolbar span {
  display: block;
}

.product-toolbar span {
  color: var(--muted);
}

.search-box {
  display: grid;
  min-width: min(430px, 100%);
  gap: 7px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
  color: var(--ink);
}

.search-box input:focus,
.modal-close:focus,
.tutorial-card:focus,
.category-card:focus {
  outline: 3px solid rgba(132, 152, 115, 0.25);
  outline-offset: 2px;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tutorial-card {
  display: flex;
  min-height: 306px;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tutorial-card:hover,
.tutorial-card.active {
  border-color: rgba(111, 145, 166, 0.42);
  box-shadow: 0 16px 40px rgba(95, 74, 52, 0.11);
  transform: translateY(-2px);
}

.tutorial-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-soft);
}

.tutorial-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 18px 20px;
}

.tutorial-card .tag {
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-soft);
  color: var(--green);
  font-size: 0.77rem;
  font-weight: 900;
}

.tutorial-card p {
  margin-bottom: 18px;
  color: var(--muted);
}

.watch-label {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  border-bottom: 2px solid var(--sand);
  color: var(--blue-dark);
  font-weight: 900;
}

.empty-card {
  min-height: 180px;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(58, 51, 41, 0.68);
}

.modal-backdrop[hidden] {
  display: none;
}

.video-modal {
  width: min(1120px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(42, 32, 22, 0.36);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 34px) 0;
}

.modal-header .eyebrow {
  margin-bottom: 10px;
}

.modal-header h2 {
  font-size: clamp(1.7rem, 3vw, 3.05rem);
}

.modal-close {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--blue-dark);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 900;
}

.modal-copy {
  max-width: 780px;
  margin: 14px clamp(20px, 3vw, 34px) 24px;
  color: var(--muted);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #181512;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #181512;
}

.video-missing {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(42, 32, 22, 0.78);
  color: #fff;
  backdrop-filter: blur(12px);
}

.video-missing span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  text-align: right;
}

.video-missing.is-hidden {
  display: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.site-footer a {
  color: var(--blue-dark);
  font-weight: 900;
}

@media (max-width: 1320px) {
  .category-grid,
  .tutorial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 920px;
  }

  .category-grid,
  .tutorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .header-action {
    display: none;
  }

  .section-band {
    padding: 46px 18px;
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }

  .category-grid,
  .tutorial-grid {
    grid-template-columns: 1fr;
  }

  .product-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: 12px;
  }

  .video-modal {
    max-height: calc(100vh - 24px);
  }

  .modal-header {
    flex-direction: column;
  }

  .modal-close {
    width: 100%;
  }

  .video-missing {
    position: static;
    flex-direction: column;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
  }

  .video-missing span {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
  }
}
