/* ============================================================
   Stella ポートフォリオサイト
   デザイン: 案B「水彩のぬくもり」（実装計画_v2.md §5）
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #FFFDF6;
  --face: #FFFBEB;
  --ink: #383021;
  --accent: #FDE68A;
  --rule: #F0E8D2;
  --font-display: "Zen Kaku Gothic New", "Yu Gothic Medium", "Yu Gothic", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Yu Gothic Medium", "Yu Gothic", sans-serif;
  --head-h: 62px;
}

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 18px; font-weight: 500; line-height: 1.85;
}
img { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 28px; }
section[id] { scroll-margin-top: calc(var(--head-h) + 16px); }

/* ---- 固定ヘッダー ---- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 253, 246, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-head-inner {
  max-width: 980px; margin: 0 auto; padding: 0 28px;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-name { font-family: var(--font-display); font-weight: 500; font-size: 17px; letter-spacing: .12em; }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; letter-spacing: .08em; overflow-x: auto; }
.site-nav a { color: var(--ink); text-decoration: none; opacity: .8; white-space: nowrap; }
.site-nav a:hover { opacity: 1; }
.pill {
  display: inline-block; text-decoration: none;
  background: var(--accent); color: var(--ink);
  border-radius: 999px; padding: 8px 20px;
  font-size: 14px; letter-spacing: .06em; white-space: nowrap;
}
.pill:hover { filter: brightness(.97); }
a:focus-visible, button:focus-visible { outline: 2px solid #E8C468; outline-offset: 2px; }

/* ---- 共通パーツ ---- */
.ph { /* 画像が来るまでのプレースホルダー */
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: .2em;
  border-radius: 22px;
  background:
    radial-gradient(circle at 25% 30%, rgba(250,224,150,.55), rgba(250,224,150,0) 55%),
    radial-gradient(circle at 75% 70%, rgba(200,224,210,.5), rgba(200,224,210,0) 60%),
    #FFFEFA;
  box-shadow: 0 2px 14px rgba(140,120,70,.07);
}
section.block { padding: 110px 0; }
.sec-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 2.9vw, 31px); letter-spacing: .06em;
  line-height: 1.8; margin: 0 0 24px; text-wrap: balance;
}
.sec-title::after {
  content: ""; display: block; width: 54px; height: 7px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(253,230,138,.9), rgba(246,217,210,.8));
  margin-top: 16px;
}
.sec-lead { margin: 0 0 56px; opacity: .92; max-width: 38em; }
.kari { font-size: 12.5px; letter-spacing: .14em; opacity: .45; }

