/* 最終デザイン調整：文字サイズ・背景リズム・ファーストビュー */
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.logo img {
  display: block;
  width: 144px;
  height: 48px;
  object-fit: contain;
}
.footer-brand-logo {
  display: block;
  width: 116px;
  height: 116px;
  margin: -14px 0 8px;
  object-fit: contain;
}

.hero-content::before { display: none; }
.hero-photo {
  min-height: clamp(620px, 52vw, 800px);
  margin-bottom: 0;
  padding: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,.38)),
    #dff4fb url("assets/hero-background-tail-design.jpg") center / cover no-repeat;
}
.hero-slides {
  position: absolute;
  z-index: 1;
  top: 8%;
  right: 0;
  width: 54%;
  height: 70%;
  overflow: hidden;
  background: #fff;
  border-radius: clamp(64px, 7vw, 112px) 0 0 clamp(18px, 1.8vw, 30px);
  box-shadow: 0 22px 50px rgba(36,127,169,.11);
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.018);
  animation: hero-crossfade 15s ease-in-out infinite;
  will-change: opacity, transform;
}
.hero-slide-01 { object-position: 50% 63%; animation-delay: -.8s; }
.hero-slide-02 { object-position: 50% 70%; animation-delay: 4.2s; }
.hero-slide-03 { object-position: 52% 62%; animation-delay: 9.2s; }
.hero-overlay { display: none; }
.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 5.6%;
  width: 33%;
  margin: 0;
  transform: translateY(-56%);
}
.hero-content h1 {
  color: #28424e;
  font-size: clamp(34px, 3.25vw, 48px);
}
.hero-content > p:not(.eyebrow) { color: #44616d; }
.hero-content .eyebrow.light { color: var(--blue-deep); }
.hero-content .button { min-width: 160px; }
.hero-content .button-white {
  color: #fff;
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}
.hero-content .button-outline-white {
  color: var(--blue-deep);
  background: rgba(255,255,255,.76);
  border-color: rgba(36,127,169,.42);
}
.hero-area {
  z-index: 2;
  left: 5.6%;
  bottom: 4.5%;
  color: #416879;
  opacity: .78;
}

@keyframes hero-crossfade {
  0% { opacity: 0; transform: scale(1.018); }
  5.33%, 33.33% { opacity: 1; }
  38.67%, 100% { opacity: 0; transform: scale(1.035); }
}

h1 { font-size: clamp(34px, 3.8vw, 52px); }
h2 { font-size: clamp(24px, 2.35vw, 34px); }
.sub-hero h1 { font-size: clamp(30px, 3.2vw, 44px); }

.intro::after { z-index: 0; }

.logo-stream {
  padding-top: 18px;
  padding-bottom: 52px;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(66,172,216,.13) .8px, transparent .8px);
  background-size: 15px 15px;
}
.logo-work {
  width: 230px;
  height: 150px;
  padding: 17px 21px;
}
.logo-work img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-teaser {
  background-color: #edf8fb;
  background-image:
    linear-gradient(rgba(76,155,183,.105) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,155,183,.105) 1px, transparent 1px);
  background-size: 24px 24px;
}
.service-teaser::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 150px;
  right: -65px;
  top: 35px;
  border: 1px solid rgba(66,172,216,.26);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.service-teaser > * { position: relative; z-index: 1; }

