/* HOBBY DIGITAL WORKS — colors and fonts from homepage.ai mockup */
:root {
  --page-bg: #bdccd4;
  --title: #3d3432;
  --logo-ink: #231815;
  --logo-blue: #3c71b0;
  --feature-bar-bg: #7b7e82;
  --feature-cat: #55fff7;
  --white: #ffffff;
  --font-ja: "LINE Seed JP", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mincho: "BIZ UDPMincho", "BIZ UDP明朝", "Noto Serif JP", "Yu Mincho", serif;
  --header-height: 118px;
  --page-gutter: clamp(1.5rem, 7.2vw, 8.5rem);
  --feature-tile-height: 132px;
}

@font-face {
  font-family: "LINE Seed JP";
  src: url("fonts/LINESeedJP_OTF_Eb.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed JP";
  src: url("fonts/LINESeedJP_OTF_Bd.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed JP";
  src: url("fonts/LINESeedJP_OTF_Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed JP";
  src: url("fonts/LINESeedJP_OTF_Th.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja);
  color: var(--title);
  background: var(--page-bg);
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- First screen --- */
.hero-screen {
  position: relative;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
  overflow-x: hidden;
  --video-mask-angle: 106deg;
  --video-mask-pos: 54%;
  --video-mask-fade: 3%;
  --video-mask-shift: 100px;
}

.hero-screen-upper {
  position: relative;
  overflow: hidden;
}

.hero-screen-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    var(--video-mask-angle),
    transparent calc(var(--video-mask-pos) - var(--video-mask-fade) + var(--video-mask-shift)),
    #000 calc(var(--video-mask-pos) + var(--video-mask-fade) + var(--video-mask-shift))
  );
  mask-image: linear-gradient(
    var(--video-mask-angle),
    transparent calc(var(--video-mask-pos) - var(--video-mask-fade) + var(--video-mask-shift)),
    #000 calc(var(--video-mask-pos) + var(--video-mask-fade) + var(--video-mask-shift))
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  opacity: 0;
}

.hero-screen-video {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  min-width: calc(100% - var(--video-mask-pos) + 6%);
  object-fit: cover;
  object-position: right center;
}

@keyframes hero-video-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-screen-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(189, 204, 212, 0.28);
}

.site-header {
  position: absolute;
  top: clamp(1.25rem, 3.2vw, 2.4rem);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem) 0 var(--page-gutter);
  pointer-events: none;
}

.header-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1.75rem, 3.2vw, 2.75rem);
  pointer-events: auto;
  padding-top: 0.2rem;
  opacity: 0;
}

.header-menu-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  color: var(--title);
}

.header-menu-link:hover .header-menu-ja {
  opacity: 0.72;
}