@media (prefers-reduced-motion: no-preference) {
  .fade { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
  .fade.in { opacity: 1; transform: none; }
}

/* ---- ヒーロー（中央寄せ・水彩のにじみ背景） ---- */
.hero {
  position: relative; overflow: hidden; padding-top: var(--head-h);
  background:
    radial-gradient(circle at 80% 16%, rgba(250,224,150,.5), rgba(250,224,150,0) 42%),
    radial-gradient(circle at 10% 30%, rgba(244,200,190,.34), rgba(244,200,190,0) 36%),
    radial-gradient(circle at 86% 84%, rgba(200,224,210,.42), rgba(200,224,210,0) 40%),
    radial-gradient(circle at 22% 90%, rgba(216,230,242,.38), rgba(216,230,242,0) 36%),
    var(--face);
}
.hero .blob { position: absolute; border-radius: 50%; filter: blur(34px); pointer-events: none; }
.hero .b1 { width: 380px; height: 380px; top: -110px; right: -70px; background: rgba(251,231,169,.6); }
.hero .b2 { width: 300px; height: 300px; bottom: -100px; left: -60px; background: rgba(246,217,210,.5); }
@media (prefers-reduced-motion: no-preference) {
  .hero .b1 { animation: intro-blob 1.6s ease .2s forwards, drift1 16s ease-in-out 1.8s infinite alternate; opacity: 0; }
  .hero .b2 { animation: intro-blob 1.6s ease .5s forwards, drift2 21s ease-in-out 2.1s infinite alternate; opacity: 0; }
  @keyframes drift1 { to { transform: translate(-36px, 26px) scale(1.08); } }
  @keyframes drift2 { to { transform: translate(30px, -22px) scale(1.06); } }
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 150px 0 160px;
}
/* ページを開いた時の浮かび上がり演出 */
@media (prefers-reduced-motion: no-preference) {
  .site-head { opacity: 0; animation: intro-down .8s ease .1s forwards; }
  .hero-inner > * { opacity: 0; animation: intro-rise .9s cubic-bezier(.22,.61,.36,1) forwards; }
  .hero-inner > *:nth-child(1) { animation-delay: .25s; }
  .hero-inner > *:nth-child(2) { animation-delay: .45s; }
  .hero-inner > *:nth-child(3) { animation-delay: .65s; }
  .hero-inner > *:nth-child(4) { animation-delay: .8s; }
  .hero-inner > *:nth-child(5) { animation-delay: 1s; }
  @keyframes intro-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes intro-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  @keyframes intro-blob { from { opacity: 0; } to { opacity: 1; } }
}
.hero-eyebrow { font-size: 12.5px; letter-spacing: .34em; opacity: .6; margin: 0 0 26px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(29px, 4.4vw, 44px); line-height: 1.8;
  letter-spacing: .06em; margin: 0 0 22px; text-wrap: balance;
}
.swash {
  width: 130px; height: 9px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(253,230,138,.9), rgba(246,217,210,.8));
  margin: 0 0 34px;
}
.hero p.lead { margin: 0 0 44px; max-width: 32em; opacity: .92; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 24px; }
.pill.ghost-btn {
  background: #FFFEFA; border: 1px solid var(--rule); color: var(--ink);
  padding: 12px 32px; box-shadow: 0 2px 10px rgba(140,120,70,.06);
}
.pill.ghost-btn:hover { filter: none; background: #fff; border-color: #E7DDBF; }

/* ---- プロフィール ---- */
.about { display: flex; gap: 48px; align-items: flex-start; }
.about-profile { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 150px; }
.about-ph { width: 150px; min-width: 150px; aspect-ratio: 1; border-radius: 50%; }
.about img.about-photo { width: 150px; min-width: 150px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.about-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .1em; margin: 0; text-align: center; }
.about-name span { display: block; font-size: 12px; letter-spacing: .24em; opacity: .5; margin-top: 3px; }
.about-text p { margin: 0 0 1em; max-width: 38em; }

/* ---- 制作実績 ---- */
.kodawari { display: flex; gap: 52px; align-items: center; margin-bottom: 90px; }
#featured-works .kodawari:nth-child(even) { flex-direction: row-reverse; }
.kodawari-ph, .kodawari-img { flex: 1 1 46%; aspect-ratio: 16/11; }
.kodawari-img { border-radius: 22px; object-fit: cover; cursor: zoom-in; box-shadow: 0 2px 14px rgba(140,120,70,.07); }
.kodawari-text { flex: 1 1 54%; }
.kodawari-text h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .06em; margin: 0 0 4px; }
.kodawari-text .work-cap { margin: 0 0 16px; }
.kodawari-text p { margin: 0 0 1em; opacity: .9; }
.kodawari-note strong { font-weight: 500; }
.works-sub {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: .1em; margin: 84px 0 28px;
}
.works-sub.first { margin-top: 8px; }

/* 自主制作: 1ページのカード */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px; }
.work-ph, .work-img { aspect-ratio: 3/4; margin-bottom: 16px; width: 100%; }
.work-img { border-radius: 18px; object-fit: cover; cursor: zoom-in; box-shadow: 0 2px 14px rgba(140,120,70,.07); }