/* サービス用の線画アイコン */
.service-icon-stage,
.service-detail-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(rgba(66,172,216,.15) .8px, transparent .8px),
    linear-gradient(145deg, #f8fcfd, #dff4fb);
  background-size: 14px 14px, auto;
}
.service-icon-stage::before,
.service-detail-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(66,172,216,.24);
  border-radius: 50%;
  transform: rotate(-12deg) scaleY(.58);
}
.service-icon-stage {
  height: 215px;
  margin-bottom: 24px;
  border-radius: 24px 5px 24px 5px;
}
.service-icon-stage img {
  width: 104px;
  height: 104px;
  transition: transform .35s ease;
}
.teaser-card:hover .service-icon-stage img { transform: translateY(-3px) scale(1.035); }
.service-icon-stage span,
.service-detail-visual span,
.service-detail-visual small {
  color: var(--blue-deep);
  font: 700 9px/1.4 "Avenir Next", sans-serif;
  letter-spacing: .16em;
}
.service-icon-stage span { margin-top: 5px; }
.service-detail-visual {
  min-height: 330px;
  padding: 42px 24px 34px;
}
.service-detail-visual > span {
  position: absolute;
  top: 26px;
  left: 28px;
}
.service-detail-visual img {
  width: 128px;
  height: 128px;
}
.service-detail-visual small {
  margin-top: 10px;
  font-size: 8px;
  text-align: center;
}
.service-pricing-action {
  margin-top: 70px;
  padding: 36px 28px;
  text-align: center;
  background: var(--blue-mist);
  border: 1px solid rgba(66,172,216,.18);
  border-radius: 32px 6px 32px 6px;
}
.service-pricing-action p {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14px;
}
.service-pricing-action .button { background: #fff; }
.service-pricing-action .button span { transition: transform .2s ease; }
.service-pricing-action .button:hover span { transform: translateX(4px); }

/* お見積りから納品まで */
.flow-list article {
  grid-template-columns: 54px minmax(235px, .95fr) minmax(260px, 1.05fr);
  align-items: center;
  padding: 20px 3px;
}
.flow-title {
  display: flex;
  align-items: center;
  gap: 20px;
}
.flow-title h3 { margin: 0; }
.flow-icon {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(66,172,216,.22);
  border-radius: 23px 5px 23px 5px;
  box-shadow: 0 8px 22px rgba(36,127,169,.07);
  transition: transform .25s ease, background .25s ease;
}
.flow-icon img { width: 52px; height: 52px; }
.flow-list article:hover .flow-icon {
  transform: translateY(-2px);
  background: #fff;
}
.flow-list article > p { font-size: 13px; }

.works-teaser {
  background-color: #fff;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(58,107,126,.052) 32px);
}
.works-teaser::after {
  content: "SELECTED WORKS";
  position: absolute;
  right: 2.5vw;
  top: 45px;
  color: rgba(66,172,216,.08);
  font: 700 clamp(36px, 6vw, 88px)/1 "Avenir Next", sans-serif;
  letter-spacing: -.03em;
  writing-mode: vertical-rl;
}
.works-teaser > * { position: relative; z-index: 1; }

.profile-teaser {
  background-color: #f6f7f3;
  background-image:
    radial-gradient(circle at 8% 18%, rgba(66,172,216,.16), transparent 23%),
    linear-gradient(115deg, transparent 65%, rgba(255,255,255,.78));
}
.profile-photo {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center 62%;
  background: #e8f2ee;
}
.portrait.profile-photo { height: 540px; min-height: 0; }
.story-photo.profile-photo { height: 475px; min-height: 0; object-position: center 60%; }
.story-photo.profile-photo.about-profile-photo {
  width: min(100%, 340px);
  height: 410px;
  justify-self: center;
  object-position: center 48%;
  border-radius: 72px 6px 72px 6px;
}

/* About：屋号の由来をシンボルで補うあしらい */
.name-concept-section {
  overflow: hidden;
  isolation: isolate;
}
.name-concept-heading {
  position: relative;
  min-height: 260px;
  isolation: isolate;
}
.name-concept-heading > .eyebrow,
.name-concept-heading > h2 {
  position: relative;
  z-index: 2;
}
.concept-symbol {
  position: absolute;
  z-index: 1;
  width: clamp(300px, 31vw, 420px);
  aspect-ratio: 1;
  top: -96px;
  left: clamp(55px, 7vw, 118px);
  opacity: .115;
  pointer-events: none;
}
.concept-symbol img {
  display: block;
  width: 100%;
  height: 100%;
}

/* 小さめの本文を一段階だけ読みやすく */
.teaser-card p,
.value-grid p,
.detail-copy ul,
.contact-option p,
.flow-list article > p { font-size: 14px; }
.detail-copy .note,
.stream-heading > p:last-child,
footer p,
footer nav { font-size: 12px; }
.work-caption strong { font-size: 14px; }

/* About：制作で大切にしていること */
.value-card-head {
  min-height: 68px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.value-card-head strong { margin-top: 7px; }
.value-card-icon {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  transition: transform .25s ease;
}
.value-grid article:hover .value-card-icon {
  transform: translateY(-2px);
}
.value-grid p { margin-top: 25px; }

/* Works：カード全体を分かりやすいリンクに */
.work-card { display: block; cursor: pointer; }
.work-logo-thumb {
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 54px);
  background: #fff !important;
  border: 1px solid #d7ecf3;
}
.work-logo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-caption::after {
  content: "→";
  flex: 0 0 auto;
  color: var(--blue-deep);
  transition: transform .2s ease;
}
.work-card:hover .work-caption::after { transform: translateX(4px); }

.contact-section {
  background-color: #fff;
  background-image: radial-gradient(rgba(66,172,216,.1) .75px, transparent .75px);
  background-size: 17px 17px;
}
.contact-form, .line-contact { background-clip: padding-box; }

.content-block.soft-bg {
  background-color: #eef8fb;
  background-image:
    linear-gradient(rgba(76,155,183,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,155,183,.09) 1px, transparent 1px);
  background-size: 24px 24px;
}
.content-block:not(.soft-bg):nth-of-type(even) {
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 34px, rgba(58,107,126,.035) 35px);
}

