/* デザインルールは design.md を基準にする */
:root {
  --accent: #b39b82;
  --bg: #ffffff;
  --bg-sub: #f1ebe2;
  --greige: #c9bfb2;
  --text: #4a4540;
  --text-sub: #857c72;
  --font: "Noto Sans JP", sans-serif;
  --max: 1120px;
  --section-y: 56px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.04em;
}
h1, h2, h3 { line-height: 1.4; font-weight: 500; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.pc { display: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* header */
.header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}
.logo { white-space: nowrap; font-size: 16px; font-weight: 500; text-decoration: none; letter-spacing: 0.06em; }
.nav { display: none; gap: 32px; }
.nav a { font-size: 14px; text-decoration: none; color: var(--text-sub); }
.nav a:hover { color: var(--text); }
.header__cta {
  white-space: nowrap; font-size: 14px; text-decoration: none;
  padding: 8px 16px; border: 1px solid var(--accent); border-radius: 6px; color: var(--text);
}
.header__cta:hover { background: var(--accent); color: #fff; }

/* placeholder */
.photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--greige); color: #fff;
  font-size: 14px; width: 100%; height: 100%;
}

/* section common */
.section { padding: var(--section-y) var(--gutter); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section--sub { background: var(--bg-sub); }
.section__label { color: var(--accent); font-size: 14px; font-weight: 500; letter-spacing: 0.1em; margin-bottom: 8px; }
.section__title { font-size: 28px; font-weight: 700; margin-bottom: 32px; }
.section > .section__lead { max-width: var(--max); margin-bottom: 48px; }

/* hero（見せ場はここ1か所） */
.hero { display: grid; gap: 32px; padding: 16px var(--gutter) var(--section-y); max-width: var(--max); margin: 0 auto; }
.hero__photo { aspect-ratio: 4 / 5; width: 72%; border-radius: 8px; overflow: hidden; }
.hero__photo img, .about__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo img { object-position: 60% 60%; }
.hero__brand { color: var(--text-sub); font-size: 14px; letter-spacing: 0.08em; }
.hero__copy { font-size: 32px; font-weight: 700; margin: 16px 0 24px; letter-spacing: 0.08em; }
.hero__lead { color: var(--text-sub); }

@media (prefers-reduced-motion: no-preference) {
  .hero__photo, .hero__text { animation: fade-in 1.2s ease-out both; }
  .hero__text { animation-delay: 0.2s; }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* about */
.about__title { margin-bottom: 32px; }
.about__title img { height: 56px; width: auto; }
.about__inner { display: grid; gap: 32px; }
.about__photo { aspect-ratio: 1; max-width: 280px; border-radius: 50%; overflow: hidden; }
.about__label { max-width: 280px; margin: 16px 0 0; text-align: center; }
.about__body { max-width: 40em; }
.about__body p + p { margin-top: 16px; }
.about__meta { margin: 32px 0 16px; display: grid; gap: 8px; }
.about__meta div { display: flex; gap: 16px; }
.about__meta dt { color: var(--accent); min-width: 64px; font-weight: 500; }
.skills { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.skills li { display: flex; align-items: center; gap: 16px; }
.skill__mark {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  --p: calc(var(--level, 4) * 25%);
  background: conic-gradient(var(--accent) 0 var(--p), var(--bg-sub) var(--p) 100%);
}
.skill__mark[data-level="4"] { --level: 4; }
.skill__mark[data-level="3"] { --level: 3; }
.skill__mark[data-level="2"] { --level: 2; }
.skills__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; font-size: 14px; color: var(--text-sub); }
.skills__legend .skill__mark { width: 16px; height: 16px; }
.skills__legend .skill__mark:not(:first-child) { margin-left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* service：番号やカードは使わず、細い線で区切る */
.service__list { display: grid; gap: 0; }
.service__item { padding: 24px 0; border-top: 1px solid var(--greige); }
.service__item:last-child { border-bottom: 1px solid var(--greige); }
.service__item h3 { font-size: 20px; margin-bottom: 8px; }

/* works：画像が主役 */
.works__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
.work-card__img { height: auto; aspect-ratio: 4 / 5; background: var(--bg-sub); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.work-card__img img, .work-card__img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-card__tag { font-size: 14px; color: var(--accent); font-weight: 500; }
.work-card h3 { font-size: 16px; margin: 4px 0 8px; }
.work-card__desc { font-size: 14px; }
.work-card__role { font-size: 14px; color: var(--text-sub); margin-top: 8px; }
.works__note { margin-top: 48px; font-size: 14px; color: var(--text-sub); }

/* flow：番号はここだけ */
.flow__list { list-style: none; display: grid; gap: 24px; }
.flow__list li { border-top: 1px solid var(--greige); padding-top: 16px; }
.flow__step { color: var(--accent); font-size: 14px; font-weight: 500; letter-spacing: 0.1em; }
.flow__list h3 { font-size: 18px; margin: 8px 0; }

/* career */
.career__list { list-style: none; }
.career__list li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--greige); }
.career__list span { color: var(--accent); font-size: 14px; font-weight: 500; }
.career__list b { display: block; font-weight: 500; }
.career__list p { color: var(--text-sub); }
.career__list p b { color: var(--text); }
.license { margin-top: 48px; }
.license h3 { font-size: 18px; margin-bottom: 8px; }

/* contact */
.contact > *, .section.contact > .section__lead { max-width: 640px; }
.form { display: grid; gap: 24px; }
.form label { display: grid; gap: 8px; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; padding: 12px 16px; font: inherit;
  border: 1px solid var(--greige); border-radius: 6px; background: #fff; color: var(--text);
}
.form fieldset { border: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.form legend { margin-bottom: 8px; width: 100%; }
.form .check { display: flex; align-items: center; gap: 8px; }
.form .agree { display: flex; align-items: center; gap: 8px; justify-content: center; }
.req { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); padding: 0 8px; border-radius: 4px; margin-left: 8px; justify-self: start; }
.btn {
  justify-self: center; padding: 16px 48px; font: inherit; font-weight: 500;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 6px; cursor: pointer;
}
.btn:hover { background: #fff; color: var(--text); }
.contact__sns { margin-top: 32px; text-align: center; font-size: 14px; }

.footer { text-align: center; padding: 32px var(--gutter); color: var(--text-sub); font-size: 14px; display: grid; gap: 8px; }
.footer a { text-decoration: none; }

/* PC */
@media (min-width: 768px) {
  :root { --section-y: 96px; --gutter: 48px; }
  .pc { display: inline; }
  .nav { display: flex; }
  .logo { font-size: 18px; }
  .hero { grid-template-columns: 360px 1fr; align-items: start; gap: 64px; padding-top: 48px; }
  .hero__photo { width: 100%; }
  .hero__brand { line-height: 1; }
  .hero__copy { font-size: 44px; }
  .section__title { font-size: 32px; }
  .about__title img { height: 80px; }
  .about__inner { grid-template-columns: 280px 1fr; gap: 64px; align-items: start; }
  .service__list { grid-template-columns: 1fr 1fr; column-gap: 64px; }
  .service__item:nth-last-child(2) { border-bottom: 1px solid var(--greige); }
  .works__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
  .flow__list { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .career__list li { grid-template-columns: 160px 1fr; }
}

/* privacy policy */
.policy > div { max-width: 40em; }
.policy h2 { font-size: 18px; margin: 32px 0 8px; }
.policy__date { margin-top: 48px; color: var(--text-sub); font-size: 14px; }
@media (min-width: 768px) {
  .work-card h3 { font-size: 18px; }
  .work-card__desc { font-size: 16px; }
}

/* work → portfolio */
.service__more { margin-top: 48px; text-align: center; }
.btn { display: inline-block; text-decoration: none; }
.btn--line { background: transparent; color: var(--text); }
.btn--line:hover { background: var(--accent); color: #fff; }
.portfolio__cta { text-align: center; padding-top: 0; }

/* about more... */
.more { margin-top: 32px; }
.more summary { cursor: pointer; color: var(--accent); font-weight: 500; letter-spacing: 0.1em; list-style: none; text-align: right; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 24px; }
.more__title { font-size: 18px; margin-bottom: 8px; }

.form__status { text-align: center; color: var(--text-sub); min-height: 1.8em; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* portfolio：カルーセルのスライド表示 */
.work-card__gallery { position: relative; display: block; width: 100%; padding: 0; border: none; cursor: zoom-in; font: inherit; }
.work-card__count { position: absolute; right: 8px; bottom: 8px; font-size: 12px; color: #fff; background: rgba(74, 69, 64, 0.7); padding: 0 8px; border-radius: 4px; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 16px; background: rgba(74, 69, 64, 0.9); padding: 48px 8px; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(84vw, 1000px); max-height: 82vh; width: auto; height: auto; border-radius: 8px; }
.lightbox__nav, .lightbox__close { background: none; border: none; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; padding: 8px; }
.lightbox__close { position: absolute; top: 8px; right: 16px; font-size: 32px; }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }
@media (min-width: 768px) {
  .works__list { grid-template-columns: repeat(3, minmax(0, 262px)); gap: 56px 48px; }
}

.work-card__img--tall { aspect-ratio: 9 / 16; }

.work-card__img--a4 { aspect-ratio: 210 / 297; }
.work-card__img--a4 img { object-fit: contain; background: #fff; border: 1px solid var(--bg-sub); border-radius: 8px; }
.work-card__img--slide { aspect-ratio: 16 / 9; }
.work-card--newrow, .work-card--wide { grid-column: 1 / -1; }
.work-card--newrow { max-width: 262px; }
@media (min-width: 768px) {
  .work-card--wide { grid-column: 1 / span 2; }
}
.work-card__link { position: relative; display: block; }
.work-card__link img { transition: opacity .2s; }
.work-card__link:hover img { opacity: .85; }
.work-card__img--site { aspect-ratio: 1440 / 900; border: 1px solid var(--bg-sub); }
.work-card__visit { margin-top: 8px; font-size: 14px; }
.work-card__visit a { color: var(--accent); font-weight: 500; }

/* スマホ：スライドの左右ボタンを画像の下に、押しやすい大きさで */
.lightbox__nav { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); padding: 0 0 4px; }
@media (max-width: 767px) {
  .lightbox { flex-direction: column; padding: 56px 16px 112px; }
  .lightbox__img { max-width: 100%; max-height: 70vh; }
  .lightbox__nav { position: absolute; bottom: 40px; width: 56px; height: 56px; }
  .lightbox__prev { left: calc(50% - 112px); }
  .lightbox__next { right: calc(50% - 112px); }
  .lightbox__count { bottom: 56px; }
}

/* 段落の最後に1〜2文字だけ残らないようにする（対応ブラウザのみ） */
p { text-wrap: pretty; }
