/* =========================================================
   Region page (産地ページ)
   Built from the Figma frame "region" (1280px wide).
   Reuse this file for every new region: copy the HTML page
   and change only the text and photos.
   ========================================================= */

.region { padding-bottom: 160px; }

.region-title {
  height: 194px;
  margin: 40px 0 0 73px;
  font-family: var(--font-jp-display);
  font-weight: 700;
  font-size: 107.2px;
}

/* Numbered headings: 01産地とその特徴 … */
.region-h2 {
  height: var(--h, 91.3px);
  margin-left: 78px;
  font-weight: 300;
  font-size: 54.056px;
}
.region-h2--accent { color: var(--red); }
.region h2:nth-of-type(1),
.region h2:nth-of-type(2) { --h: 82px; font-size: 55.9px; }
.region-h2--tight { --h: 89px; margin-top: 61px; }
.region-h2--04 { margin-top: 82px; margin-left: 76px; }
.region-h2--05 { margin-top: 65px; }
.region-h2--indent { margin-left: 95px; }
.region-h2--07 { margin-top: 137px; }

/* Outlined text boxes */
.region-box {
  border: 1.01px solid var(--teal-light);
  border-radius: 26.27px;
  text-align: center;
  font-weight: 300;
}
.region-box strong { font-weight: 700; color: var(--teal); }

.region-box--intro {
  width: min(1132px, calc(100% - 148px));
  min-height: 239px;
  margin: 69px 0 0 73px;
  padding: 9px 20px 16px;
  font-size: 22px;
}

/* 02 photos */
.photo-row { gap: 41px; margin-top: 63px; padding: 0 34px; }
.photo {
  position: relative;
  width: 330px;
  height: 330px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #000;
  border-radius: 34px;
}
.photo img { position: absolute; height: auto; }
.photo--plain { border: 0; border-radius: 30px; }
.photo--plain img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo:nth-child(2) img { left: -0.3%; top: -20%; width: 100%; }
.photo:nth-child(3) img { left: -2.42%; top: -21.55%; width: 103.94%; }
.photo--zoom img { left: -12.42%; top: -51.21%; width: 124.24%; }

/* 03 history + timeline */
.region-box--history {
  position: relative;
  width: min(1225px, calc(100% - 55px));
  height: 619px;
  margin-left: 32px;
  padding: 29px 40px 0;
}
.history-intro { font-size: 28.152px; }

.timeline {
  position: absolute;
  left: -32px;
  width: 1280px;
  max-width: 100vw;
  top: 381px;
  height: 0;
  list-style: none;
}
.timeline::before {           /* the long arrow */
  content: "";
  position: absolute;
  left: 0; right: -2.5px; top: -18.4px;
  height: 36.8px;
  background: url("/assets/svg/timeline-arrow.svg") no-repeat center / 100% 100%;
}
.timeline li {
  position: absolute;
  left: calc(var(--x) / 1280 * 100%);
  top: 0;
}
.timeline li::before {        /* the dot */
  content: "";
  position: absolute;
  left: -12px; top: -12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #000;
}
.tl-text,
.tl-year { position: absolute; transform: translateX(-50%); text-align: center; }
.tl-text { width: 196px; font-weight: 300; font-size: 23.65px; }
.tl-year { font-weight: 700; font-size: 28.414px; white-space: nowrap; }
.tl--text-top .tl-text,
.tl--year-top .tl-year { bottom: 22px; }
.tl--text-top .tl-year,
.tl--year-top .tl-text { top: 26px; }
.timeline li:nth-child(-n+2) .tl-text { width: 168px; }

/* 04 now */
.region-box--now {
  width: min(1215px, calc(100% - 65px));
  min-height: 158px;
  margin: 17.7px 0 0 32px;
  padding: 11px 50px;
  font-size: 24px;
}
.now-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 516px));
  gap: 42px 41px;
  margin: 37px 0 0 103px;
  padding-right: 24px;
}
.now-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 276px;
  padding: 0 28px;
  border: 6px solid var(--teal);
  border-radius: 24px;
  text-align: center;
  font-weight: 300;
  font-size: 22px;
}

