#home { scroll-margin-block-start: 82px; }

.collection-products.home-featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#homeFeaturedProducts :is(button, a):focus-visible { outline: 2px solid #805542; outline-offset: 2px; }

@media (max-width: 760px) {
  .collection-products.home-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home { scroll-margin-block-start: 70px; }

}
@media (max-width: 360px) {
  .site-header .brand { gap: .45rem; }
  .site-header :is(.profile-btn, .cart-btn) { padding-inline: .33rem; }
}

.home-academy {
  max-width: 1440px;
  margin: clamp(24px, 4vw, 56px) max(3.6vw, 16px) clamp(46px, 7vw, 100px);
  color: var(--ink);
}

@media (min-width: 1550px) {
  .home-academy { margin-inline: auto; }
}

.home-academy-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: .75rem 1.2rem;
  margin-block-end: 1.25rem;
}

.home-academy-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.65rem);
  font-weight: 900;
  line-height: 1.16;
}

.home-academy-heading p { margin: .35rem 0 0; color: var(--theme-accent, #615751); line-height: 1.7; }

.home-academy-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 750;
}

.home-academy-link:hover { border-color: currentColor; }
.home-academy a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.home-academy-programs {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  grid-auto-rows: minmax(164px, auto);
  gap: clamp(9px, 1.2vw, 18px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-academy-programs[hidden] { display: none; }
.home-academy-feature { grid-row: span 2; }
.home-academy-feature:only-child { grid-column: 1 / -1; }

.home-academy-programs a {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: end;
  height: 100%;
  min-height: 174px;
  overflow: hidden;
  border-radius: clamp(12px, 1.8vw, 24px);
  background: #2a1d17;
  color: #fff7f0;
  text-decoration: none;
}

.home-academy-feature a { min-height: clamp(300px, 33vw, 490px); }

.home-academy-photo, .home-academy-programs a::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-academy-photo { object-fit: cover; object-position: center; transition: transform .45s ease; }

.home-academy-programs a::after {
  content: "";
  background: linear-gradient(0deg, #21150ffb, #21150fca 46%, #21150f33 100%);
}

.home-academy-feature a::after {
  background: linear-gradient(0deg, #21150ffa, #21150f93 45%, transparent 85%), linear-gradient(270deg, #21150f7d, transparent 70%);
}

.home-academy-programs a:hover .home-academy-photo { transform: scale(1.05); }

.home-academy-card-content {
  padding: clamp(14px, 2.45vw, 34px);
  padding-inline-end: clamp(50px, 5.5vw, 74px);
}

.home-academy-meta, .home-academy-event-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .6rem;
  font-size: clamp(.74rem, 1vw, .87rem);
}

.home-academy-meta { color: #f0cbb5; font-weight: 750; }
.home-academy-next { padding: .2rem .55rem; border-radius: 4px; background: #ebd6c6; color: #38241a; }
.home-academy-programs h3 { margin: .35rem 0 .45rem; line-height: 1.4; font-size: clamp(1.05rem, 1.8vw, 1.55rem); }
.home-academy-feature h3 { font-size: clamp(1.45rem, 3.2vw, 3rem); }
.home-academy-feature p { max-width: 50ch; margin: 0 0 .6rem; color: #f0ddd0; line-height: 1.7; }
.home-academy-event-info { color: #eed9c9; }
.home-academy-status { border: 1px solid #e8bb9c78; border-radius: 99px; padding: .08rem .4rem; }
.home-academy-status[data-status="active"] { color: #e1efda; border-color: #b7cf9f88; }
.home-academy-empty { color: var(--muted); }

.home-academy-arrow {
  position: absolute;
  inset: auto auto clamp(12px, 2vw, 25px) clamp(12px, 2vw, 25px);
  display: grid;
  place-items: center;
  width: clamp(28px, 3vw, 43px);
  aspect-ratio: 1;
  border: 1px solid #efd6c68c;
  border-radius: 50%;
  color: #fff7f0;
  background: #2a1d1766;
}

.home-academy-programs a:hover .home-academy-arrow { background: #ebd6c6; color: #38241a; }

@media (max-width: 760px) {
  .home-academy-programs { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .home-academy-feature { grid-row: auto; }
  .home-academy-feature a { min-height: 320px; }
  .home-academy-feature p { font-size: .88rem; }
  .home-academy-heading p { font-size: .87rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-academy-photo { transition: none; }
  .home-academy-programs a:hover .home-academy-photo { transform: none; }
}

#woodcarving, #story { scroll-margin-block-start: 98px; }

.woodcarving-guide {
  max-width: 1440px;
  margin: clamp(20px, 3.8vw, 58px) max(3.6vw, 16px) clamp(24px, 4vw, 62px);
  padding: clamp(14px, 2.1vw, 30px);
  border: 1px solid #e2d6cd;
  border-radius: clamp(13px, 1.8vw, 22px);
  background: #f7f2ee;
  color: #30251f;
}

@media (min-width: 1550px) {
  .woodcarving-guide { margin-inline: auto; }
}

.woodcarving-guide-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(20px, 4.2vw, 64px);
}

.woodcarving-guide-copy { padding-inline-start: clamp(0px, 2.5vw, 40px); }

.woodcarving-guide-copy .woodcarving-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  margin: 0 0 .65rem;
  color: #765341;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.woodcarving-label::before { content: ""; width: 1.65rem; height: 1px; background: #aa8270; }

.woodcarving-guide-copy h2 {
  margin: 0 0 .85rem;
  font-size: clamp(1.85rem, 4.4vw, 4.2rem);
  line-height: 1.18;
  font-weight: 900;
}

.woodcarving-guide-copy > p:last-child {
  max-width: 42ch;
  margin: 0;
  color: #615751;
  font-size: clamp(.91rem, 1.38vw, 1.13rem);
  line-height: 1.95;
}

.woodcarving-guide-photo {
  aspect-ratio: 1.72;
  border-radius: 10px;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 62%;
  background: #e5d5cb;
}

.woodcarving-guide-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 20px);
  padding: clamp(20px, 2.4vw, 34px) 0 0;
  margin: clamp(20px, 2.4vw, 34px) 0 0;
  border-top: 1px solid #e2d6cd;
  list-style: none;
  background: radial-gradient(ellipse at 85% 85%, #c3946b12, transparent 55%);
}
.woodcarving-guide-points li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 126px;
  padding: clamp(18px, 1.9vw, 28px);
  border: 1px solid #ffffffa6;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff80, #ffffff26);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  box-shadow: inset 0 1px 0 #ffffffbf, 0 8px 26px #50352008;
  transition: background .25s ease, box-shadow .25s ease;
}
.woodcarving-guide-points li > div { display: grid; gap: 6px; }
.woodcarving-guide-points strong { font-size: 1rem; font-weight: 650; line-height: 1.6; }
.woodcarving-guide-points div span { color: #615751; font-size: .875rem; line-height: 1.7; }
.woodcarving-symbol {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 36px;
  color: #805f49;
}
[data-theme="dark"] .woodcarving-guide .woodcarving-guide-points li {
  border-color: #ffffff1a;
  background: linear-gradient(135deg, #ffffff0f, #ffffff04);
  box-shadow: inset 0 1px 0 #ffffff12, 0 8px 26px #100a0812;
}
[data-theme="dark"] .woodcarving-guide-points .woodcarving-symbol {
  background: transparent;
  color: #dcb095;
}
@media (hover: hover) {
  .woodcarving-guide-points li:hover {
    box-shadow: inset 0 1px 0 #ffffffbf, 0 10px 30px #50352010;
  }
  [data-theme="dark"] .woodcarving-guide .woodcarving-guide-points li:hover {
    background: linear-gradient(135deg, #ffffff16, #ffffff07);
    box-shadow: inset 0 1px 0 #ffffff1c, 0 10px 30px #100a0820;
  }
}

.woodcarving-symbol::before, .woodcarving-symbol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.symbol-wood::before {
  width: 19px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 46% 54% 40% 60%;
  transform: translate(-50%, -50%) rotate(-26deg);
}

.symbol-wood::after { width: 8px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.symbol-tool::before { width: 6px; height: 19px; border: 1.5px solid currentColor; border-radius: 2px; transform: translate(-50%, -50%) rotate(40deg); }
.symbol-tool::after { width: 8px; height: 1.5px; background: currentColor; transform: translate(-21%, -225%) rotate(40deg); }
.symbol-relief::before { width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 3px; transform: translate(-50%, -50%) rotate(45deg); }
.symbol-relief::after { width: 7px; height: 7px; border: 1px solid currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.symbol-finish::before { width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
.symbol-finish::after { width: 17px; height: 12px; border-block: 1.5px solid currentColor; border-radius: 2px; }

@media (max-width: 700px) {
  #woodcarving, #story { scroll-margin-block-start: 82px; }
  .woodcarving-guide-main { grid-template-columns: 1fr; gap: 14px; }
  .woodcarving-guide-copy { padding-inline-start: 0; }
  .woodcarving-guide-photo { grid-row: 1; }

}

@media (max-width: 1000px) {
  .woodcarving-guide-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .woodcarving-guide-points li { flex-direction: column; align-items: flex-start; gap: 12px; min-height: 160px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .woodcarving-guide-points li { transition: none; }
}

.collection-banner::before,
.agenda-hero::before {
  content: "";
  position: absolute;
  width: var(--rosette-size);
  aspect-ratio: 1;
  left: var(--rosette-left);
  top: var(--rosette-top);
  z-index: var(--rosette-layer, -1);
  background: currentColor;
  -webkit-mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask-mode: luminance;
  opacity: var(--rosette-opacity);
  pointer-events: none;
  animation: rosette-turn var(--rosette-speed) linear infinite var(--rosette-direction, normal);
}

.collection-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --rosette-size: clamp(160px, 23vw, 340px);
  --rosette-left: 0%;
  --rosette-top: -90%;
  --rosette-opacity: .10;
  --rosette-speed: 175s;
  --rosette-direction: reverse;
}

.agenda-hero {
  --rosette-size: clamp(180px, 36vw, 460px);
  --rosette-left: -2%;
  --rosette-top: -27%;
  --rosette-layer: 0;
  --rosette-opacity: .16;
  --rosette-speed: 165s;
}

.agenda-hero::before { mix-blend-mode: screen; }
.agenda-hero-copy, .agenda-clock { position: relative; z-index: 1; }

@keyframes rosette-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .collection-banner { --rosette-left: -19%; --rosette-top: -38%; --rosette-opacity: .075; }
  .agenda-hero { --rosette-left: -15%; --rosette-top: -10%; }
}

@media (prefers-reduced-motion: reduce) {
  .collection-banner::before, .agenda-hero::before { animation: none; }
}

.workshop-story {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  padding: clamp(30px, 5vw, 75px) max(3.6vw, 16px);
  border-top: 1px solid var(--line);
  background: var(--theme-surface, #ebe0d7);
  color: var(--ink);
}

.workshop-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -14vw -13vw auto auto;
  width: clamp(280px, 45vw, 660px);
  aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask-mode: luminance;
  opacity: .055;
  animation: rosette-turn 170s linear infinite reverse;
  pointer-events: none;
}

[data-theme="dark"] .workshop-story::before { mix-blend-mode: screen; opacity: .11; }
.workshop-story-inner { max-width: 1440px; margin-inline: auto; }
.workshop-story-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(24px, 6vw, 92px);
}

.workshop-story-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .65rem;
  font-size: .84rem;
  font-weight: 800;
  color: var(--theme-accent, #714b37);
}

.workshop-story-label::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.workshop-story-copy h2 {
  margin: 0 0 .8rem;
  color: var(--theme-ink, #30231c);
  font-size: clamp(2.2rem, 5.2vw, 5.25rem);
  line-height: 1.16;
  font-weight: 900;
}

[data-theme="dark"] .workshop-story-copy h2 { color: var(--ink); }
.workshop-story-copy h2 em { font-style: normal; color: var(--theme-accent, #794f39); }
.workshop-story-copy > p:not(.workshop-story-label) {
  max-width: 50ch;
  line-height: 1.95;
  margin: 0;
  color: var(--ink);
  font-size: clamp(.92rem, 1.3vw, 1.08rem);
}

.workshop-story-actions { display: flex; flex-wrap: wrap; gap: .45rem .7rem; margin-block-start: 1.15rem; }
.workshop-story-actions a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  font-size: .87rem;
  font-weight: 750;
}

.workshop-story-actions a:first-child { background: #684634; color: #fff7f0; border-color: #684634; }
.workshop-story-actions a:hover { border-color: currentColor; }
.workshop-story-actions a:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.workshop-story-figure { position: relative; margin: 0; padding-inline: 8% 0; }
.workshop-story-photo { display: block; height: auto; object-fit: cover; border-radius: 14px; border: 1px solid #a87b605e; }
.workshop-story-photo-main { width: 100%; aspect-ratio: 1.35; object-position: center 25%; }
.workshop-story-photo-detail {
  position: absolute;
  inset: auto 0 12% auto;
  width: 32%;
  aspect-ratio: 1;
  outline: 5px solid var(--theme-surface, #ebe0d7);
  box-shadow: 0 10px 24px #2919123b;
}

.workshop-story-figure figcaption { margin-top: .55rem; margin-inline-start: .25rem; font-size: .77rem; }
.workshop-story-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-block-start: 1.12rem;
  margin: clamp(24px, 4vw, 52px) 0 0;
  border-block-start: 1px solid var(--line);
}

.workshop-story-process div { padding: .3rem clamp(.52rem, 2.1vw, 2rem); }
.workshop-story-process div:first-child { padding-inline-start: 0; }
.workshop-story-process div + div { border-inline-start: 1px solid var(--line); }
.workshop-story-process dt { color: var(--theme-accent, #714b37); font-weight: 850; }
.workshop-story-process dd { margin: .25rem 0 0; font-size: .88rem; line-height: 1.65; }

@media (max-width: 680px) {
  .workshop-story-main { grid-template-columns: 1fr; }
  .workshop-story-process { grid-template-columns: 1fr; padding-block-start: .45rem; }
  .workshop-story-process div { padding: .65rem 0; }
  .workshop-story-process div + div { border-inline-start: 0; border-block-start: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .workshop-story::before { animation: none; }
}

.instructor-portrait {
  --instructor-background: #24201e;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  max-width: 1440px;
  margin: clamp(24px, 4vw, 56px) max(3.6vw, 16px);
  border: 1px solid #6c5244;
  border-radius: clamp(14px, 2vw, 26px);
  background: var(--instructor-background);
  color: #f2eeea;
}

@media (min-width: 1550px) {
  .instructor-portrait { margin-inline: auto; }
}

.instructor-portrait-image {
  position: relative;
  margin: 0;
  align-self: stretch;
  min-height: clamp(350px, 38vw, 560px);
  background: #141414;
}

.instructor-portrait-image img,
.instructor-portrait-image::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.instructor-portrait-image img {
  display: block;
  object-fit: cover;
  object-position: center 43%;
}

.instructor-portrait-image::after {
  content: "";
  background: linear-gradient(90deg, var(--instructor-background), transparent 22%);
  pointer-events: none;
}

.instructor-portrait-copy {
  position: relative;
  align-self: center;
  padding: clamp(24px, 5vw, 78px);
}

.instructor-portrait-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 .85rem;
  color: #ddb49d;
  font-size: .9rem;
  font-weight: 750;
}

.instructor-portrait-label::before { content: ""; height: 1px; width: 34px; background: currentColor; }
.instructor-portrait-copy h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 5rem);
  font-weight: 900;
  line-height: 1.16;
}

.instructor-portrait-copy p:not(.instructor-portrait-label) {
  max-width: 43ch;
  margin: 1rem 0 1.4rem;
  color: #e4d4ca;
  font-size: clamp(.92rem, 1.35vw, 1.1rem);
  line-height: 1.95;
}

.instructor-portrait-copy a {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  padding: .5rem .85rem;
  border-radius: 6px;
  background: #e5d5cb;
  color: #30231c;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 800;
}

.instructor-portrait-copy a:hover { background: #f2eeea; }
.instructor-portrait-copy a:focus-visible { outline: 2px solid #f2eeea; outline-offset: 4px; }

@media (max-width: 680px) {
  .instructor-portrait { grid-template-columns: 1fr; }
  .instructor-portrait-image { min-height: 0; aspect-ratio: 1.11; }
  .instructor-portrait-image::after { background: linear-gradient(0deg, var(--instructor-background), transparent 22%); }
  .instructor-portrait-copy { padding: .55rem 1.1rem 1.5rem; }
}

.work-gallery {
  max-width: 1440px;
  margin: clamp(24px, 4vw, 56px) max(3.6vw, 16px);
}

@media (min-width: 1550px) {
  .work-gallery { margin-inline: auto; }
}

.work-gallery header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin-block-end: 1rem;
}

.work-gallery h2 { margin: 0; font-size: clamp(1.8rem, 3.8vw, 3.15rem); }
.work-gallery header p { margin: 0; color: var(--theme-accent, #615751); font-size: .79rem; }
.work-gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-gallery-grid a { display: grid; gap: .45rem; color: inherit; text-decoration: none; font-size: .85rem; line-height: 1.45; }
.work-gallery-grid a:hover span { text-decoration: underline; text-underline-offset: .21em; }
.work-gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 9px;
  background: var(--theme-surface, #e5d5cb);
}

@media (max-width: 920px) {
  .work-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .work-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.work-gallery-dialog {
  position: fixed;
  inset: 0;
  width: min(94vw, 880px);
  max-width: none;
  max-height: 95dvh;
  margin: auto;
  padding: .6rem;
  border: 1px solid #896c5b;
  border-radius: 15px;
  background: #241a16;
  color: #f2eeea;
}

.work-gallery-dialog::backdrop { background: #160e0cd9; }
body:has(.work-gallery-dialog[open]) { overflow: hidden; }
.work-gallery-dialog figure { margin: 0; display: grid; justify-items: center; gap: .5rem; }
.work-gallery-dialog img { display: block; width: auto; max-width: 100%; max-height: 72dvh; object-fit: contain; }
.work-gallery-dialog figcaption { text-align: center; font-size: .9rem; }
.work-gallery-dialog button { min-height: 40px; padding: .35rem .7rem; border: 1px solid #96735e; border-radius: 6px; background: #33251e; color: inherit; font: inherit; }
.work-gallery-dialog button:hover { background: #604230; }
.work-gallery-dialog form { position: absolute; inset: .7rem .7rem auto auto; }
.work-gallery-dialog .work-gallery-close { font-size: 1.3rem; line-height: 1; }
.work-gallery-controls { display: flex; justify-content: center; gap: .5rem; margin-block-start: .55rem; }
.work-gallery :is(a, button):focus-visible, .work-gallery-dialog button:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