@media (max-width: 980px) {
  h1 { font-size: clamp(33px, 5vw, 44px); }
  h2 { font-size: clamp(24px, 3.6vw, 30px); }
  .sub-hero h1 { font-size: clamp(30px, 4.8vw, 39px); }
}

@media (max-width: 860px) {
  .hero-photo {
    min-height: 0;
    padding: 56px 0 20px;
    display: grid;
    grid-template-rows: auto minmax(300px, 1fr) auto;
    align-items: stretch;
    gap: 48px;
    background-position: left center;
    background-size: auto 100%;
  }
  .hero-content {
    position: relative;
    grid-row: 1;
    top: auto;
    right: auto;
    left: auto;
    width: auto;
    max-width: 560px;
    margin: 0 36px;
    transform: none;
  }
  .hero-content h1 { font-size: clamp(33px, 5vw, 42px); }
  .hero-slides {
    position: relative;
    grid-row: 2;
    top: auto;
    right: 0;
    bottom: auto;
    left: 14%;
    width: auto;
    height: auto;
    min-height: clamp(300px, 46vw, 390px);
    border-radius: 72px 0 0 22px;
  }
  .hero-area {
    position: relative;
    grid-row: 3;
    left: auto;
    bottom: auto;
    margin: 0 36px;
  }
}

