/*
Theme Name: UMIIRO
Theme URI: https://umiiro.co.jp/
Author: umiiro inc.
Description: うみいろ株式会社用オリジナルWordPressテーマ。Bootstrap 5対応、トップロゴアニメーション、新着情報テンプレートを含みます。
Version: 1.3.6
Text Domain: umiiro
*/

:root {
  --text: #111;
  --muted: #777;
  --line: #e8e8e8;
  --content-width: 900px;
  --stage-scale: 1;
  --scatter-duration: 980ms;
  --scatter-ease: cubic-bezier(.16,.84,.23,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", YuGothic,
    "Noto Sans JP", sans-serif;
  overscroll-behavior-y: none;
}

a { color: inherit; }

/* ===== FRONT PAGE / LOGO SCATTER ===== */
.hero-scroll {
  position: relative;
  height: 180vh;
}

.sticky-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #fff;
}

.artboard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: center center;
  pointer-events: none;
}

.glyph {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: block;
  user-select: none;
  will-change: transform, opacity;
  transform-origin: 50% 50%;
  transform: translate3d(0,0,0) rotate(0deg);
  transition:
    transform var(--scatter-duration) var(--scatter-ease) var(--delay),
    opacity 520ms ease var(--delay);
}

.is-scattered .glyph {
  transform:
    translate3d(
      calc(var(--dx) * 100vw / var(--stage-scale)),
      calc(var(--dy) * 100vh / var(--stage-scale)),
      0
    )
    rotate(var(--rot));
  opacity: 0;
}

.is-resetting .glyph {
  transition: none !important;
}

/* ===== COMPANY PROFILE ===== */
.company-profile {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(96px, 12vw, 180px) 24px clamp(120px, 14vw, 220px);
  background: #fff;
  text-align: center;
}

.company-profile__inner {
  width: min(820px, 100%);
  margin: 0 auto;
}

.company-profile h3,
.news-section__heading {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: .14em;
}

.company-profile h4,
.news-section__subheading {
  margin: 12px 0 72px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.company-profile dl { margin: 0 auto; }
.company-profile dt,
.company-profile dd {
  margin-left: 0;
  text-align: center;
}

.company-profile dt {
  margin-top: 42px;
  margin-bottom: 11px;
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .15em;
  color: #888;
}

.company-profile dt:first-of-type { margin-top: 0; }

.company-profile dd {
  margin-bottom: 0;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 2;
  letter-spacing: .045em;
  white-space: pre-line;
}

.business-block {
  display: block;
  margin-top: 18px;
}
.business-block:first-child { margin-top: 0; }
.business-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .12em;
  color: #888;
}
.business-name {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .08em;
}
.business-copy {
  display: block;
  line-height: 1.9;
}

/* ===== FRONT PAGE NEWS ===== */
.news-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(96px, 11vw, 160px) 24px clamp(100px, 12vw, 180px);
  background: #fff;
}

.news-section__inner {
  width: min(900px, 100%);
  margin: 0 auto;
}

.news-section__heading,
.news-section__subheading { text-align: center; }

.news-section__subheading { margin-bottom: 64px; }

.news-list,
.news-index__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.news-list__item,
.news-index__item {
  border-bottom: 1px solid var(--line);
}

.news-list__link,
.news-index__link {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: center;
  min-height: 82px;
  padding: 22px 6px;
  color: var(--text);
  text-decoration: none;
  transition: opacity .25s ease;
}

.news-list__link:hover,
.news-index__link:hover { opacity: .55; }

.news-list__date,
.news-index__date {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

.news-list__title,
.news-index__title {
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: .035em;
}

.news-more {
  margin-top: 38px;
  text-align: center;
}

.news-more a,
.text-link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid #aaa;
  color: #555;
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
}

/* ===== INNER PAGE HEADER ===== */
.page-header {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 0;
}

.brand-hit {
  position: relative;
  display: block;
  width: 211.2px;
  height: 60px;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 211.2px;
  height: 60px;
  overflow: visible;
  pointer-events: none;
}