/* 05 places to visit */
.places { position: relative; height: 679px; }
.place { position: absolute; display: flex; flex-direction: column; align-items: center; text-align: center; }
.place p { font-weight: 300; font-size: 19.128px; }
.place--hall   { left: calc(149 / 1280 * 100%); top: 45px;  width: 437px; }
.place--hall .pill { width: 437px; height: 82px; border-width: 1.01px; border-radius: 26.27px; }
.place--hall p { margin-top: 11px; }
.place--street { left: calc(773 / 1280 * 100%); top: 129px; width: 321px; }
.place--street p { width: 308px; margin-top: 9px; }
.place--market { left: calc(381 / 1280 * 100%); top: 334px; width: 329px; }
.place--market .pill { width: 302px; height: 80px; border-width: 0.87px; border-radius: 22.62px; }
.place--market p { margin-top: 11px; }

/* 06 related */
.related { display: flex; flex-wrap: wrap; gap: 16px 61px; margin: 14.7px 0 0 78px; }

/* 07 sources */
.sources {
  width: min(1080px, calc(100% - 130px));
  min-height: 348px;
  margin: 10.7px 0 0 65px;
  border: 1.01px solid #000;
  border-radius: 26.27px;
}

/* Vertical spacing between blocks */
.region-box--intro + .region-h2 { margin-top: 53px; }

/* ---------- Tablets ---------- */
@media (max-width: 1100px) {
  .places { height: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; padding: 45px 16px 60px; }
  .place { position: static; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .region { padding-bottom: 80px; }
  .region-title { height: auto; margin: 24px 16px 32px; font-size: 56px; }
  .region-h2,
  .region h2:nth-of-type(1),
  .region h2:nth-of-type(2) { height: auto; margin: 48px 16px 16px !important; font-size: 30px; }
  .region h2:nth-of-type(1) { margin-top: 0 !important; }

  .region-box,
  .region-box--intro,
  .region-box--history,
  .region-box--now,
  .sources { width: auto; height: auto; min-height: 0; margin: 0 16px; padding: 16px; border-radius: 20px; }
  .region-box br,
  .now-grid br,
  .place br { display: none; }
  .region-box--intro { font-size: 16px; line-height: 1.8; }
  .history-intro { font-size: 17px; line-height: 1.7; }
  .region-box--now { font-size: 16px; line-height: 1.7; }

  .photo-row { gap: 12px; margin-top: 0; padding: 0 16px; }
  .photo { width: 70vw; height: 70vw; border-radius: 24px; }

  /* Timeline becomes a vertical list */
  .timeline { position: relative; left: 0; top: 0; width: auto; height: auto; margin-top: 24px; padding-left: 28px; }
  .timeline::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: rgba(0, 0, 0, 0.49); }
  .timeline li { position: relative; left: auto; display: flex; flex-direction: column; text-align: left; padding-bottom: 20px; }
  .timeline li::before { left: -28px; top: 4px; width: 16px; height: 16px; }
  .tl-text,
  .tl-year { position: static; transform: none; width: auto !important; text-align: left; }
  .tl--year-top .tl-year, .tl--text-top .tl-year { order: -1; }
  .tl-text { font-size: 16px; }
  .tl-year { font-size: 20px; }

  .now-grid { grid-template-columns: 1fr; gap: 12px; margin: 16px 16px 0; padding: 0; }
  .now-grid li { min-height: 0; padding: 20px; border-width: 4px; font-size: 16px; line-height: 1.7; }

  .places { padding: 8px 16px 0; gap: 32px; }
  .place, .place p { width: 100% !important; }
  .place .pill { width: 100% !important; max-width: 360px; height: 64px !important; font-size: 24px; }
  .place p { font-size: 15px; line-height: 1.7; }

  .related { margin: 0 16px; gap: 12px; }
  .sources { min-height: 160px; }
}