@media (max-width: 540px) {
  .logo img { width: 111px; height: 37px; }
  .footer-brand-logo { width: 98px; height: 98px; margin-top: -10px; }
  h1 { font-size: 31px; line-height: 1.55; }
  h2 { font-size: 24px; line-height: 1.7; }
  h3 { font-size: 17px; }
  .sub-hero h1 { font-size: 29px; }
  .hero-photo {
    width: calc(100% - 20px);
    min-height: 0;
    padding: 46px 0 17px;
    grid-template-rows: auto minmax(280px, 1fr) auto;
    gap: 36px;
    background-position: left center;
    border-radius: 0 0 42px 6px;
  }
  .hero-content {
    top: auto;
    right: auto;
    left: auto;
    margin: 0 22px;
  }
  .hero-content h1 { font-size: 31px; }
  .hero-content .button { min-width: 0; }
  .hero-slides {
    bottom: auto;
    left: 10%;
    height: auto;
    min-height: 280px;
    border-radius: 54px 0 0 17px;
  }
  .hero-area {
    left: auto;
    bottom: auto;
    margin: 0 22px;
    font-size: 8px;
  }
  .hero-slide-01 { object-position: 51% 63%; }
  .hero-slide-02 { object-position: 50% 70%; }
  .hero-slide-03 { object-position: 58% 64%; }
  .portrait.profile-photo { height: 430px; }
  .story-photo.profile-photo.about-profile-photo {
    width: min(100%, 310px);
    height: 365px;
    object-position: center 47%;
    border-radius: 58px 5px 58px 5px;
  }
  .concept-symbol {
    width: 285px;
    top: -78px;
    right: -10px;
    left: auto;
    opacity: .105;
  }
  .name-concept-heading { min-height: 220px; }
  .logo-stream { padding-top: 12px; padding-bottom: 38px; }
  .logo-work { width: 95px; height: 68px; padding: 7px 9px; border-radius: 22px 5px 22px 5px; }
  .service-teaser, .content-block.soft-bg { background-size: 20px 20px; }
  .service-icon-stage { height: 190px; }
  .service-icon-stage img { width: 94px; height: 94px; }
  .service-detail-visual { min-height: 235px; padding: 38px 20px 24px; }
  .service-detail-visual > span { top: 21px; left: 22px; }
  .service-detail-visual img { width: 108px; height: 108px; }
  .service-pricing-action { margin-top: 50px; padding: 30px 20px; }
  .flow-list article {
    grid-template-columns: 34px 1fr;
    gap: 10px 12px;
    align-items: start;
    padding: 22px 2px;
  }
  .flow-title { grid-column: 2; gap: 14px; }
  .flow-icon { flex-basis: 58px; width: 58px; height: 58px; border-radius: 19px 4px 19px 4px; }
  .flow-icon img { width: 44px; height: 44px; }
  .flow-list article > p { grid-column: 2; margin: 0; }
  .works-teaser::after { display: none; }
  .work-caption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
  }
  .work-caption span,
  .work-caption strong { grid-column: 1; }
  .work-caption::after {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; transform: none; }
  .hero-slide:first-child { opacity: 1; }
  .service-icon-stage img { transition: none; }
  .flow-icon { transition: none; }
  .value-card-icon { transition: none; }
}

/* Spreadsheet-provided project introductions. */
.work-intro { margin: 12px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }

/* FILLMAN collaboration: keep Tail Design as the clear inquiry window. */
.team-partner {
  margin-top: 28px;
  padding: 24px 26px;
  background: rgba(225, 244, 249, .68);
  border: 1px solid rgba(74, 174, 214, .24);
  border-radius: 26px 6px 26px 6px;
}
.team-partner-label {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.team-partner > p:not(.team-partner-label) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}
.team-partner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 20px;
}
.team-partner-actions .button { min-width: 190px; }
.team-partner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 6px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: rgba(36, 130, 170, .38);
  text-underline-offset: 5px;
}
.team-partner-link:hover { text-decoration-color: currentColor; }
.profile-affiliation-note {
  padding-left: 15px;
  border-left: 3px solid var(--blue);
  color: var(--ink-soft);
  font-weight: 700;
}

/* Keep the longer Japanese navigation labels on one line. */
.desktop-nav a { white-space: nowrap; }

@media (max-width: 1120px) {
  .desktop-nav,
  .header-cta { display: none; }
  .menu-button { display: block; }
  .desktop-nav.is-open {
    position: absolute;
    top: 91px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 26px 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(37, 50, 58, .08);
  }
  .desktop-nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 540px) {
  .desktop-nav.is-open { top: 71px; }
  .team-partner { margin-top: 24px; padding: 21px 19px; }
  .team-partner-actions { align-items: stretch; gap: 16px; }
  .team-partner-actions .button { width: 100%; min-width: 0; }
  .team-partner-link { width: 100%; }
}

/* Align split homepage sections with the service content width. */
.intro.section-shell,
.profile-teaser.section-shell {
  padding-inline: max(5vw, 26px, calc((100% - var(--max)) / 2));
  column-gap: clamp(32px, 5vw, 80px);
}
.intro-title { padding-left: 32px; }
.eyebrow { font-size: 13px; line-height: 1.5; letter-spacing: .16em; }
@media (max-width: 540px) {
  .intro.section-shell,
  .profile-teaser.section-shell { padding-inline: 22px; }
  .eyebrow { font-size: 12px; }
}