.header-menu-link:hover .header-menu-ja::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-menu-ja {
  position: relative;
  font-family: var(--font-ja);
  font-size: clamp(0.92rem, 1.08vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

.header-menu-ja::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.18em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.header-menu-en {
  font-family: var(--font-ja);
  font-size: clamp(0.62rem, 0.72vw, 0.72rem);
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: rgba(61, 52, 50, 0.78);
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  pointer-events: auto;
}

.site-logo-img {
  width: clamp(148px, 14vw, 210px);
  max-width: 46vw;
  height: auto;
}

.header-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.social-link,
.profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}

.social-link:hover,
.profile-link:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

.social-link--note,
.social-link--youtube {
  width: 36px;
  height: 36px;
  padding: 0;
}

.social-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.social-icon--profile {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
}

/* Hero copy + MAGICHAND */
.hero {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-width: 0;
  padding: calc(clamp(6.5rem, 12vh, 9rem) + 50px) var(--page-gutter) calc(clamp(1.75rem, 4.5vh, 3.25rem) + 250px - var(--feature-tile-height));
  overflow: hidden;
}

.hero-stage {
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 58rem;
}

.hero-title {
  font-family: var(--font-ja);
  font-weight: 800;
  font-size: clamp(2.85rem, 7.2vw, 6.15rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--title);
}

.hero-title-line {
  display: block;
  white-space: nowrap;
  opacity: 0;
}

.hero-title-line + .hero-title-line {
  margin-top: 15px;
  animation-delay: 0.72s;
}

@keyframes hero-title-float-in {
  from {
    opacity: 0;
    transform: translateY(1.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-screen.is-media-ready .hero-screen-media {
  animation: hero-video-fade-in 4.6s ease both;
}

.hero-screen.is-media-ready .hero-title-line {
  animation: hero-title-float-in 4.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-screen.is-media-ready .hero-title-line + .hero-title-line {
  animation-delay: 0.72s;
}

.hero-screen.is-media-ready .header-menu,
.hero-screen.is-media-ready .hero-tagline,
.hero-screen.is-media-ready .hero-sub,
.hero-screen.is-media-ready .hero-hand {
  animation: hero-video-fade-in 4.6s ease both;
}

.hero-tagline {
  margin-top: clamp(1.1rem, 2.4vw, 1.85rem);
  font-family: var(--font-mincho);
  font-weight: 400;
  font-size: clamp(1.12rem, 2.35vw, 2.05rem);
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--title);
  opacity: 0;
}

.hero-sub {
  margin-top: 0.85rem;
  font-family: var(--font-ja);
  font-weight: 300;
  font-size: clamp(0.68rem, 1.05vw, 0.92rem);
  letter-spacing: 0.08em;
  color: rgba(61, 52, 50, 0.78);
  overflow-wrap: anywhere;
  opacity: 0;
}

.hero-sub-sep {
  letter-spacing: 0.12em;
}

.hero-br-mobile {
  display: none;
}

.hero-hand {
  position: absolute;
  z-index: 1;
  left: calc(32% - 20px);
  top: auto;
  bottom: 0;
  width: min(32vw, 460px);
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0;
}

/* Feature bar */
.feature-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--feature-bar-bg);
  margin-top: 0;
  overflow: hidden;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 1.15rem 1.1rem 1.2rem;
  color: var(--white);
  min-width: 0;
  min-height: var(--feature-tile-height);
  border-right: 1px solid var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.feature-item:first-child {
  border-left: 1px solid var(--white);
}

.feature-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.feature-item:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -2px;
}

.feature-category {
  font-size: clamp(0.58rem, 0.78vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 0.28rem;
  color: var(--feature-cat);
}

.feature-name {
  font-size: clamp(0.78rem, 1.15vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.feature-desc {
  font-size: clamp(0.52rem, 0.72vw, 0.68rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

/* Below-the-fold content */
.message-section {
  background: var(--page-bg);
  padding: clamp(3rem, 8vh, 5rem) 1.25rem 2.5rem;
  text-align: center;
}

.message-section-lead {
  margin: 0 auto 1.25rem;
  max-width: 40em;
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.75;
  color: var(--title);
}

.message-section-body {
  max-width: 42em;
  margin-inline: auto;
}

.message-section-body p {
  margin: 0 0 1rem;
  font-family: var(--font-mincho);
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  letter-spacing: 0.04em;
  line-height: 1.85;
  color: rgba(61, 52, 50, 0.88);
}

.message-section-body p:last-child {
  margin-bottom: 0;
  font-size: clamp(0.72rem, 1.5vw, 0.82rem);
  opacity: 0.75;
}

.service-sections {
  background: var(--page-bg);
}

.service-section {
  scroll-margin-top: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-bottom: 1px solid rgba(61, 52, 50, 0.12);
}

.service-section:last-child {
  border-bottom: none;
}

.service-section-label {
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--logo-blue);
}

.service-section-title {
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--title);
  margin-bottom: 0.1rem;
  overflow-wrap: anywhere;
}

.service-section-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--title);
  opacity: 0.9;
}

.service-section-body {
  margin: 1.25rem 0 0;
  font-family: var(--font-mincho);
  font-size: clamp(0.9rem, 1.9vw, 1.05rem);
  letter-spacing: 0.04em;
  line-height: 1.9;
  color: var(--title);
  opacity: 0.92;
  overflow-wrap: anywhere;
}

.service-section img {
  width: 100%;
  height: auto;
  margin: 0.75rem 0;
  border-radius: 4px;
}

.site-footer {
  background: var(--page-bg);
  padding: 0.85rem 1.5rem 1.5rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

@media (max-width: 1100px) {
  .hero-hand {
    left: calc(32% - 20px);
    width: min(36vw, 400px);
    top: auto;
    bottom: 0;
  }

  .feature-item {
    padding: 1rem 0.75rem;
  }
}

@media (max-width: 900px) {
  :root {
    --feature-tile-height: 110px;
  }

  .site-header {
    top: 1rem;
    padding: 0 1rem 0 1.25rem;
  }

  .site-logo-img {
    width: min(32vw, 150px);
    max-width: 150px;
  }

  .hero {
    padding: calc(7.5rem + 50px) 1.25rem calc(1.25rem + 250px - var(--feature-tile-height));
  }

  .hero-title {
    font-size: clamp(2.1rem, 9.5vw, 3.2rem);
  }

  .hero-title-line {
    white-space: nowrap;
  }

  .hero-title-line + .hero-title-line {
    margin-top: 15px;
  }

  .hero-hand {
    left: 34%;
    right: auto;
    top: auto;
    bottom: 0;
    width: min(48vw, 280px);
  }

  .hero-copy {
    max-width: calc(100% - 0.25rem);
  }

  .feature-bar {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-item {
    min-height: var(--feature-tile-height);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  .feature-item:nth-child(3n) {
    border-right: none;
  }

  .feature-item:nth-child(4),
  .feature-item:nth-child(5),
  .feature-item:nth-child(6) {
    border-bottom: none;
  }

  .feature-item:nth-child(4) {
    border-left: 1px solid var(--white);
  }
}

@media (max-width: 520px) {
  .header-social {
    gap: 0.35rem;
  }

  .social-link--note,
  .social-link--youtube,
  .social-link--note .social-icon,
  .social-link--youtube .social-icon {
    width: 30px;
    height: 30px;
  }

  .social-icon--profile {
    width: 36px;
    height: 36px;
  }

  .site-header {
    top: 0.75rem;
    padding: 0 0.75rem 0 1rem;
  }

  .site-logo-img {
    width: min(38vw, 140px);
    max-width: 140px;
  }

  .hero {
    padding: calc(6.5rem + 50px) 1rem calc(1.1rem + 250px - var(--feature-tile-height));
  }

  .hero-title {
    font-size: clamp(1.7rem, 8.8vw, 2.35rem);
  }

  .hero-br-mobile {
    display: block;
  }

  .hero-tagline {
    max-width: 14em;
  }

  .hero-tagline-keep {
    white-space: nowrap;
  }

  .hero-sub {
    max-width: none;
    white-space: nowrap;
  }

  .hero-title-line + .hero-title-line {
    margin-top: 15px;
  }

  .hero-hand {
    left: 32%;
    right: auto;
    top: auto;
    bottom: 0;
    width: min(55vw, 210px);
  }

  .feature-item {
    overflow: hidden;
    min-width: 0;
  }

  .feature-bar {
    grid-template-columns: 1fr 1fr;
  }

  .feature-item,
  .feature-item:nth-child(3n),
  .feature-item:nth-child(4) {
    border-right: 1px solid var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    border-left: none;
  }

  .feature-item:first-child,
  .feature-item:nth-child(odd) {
    border-left: 1px solid var(--white);
  }

  .feature-item:nth-child(2n) {
    border-right: 1px solid var(--white);
  }

  .feature-item:nth-child(5),
  .feature-item:nth-child(6) {
    border-bottom: none;
  }

  .feature-name {
    font-size: 0.78rem;
    word-break: break-word;
  }

  .message-section-body p {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .feature-bar {
    grid-template-columns: 1fr;
  }

  .feature-item,
  .feature-item:nth-child(odd),
  .feature-item:nth-child(2n) {
    border-left: 1px solid var(--white);
    border-right: 1px solid var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  .feature-item:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-screen-media {
    display: none;
  }

  .hero-title-line {
    animation: none;
    opacity: 1;
  }

  .header-menu,
  .hero-tagline,
  .hero-sub,
  .hero-hand {
    animation: none;
    opacity: 1;
  }
}