/* 作画担当: 書影＋中身1ページのカード */
.book-works { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 44px; }
.book-images { display: flex; gap: 18px; margin-bottom: 16px; align-items: flex-start; }
.book-ph { width: calc(50% - 9px); aspect-ratio: 3/4; }
.book-img {
  width: calc(50% - 9px); height: auto; align-self: flex-start;
  border-radius: 12px; object-fit: contain; cursor: zoom-in;
  box-shadow: 0 2px 14px rgba(140,120,70,.07);
}
.badge {
  display: inline-block; font-size: 12.5px; letter-spacing: .1em;
  padding: 4px 13px; border-radius: 999px; margin-bottom: 10px;
}
.badge.main { background: var(--accent); }
.badge.sub { background: #FFFFFF; border: 1px solid #E0D8BE; color: var(--ink); }
.work-title { font-family: var(--font-display); font-weight: 700; font-size: 18.5px; letter-spacing: .06em; margin: 0 0 4px; }
.work-cap { font-size: 14.5px; opacity: .85; margin: 0; }
.works-note { margin: 44px 0 0; font-size: 17px; opacity: .9; padding-left: 6px; }

/* ---- スキル ---- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.skill { background: var(--face); border-radius: 20px; padding: 26px 26px 22px; }
.skill-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: 14px;
  background: radial-gradient(circle at 35% 35%, rgba(253,230,138,.65), rgba(246,217,210,.4));
}
.skill h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .06em; margin: 0 0 8px; }
.skill p { font-size: 15px; opacity: .85; margin: 0; line-height: 1.85; }

/* ---- 料金 ---- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin-bottom: 60px; }
.price-grid.single { max-width: 560px; }
.price-card { background: var(--face); border-radius: 24px; padding: 36px 34px; }
.price-card.primary { box-shadow: 0 3px 18px rgba(140,120,70,.1); }
.price-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .04em; margin: 0 0 10px; }
.price-num { font-size: 28px; font-weight: 500; letter-spacing: .04em; margin: 0 0 6px; }
.price-num small { font-size: 14px; opacity: .7; }
.price-min { font-size: 15px; opacity: .9; margin: 0 0 18px; }
.price-includes {
  list-style: none; margin: 0 0 18px; padding: 18px 0 0; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 8px 10px;
}
.price-includes li {
  font-size: 14px; background: #FFFEFA; border: 1px solid var(--rule);
  border-radius: 999px; padding: 4px 14px;
}
.price-card p.desc { font-size: 15px; opacity: .85; margin: 0; line-height: 1.85; }
.price-option { font-size: 13.5px; opacity: .75; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.no-take { border: 1px solid var(--rule); border-radius: 20px; padding: 24px 30px; margin-bottom: 60px; }
.no-take h3 { font-family: var(--font-display); font-weight: 500; font-size: 15.5px; letter-spacing: .1em; margin: 0 0 8px; }
.no-take ul { margin: 0; padding-left: 1.3em; font-size: 14.5px; opacity: .85; }
.flow-head { font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: .14em; margin: 0 0 18px; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.flow-step { text-align: center; background: var(--face); border-radius: 18px; padding: 22px 12px 18px; }
.flow-step .num { font-family: var(--font-display); font-size: 12.5px; letter-spacing: .2em; opacity: .5; display: block; margin-bottom: 4px; }
.flow-step .name { font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: .1em; }

/* ---- ご案内 ---- */
.doors-box { background: var(--face); border-radius: 26px; padding: 26px 34px; }
.door {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 24px 6px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid #F3E9CC;
}
.door:last-child { border-bottom: none; }
.door-emoji { font-size: 17px; line-height: 1.2; }
.door-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.door-what { font-family: var(--font-display); font-weight: 500; font-size: 16.5px; letter-spacing: .06em; }
.door-desc { font-size: 14.5px; line-height: 1.55; letter-spacing: .02em; opacity: .85; }
.door-where { font-size: 13.5px; letter-spacing: .12em; opacity: .55; }
.doors-note { font-size: 14.5px; opacity: .8; margin: 18px 0 0; padding-left: 6px; }

/* ---- お問い合わせ ---- */
.contact { background: var(--face); }
.contact-inner { text-align: center; padding: 100px 0; }
.contact p.lead { max-width: 32em; margin: 0 auto 40px; opacity: .85; }
.contact-main { padding: 15px 46px; font-size: 15.5px; }
.contact-dm-label { font-size: 14.5px; opacity: .8; margin: 30px 0 14px; }
.contact-dm-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.contact-dm-btns .ghost-btn { min-width: 128px; padding: 11px 28px; font-size: 14.5px; }
.contact .sec-title::after { margin-left: auto; margin-right: auto; }

/* ---- フッター ---- */
.site-foot {
  padding: 60px 0; font-size: 13.5px; letter-spacing: .1em; opacity: .6;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}

/* ---- ライトボックス ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(40, 36, 28, .88);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 88vh; border-radius: 8px; }
.lightbox button {
  position: absolute; background: none; border: none; color: #FFFDF6;
  font-size: 40px; cursor: pointer; padding: 16px; line-height: 1;
  opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 18px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---- レスポンシブ ---- */
@media (max-width: 760px) {
  .hero-inner { padding: 90px 0 110px; }
  .about { flex-direction: column; }
  .kodawari, #featured-works .kodawari:nth-child(even) { flex-direction: column; gap: 24px; }
  .kodawari-ph, .kodawari-img { width: 100%; }
  section.block { padding: 80px 0; }
  .site-nav { gap: 16px; }

  /* スマホでの読みやすさ: 本文と細かい文字を底上げ */
  body { font-size: 19px; }
  .sec-lead, .about-text p, .kodawari-text p, .hero p.lead, .contact p.lead { font-size: 18px; }
  .door-what, .skill h3, .work-title, .kodawari-text h3 { font-size: 18px; }
  .skill p, .price-card p.desc, .price-min, .no-take ul, .works-note { font-size: 16px; }
  .door-desc, .doors-note, .contact-dm, .price-includes li, .price-option, .badge, .work-cap { font-size: 15.5px; }
}
