﻿.craft-section {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 96px) 0;
  background:
    radial-gradient(ellipse at 90% 8%, rgba(215, 183, 141, 0.2), transparent 32%),
    linear-gradient(180deg, var(--sand) 0%, var(--sand) 48%, var(--sand) 100%);
  color: var(--ink);
}

.craft-heading {
  margin: 0 auto 58px;
  text-align: center;
}

.craft-finish-kicker {
  margin: 0 0 18px;
  color: var(--walnut-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.craft-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--type-h2);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
}

.craft-heading h2 em {
  color: var(--walnut);
}

.craft-intro {
  max-width: 650px;
  margin: 22px auto 0;
  color: rgba(11, 32, 29, 0.72);
  font-size: 0.98rem;
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-word;
}

.craft-road {
  --craft-line-inset: 28px;
  --craft-line-position: 50%;
  position: relative;
  display: grid;
  gap: 26px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: craft-stop;
}

.craft-road::before {
  position: absolute;
  top: var(--craft-line-inset);
  bottom: var(--craft-line-inset);
  left: var(--craft-line-position);
  width: 2px;
  /* Set by main.js so the line ends at the last step's marker; when unset,
     `bottom` above applies instead. */
  height: var(--craft-line-length);
  background: repeating-linear-gradient(
    to bottom,
    rgba(118, 91, 66, 0.45) 0,
    rgba(118, 91, 66, 0.45) 7px,
    transparent 7px,
    transparent 15px
  );
  content: "";
}

.craft-stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: start;
  counter-increment: craft-stop;
}

.craft-stop::before {
  position: absolute;
  z-index: 1;
  top: 23px;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 5px solid var(--sand);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px rgba(118, 91, 66, 0.42), 0 5px 14px rgba(32, 35, 28, 0.14);
  color: var(--cream);
  content: counter(craft-stop, decimal-leading-zero);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
}

.craft-step {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 51, 45, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 12px 30px rgba(30, 37, 31, 0.06);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.craft-stop:nth-child(even) .craft-step {
  grid-column: 3;
}

.craft-step[open],
.craft-step:hover {
  border-color: rgba(118, 91, 66, 0.38);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(30, 37, 31, 0.1);
}

.craft-step summary {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 138px;
  align-content: center;
  padding: 22px 64px 22px 25px;
  cursor: pointer;
  list-style: none;
}

.craft-step summary::-webkit-details-marker {
  display: none;
}

.craft-step summary:focus-visible {
  outline: 2px solid var(--walnut-dark);
  outline-offset: -4px;
}

.craft-step-label {
  color: var(--walnut-dark);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.craft-step-label > span {
  color: rgba(23, 51, 45, 0.52);
}

.craft-step-title {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.craft-step-teaser {
  color: rgba(11, 32, 29, 0.67);
  font-size: 0.78rem;
  line-height: 1.5;
}

.craft-step-toggle {
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(23, 51, 45, 0.28);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  transform: translateY(-50%);
}

.craft-step-toggle::after {
  display: block;
  content: "+";
  line-height: 1;
  transform: translateY(-1px);
}

.craft-step[open] .craft-step-toggle {
  transform: translateY(-50%);
}

.craft-step[open] .craft-step-toggle::after {
  content: "−";
}

.craft-step-detail {
  padding: 0 25px 24px;
  color: rgba(11, 32, 29, 0.76);
  font-size: 0.88rem;
  line-height: 1.8;
}

.craft-step-detail p {
  margin: 0 0 14px;
  text-align: justify;
}

.craft-step-detail p:last-child {
  margin-bottom: 0;
}

.craft-finish {
  max-width: 760px;
  margin: 54px auto 0;
  padding: 34px clamp(22px, 5vw, 52px) 38px;
  border: 1px solid rgba(215, 183, 141, 0.32);
  background: linear-gradient(135deg, var(--forest), var(--forest));
  box-shadow: 0 20px 50px rgba(11, 32, 29, 0.16);
  color: rgba(247, 238, 226, 0.8);
  text-align: center;
}

.craft-finish-mark {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--walnut);
  font-size: 1.2rem;
}

.craft-finish-kicker {
  margin-bottom: 12px;
  color: var(--cream);
}

.craft-finish > p:not(.craft-finish-kicker, .craft-finish-signoff) {
  max-width: 590px;
  margin: 0 auto;
  font-size: 0.88rem;
  line-height: 1.8;
}

.craft-finish-signoff {
  margin: 24px 0 0;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
}

.craft-finish-signoff > span {
  display: block;
}

.craft-finish-signoff em {
  color: var(--cream);
  font-weight: 500;
}

@media (max-width: 680px) {
  .craft-finish-signoff {
    font-size: clamp(0.75rem, 5vw, 1.25rem);
  }

  .craft-section {
    padding: 56px 0 82px;
  }

  .craft-heading {
    margin-bottom: 40px;
    text-align: left;
  }

  .craft-heading h2 {
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 0.98;
    white-space: normal;
  }

  .craft-heading h2 em {
    display: block;
    font-size: clamp(0.8rem, 7.4vw, 2.1rem);
    white-space: nowrap;
  }

  .craft-intro {
    margin-top: 17px;
    font-size: 0.9rem;
  }

  .craft-road {
    --craft-line-inset: 22px;
    --craft-line-position: 14px;
    gap: 18px;
    padding-left: 40px;
  }

  .craft-road::before {
    top: 22px;
    bottom: 22px;
    left: 14px;
  }

  .craft-stop {
    display: block;
  }

  .craft-stop::before {
    top: 20px;
    left: -26px;
    width: 36px;
    height: 36px;
    border-width: 4px;
    transform: translateX(-50%);
  }

  .craft-step summary {
    min-height: 124px;
    padding: 19px 58px 19px 18px;
  }

  .craft-step-toggle {
    right: 14px;
  }

  .craft-step-title {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .craft-step-detail {
    padding: 0 18px 21px;
    font-size: 0.84rem;
  }

  .craft-finish {
    margin-top: 38px;
    padding-top: 28px;
    padding-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .craft-step,
  .craft-step-toggle,
  .craft-step-toggle::after {
    transition: none;
  }
}