.brand-logo__stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform: scale(.30) translate(-605px, -512px);
  transform-origin: 0 0;
}

.brand-logo .glyph {
  transition:
    transform 620ms cubic-bezier(.16,.84,.23,1) var(--delay),
    opacity 420ms ease var(--delay);
}

.brand-hit:hover .glyph,
.brand-hit:focus-visible .glyph {
  transform:
    translate3d(
      calc(var(--dx) * 120px),
      calc(var(--dy) * 90px),
      0
    )
    rotate(var(--rot));
  opacity: 0;
}

.brand-hit:focus-visible {
  outline: 1px solid #bbb;
  outline-offset: 6px;
}

.umiiro-breadcrumb {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 80px auto 0;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--muted);
}

.umiiro-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.umiiro-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: #bbb;
}

.umiiro-breadcrumb a { text-decoration: none; }

/* ===== NEWS PAGES ===== */
.page-main {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 74px 0 150px;
}

.page-title {
  text-align: center;
  margin-bottom: 84px;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(17.92px, 1.92vw, 25.6px);
  font-weight: 400;
  letter-spacing: .14em;
}

.page-title p {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.latest {
  padding-bottom: 96px;
  border-bottom: 1px solid var(--line);
}

.latest__label {
  margin: 0 0 34px;
  text-align: center;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.article {
  width: min(720px, 100%);
  margin: 0 auto;
}

.article__date {
  display: block;
  margin-bottom: 14px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

.article__title {
  margin: 0 0 50px;
  text-align: center;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .045em;
}

.article__body {
  font-size: 14px;
  line-height: 2.15;
  letter-spacing: .035em;
}

.article__body p { margin: 0 0 1.65em; }

.article__body img {
  max-width: 100%;
  height: auto;
}

.archive {
  padding-top: 96px;
}

.archive__heading {
  margin: 0;
  text-align: center;
  font-size: clamp(12.54px, 1.34vw, 17.92px);
  font-weight: 400;
  letter-spacing: .13em;
}

.archive__subheading {
  margin: 10px 0 54px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.archive-list {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.archive-list li { border-bottom: 1px solid var(--line); }

.archive-list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 18px 4px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .06em;
  transition: opacity .2s ease;
}

.archive-list a::after {
  content: "→";
  margin-left: 20px;
  font-size: 12px;
  color: #aaa;
}

.archive-list a:hover { opacity: .5; }

.news-index {
  width: min(760px, 100%);
  margin: 0 auto;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 54px;
}

.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #ddd;
  text-decoration: none;
  font-size: 11px;
  color: #555;
}

.pagination .current {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 56px 24px 48px;
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--line);
}

.site-footer__copyright {
  margin: 18px 0 0;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--muted);
}

.page-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 20;
  width: 48px;
  height: 48px;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.page-top:hover {
  opacity: .55;
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .hero-scroll { height: 165vh; }

  .company-profile,
  .news-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .company-profile h4 { margin-bottom: 56px; }
  .company-profile dt { margin-top: 34px; }
  .company-profile dd { font-size: 14px; line-height: 1.9; }

  .news-section__subheading { margin-bottom: 48px; }

  .news-list__link,
  .news-index__link {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 0;
    padding: 20px 2px;
  }

  .news-list__date,
  .news-index__date { font-size: 10px; }

  .news-list__title,
  .news-index__title {
    font-size: 13px;
    line-height: 1.7;
  }

  .page-header,
  .umiiro-breadcrumb,
  .page-main {
    width: calc(100% - 40px);
  }

  .page-header { padding-top: 24px; }

  .brand-hit,
  .brand-logo {
    width: 180px;
    height: 52.8px;
  }

  .brand-logo__stage {
    transform: scale(.258) translate(-605px, -512px);
  }

  .umiiro-breadcrumb { margin-top: 80px; }

  .page-main {
    padding-top: 58px;
    padding-bottom: 110px;
  }

  .page-title { margin-bottom: 66px; }
  .latest { padding-bottom: 74px; }
  .article__title { margin-bottom: 38px; }
  .article__body { font-size: 13px; line-height: 2; }
  .archive { padding-top: 74px; }
  .archive__subheading { margin-bottom: 42px; }
  .archive-list a { min-height: 60px; font-size: 12px; }

  .pagination { margin-top: 42px; gap: 5px; }
  .pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
  }

  .page-top {
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }

  .site-footer {
    padding: 44px 20px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glyph {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}


/* ===== WORDPRESS EXISTING-CONTENT COMPATIBILITY ===== */
.article__body > *:first-child { margin-top: 0; }
.article__body > *:last-child { margin-bottom: 0; }

.article__body h2,
.article__body h3,
.article__body h4 {
  margin: 2.2em 0 .9em;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
}

.article__body h2 { font-size: 20px; }
.article__body h3 { font-size: 17px; }
.article__body h4 { font-size: 15px; }

.article__body ul,
.article__body ol {
  margin: 0 0 1.65em;
  padding-left: 1.5em;
}

.article__body blockquote {
  margin: 2em 0;
  padding: 1em 1.4em;
  border-left: 2px solid #ccc;
  color: #555;
}

.article__body .wp-block-image,
.article__body figure {
  margin: 2em 0;
}

.article__body .wp-block-image img,
.article__body figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

.news-index__link {
  color: var(--text) !important;
}

.news-index__title {
  min-width: 0;
}

.pagination {
  flex-wrap: wrap;
}

.pagination .page-numbers {
  margin: 0;
  border-radius: 0;
  background: #fff;
  line-height: 1;
}

.pagination .page-numbers:hover {
  background: #f6f6f6;
}

.pagination .page-numbers.current {
  background: #111;
  color: #fff;
}

.umiiro-breadcrumb {
  display: block;
  padding: 0;
  background: transparent;
}

.umiiro-breadcrumb ol {
  margin-bottom: 0;
}

.umiiro-breadcrumb li {
  display: inline-flex;
  align-items: center;
}

/* Bootstrap utility safety for theme-owned headings */
.page-title h1,
.article__title,
.archive__heading {
  color: var(--text);
}


/* ===== RESPONSIVE REFINEMENTS ===== */

/* Tablet */
@media (max-width: 900px) {
  .company-profile__inner,
  .news-section__inner,
  .page-header,
  .umiiro-breadcrumb,
  .page-main {
    width: min(100%, calc(100% - 48px));
  }

  .news-list__link,
  .news-index__link {
    grid-template-columns: 120px 1fr;
    gap: 20px;
  }

  .article {
    width: min(680px, 100%);
  }

  .archive-list,
  .news-index {
    width: min(720px, 100%);
  }
}

/* Small phones */
@media (max-width: 420px) {
  .company-profile,
  .news-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-header,
  .umiiro-breadcrumb,
  .page-main {
    width: calc(100% - 32px);
  }

  .brand-hit,
  .brand-logo {
    width: 156px;
    height: 46px;
  }

  .brand-logo__stage {
    transform: scale(.224) translate(-605px, -512px);
  }

  .umiiro-breadcrumb {
    margin-top: 64px;
  }

  .company-profile h3,
  .news-section__heading {
    font-size: 22px;
  }

  .company-profile h4,
  .news-section__subheading {
    font-size: 10px;
  }

  .company-profile dd,
  .article__body {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .page-title h1 {
    font-size: 18px;
  }

  .article__title {
    font-size: 20px;
  }

  .site-footer__copyright {
    font-size: 9px;
  }
}

/* Landscape phones / short viewport */
@media (max-height: 560px) and (orientation: landscape) {
  .hero-scroll {
    height: 150vh;
  }

  .sticky-stage {
    min-height: 100svh;
  }
}


.business-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding-bottom: 2px;
  border-bottom: 1px solid #aaa;
  color: #444;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-decoration: none;
  transition: opacity .2s ease;
}

.business-link:hover {
  opacity: .55;
}

.business-link__icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .business-link {
    margin-top: 10px;
    font-size: 10px;
  }

  .business-link__icon {
    width: 13px;
    height: 13px;
  }
}
