/* トップのガラス切替 */
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-tools {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 18px;
  width: min(690px, 100%);
  margin-top: 42px;
}

.hero-next-event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(4, 24, 38, 0.26);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.hero-next-event-label {
  grid-row: 1 / span 2;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.hero-next-event-date {
  font-family: "Noto Serif JP", serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-next-event-title {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.84rem;
}

.glass-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.glass-selector-label {
  flex: 0 0 100%;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.glass-selector button {
  appearance: none;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(4, 24, 38, 0.24);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.glass-selector button:hover,
.glass-selector button:focus-visible,
.glass-selector button[aria-pressed="true"] {
  color: #082033;
  border-color: rgba(220, 244, 241, 0.88);
  background: rgba(220, 244, 241, 0.92);
  transform: translateY(-1px);
  outline: none;
}

.hero-visual span {
  overflow: hidden;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease, opacity 0.35s ease;
}

.hero-visual span::before,
.hero-visual span::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, background 0.35s ease;
}

.hero-visual span::after {
  inset: -40% 36% -40% 42%;
  opacity: 0.5;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(18deg);
}

.hero[data-glass-type="clear"] .hero-visual span {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(2px);
}

.hero[data-glass-type="patterned"] .hero-visual span {
  border-color: rgba(224, 247, 244, 0.42);
  background:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.2) 0 9%, transparent 10% 21%, rgba(255, 255, 255, 0.11) 22% 29%, transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(255, 255, 255, 0.16) 0 8%, transparent 9% 20%, rgba(255, 255, 255, 0.1) 21% 28%, transparent 29%),
    rgba(189, 225, 221, 0.12);
  background-size: 78px 78px, 82px 82px, auto;
  backdrop-filter: blur(6px) contrast(1.08);
}

.hero[data-glass-type="wired"] .hero-visual span {
  border-color: rgba(220, 239, 237, 0.44);
  background:
    repeating-linear-gradient(45deg, transparent 0 23px, rgba(213, 231, 230, 0.34) 24px 25px),
    repeating-linear-gradient(-45deg, transparent 0 23px, rgba(213, 231, 230, 0.3) 24px 25px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(178, 214, 211, 0.05));
  backdrop-filter: blur(3px);
}

.hero[data-glass-type="frosted"] .hero-visual span {
  border-color: rgba(242, 250, 249, 0.58);
  background:
    linear-gradient(125deg, rgba(246, 252, 251, 0.44), rgba(204, 226, 224, 0.26)),
    repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px 5px);
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.2), 0 40px 90px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px) saturate(0.72);
}

.hero[data-glass-type="mirror"] .hero-visual span {
  border-color: rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(118deg, rgba(244, 249, 249, 0.9) 0%, rgba(117, 146, 154, 0.68) 24%, rgba(236, 246, 246, 0.94) 47%, rgba(63, 91, 102, 0.72) 71%, rgba(221, 239, 238, 0.9) 100%);
  box-shadow: inset 0 0 35px rgba(255, 255, 255, 0.42), 0 40px 90px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}

.hero[data-glass-type="mirror"] .hero-visual span::before {
  opacity: 0.42;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 42%, rgba(7, 27, 42, 0.22));
}

.hero[data-glass-type="tinted"] .hero-visual span {
  border-color: rgba(148, 213, 200, 0.48);
  background: linear-gradient(135deg, rgba(28, 106, 92, 0.58), rgba(8, 42, 55, 0.2));
  box-shadow: inset 0 0 55px rgba(71, 169, 146, 0.16), 0 40px 90px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(3px) saturate(1.2);
}

/* ガラス屋の仕事図鑑 */
.work-atlas {
  background:
    linear-gradient(180deg, rgba(248, 251, 250, 0.96), rgba(231, 241, 238, 0.72)),
    linear-gradient(90deg, rgba(25, 67, 78, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(25, 67, 78, 0.035) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

.work-atlas-intro {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.9;
}

.work-atlas-card {
  overflow: hidden;
  border: 1px solid rgba(49, 93, 84, 0.18);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(7, 27, 42, 0.08);
}

.work-building-wrap {
  position: relative;
  padding: 24px;
}

.work-building {
  display: block;
  width: 100%;
  height: auto;
}

.work-building .building-line,
.work-building .work-target {
  vector-effect: non-scaling-stroke;
}

.work-building .building-line {
  fill: none;
  stroke: #153f50;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-building .building-fill {
  fill: rgba(214, 232, 229, 0.28);
  stroke: #153f50;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.work-building .glass-fill {
  fill: rgba(142, 201, 198, 0.16);
  stroke: #315d54;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.work-building .work-target {
  fill: transparent;
  stroke: transparent;
  stroke-width: 5;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.work-building [data-work-target].is-active .work-target,
.work-building [data-work-target]:hover .work-target {
  fill: rgba(92, 174, 160, 0.22);
  stroke: #2d8a79;
  filter: drop-shadow(0 0 8px rgba(45, 138, 121, 0.28));
}

.work-label {
  cursor: pointer;
  outline: none;
}

.work-label rect {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(49, 93, 84, 0.48);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.work-label text {
  fill: #153f50;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

.work-label line,
.work-label path {
  fill: none;
  stroke: rgba(49, 93, 84, 0.72);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.work-label:hover rect,
.work-label:focus-visible rect,
.work-label.is-active rect {
  fill: #315d54;
  stroke: #315d54;
}

.work-label:hover text,
.work-label:focus-visible text,
.work-label.is-active text {
  fill: #fff;
}

.work-label:focus-visible {
  outline: none;
}

.work-detail {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) 1fr;
  gap: 20px;
  align-items: start;
  min-height: 120px;
  padding: 25px 30px;
  color: #fff;
  background: linear-gradient(120deg, #102f40, #315d54);
}

.work-detail-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.work-detail h3 {
  margin: 5px 0 0;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

.work-detail p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

@media (max-width: 900px) {
  .hero-tools {
    width: min(580px, 100%);
  }

  .work-building-wrap {
    overflow-x: auto;
    padding: 18px 10px;
  }

  .work-building {
    min-width: 720px;
  }
}

@media (max-width: 620px) {
  .hero-tools {
    margin-top: 30px;
  }

  .hero-next-event {
    grid-template-columns: 1fr;
    gap: 5px;
    width: 100%;
  }

  .hero-next-event-label {
    grid-row: auto;
  }

  .glass-selector {
    gap: 7px;
  }

  .glass-selector button {
    padding: 7px 10px;
    font-size: 0.71rem;
  }

  .work-atlas .section-layout {
    display: block;
  }

  .work-atlas .section-heading {
    margin-bottom: 24px;
  }

  .work-building-wrap::after {
    content: "横に動かして全体を確認できます";
    position: sticky;
    left: 12px;
    display: block;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    color: var(--muted);
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.86);
  }

  .work-detail {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 20px;
  }
}
