:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #66645f;
  --paper: #f3f0e9;
  --surface: #fbfaf6;
  --line: #cfcbc0;
  --accent: #ff4f23;
  --shell: min(1440px, calc(100% - 64px));
  --section-space: clamp(88px, 11vw, 176px);
  --grid-gap: clamp(24px, 2.2vw, 34px);
}

* { box-sizing: border-box; }

main :where(p,span,small,a,button,label,li,summary,figcaption,dt,dd,b,strong,em,i) {
  font-size: max(12px, 1em) !important;
}

html {
  scroll-behavior: smooth;
  line-break: strict;
  overflow-wrap: normal;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Arial Nova", "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.phrase {
  display: inline-block;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: -.05em;
}

.brand-name {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  font-size: .75rem;
  font-weight: 700;
}

.header-nav a {
  text-decoration: none;
  white-space: nowrap;
}

.header-nav a:not(.header-cta) { text-underline-offset: 5px; }
.header-nav a:not(.header-cta):hover { text-decoration: underline; }

.header-cta {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease;
}

.header-cta:hover { background: var(--ink); color: white; }

.hero { padding: clamp(48px, 4.4vw, 64px) 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: clamp(64px, 10vw, 160px);
  
  align-items: start;
}

.kicker, .section-kicker, .hero-note-label, .archive-guide-title {
  margin: 0;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.5;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kicker span:last-child { color: var(--accent); }

.hero h1 {
  margin: clamp(28px, 4vw, 58px) 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(3.3rem, 8.8vw, 9.1rem);
  font-weight: 500;
  line-height: .93;
  letter-spacing: -.075em;
}

.hero h1 .phrase { display: block; }

.hero-lead {
  max-width: 760px;
  margin: clamp(34px, 5vw, 72px) 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.05rem, 1.75vw, 1.55rem);
  line-height: 1.85;
  letter-spacing: .04em;
}

.hero-note {
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}

.hero-note-label { color: var(--accent); }

.hero-note > p:not(.hero-note-label) {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.95;
}

.hero-stats {
  
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  
  gap: 14px 8px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-stats div { min-width: 0; }

.hero-stats strong {
  display: block;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  
  
  letter-spacing: normal;
  line-height: 1.35;
  white-space: nowrap;
}

.archive-guide {
  margin-top: clamp(72px, 10vw, 150px);
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(180px, .5fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 40px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.archive-guide p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.8;
}

.scroll-cue {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  white-space: nowrap;
}

.archive { padding: clamp(56px, 5.6vw, 88px) 0 var(--section-space); }

.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.section-kicker { color: var(--accent); }

.archive-head h2, .closing h2 {
  margin: 24px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.35rem, 5.5vw, 5.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.055em;
}

.archive-head h2 .phrase, .closing h2 .phrase { display: block; }

.result-count {
  flex: 0 0 auto;
  margin: 0 0 8px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(44px, 6vw, 84px);
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.filter:hover { border-color: var(--ink); }
.filter.is-active { border-color: var(--ink); background: var(--ink); color: white; }

.filter:focus-visible, .project:focus-visible, .closing-link:focus-visible,
.header-nav a:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
  margin-top: clamp(52px, 7vw, 96px);
}

.project {
  grid-column: span 4;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  overflow: clip;
  transform: translateY(0);
  transition: transform 300ms cubic-bezier(.2, .7, .2, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.project--wide { grid-column: span 8; }

.project:hover {
  border-color: var(--ink);
  box-shadow: 0 24px 56px rgba(22, 22, 22, .11);
  transform: translateY(-7px);
}

.project[hidden] { display: none; }

.project-topline {
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.project-topline span:nth-child(2) { font-size: .75rem; letter-spacing: .08em; }

.project-topline span:last-child {
  justify-self: end;
  color: var(--accent);
  font-size: 1rem;
  transition: transform 220ms ease;
}

.project:hover .project-topline span:last-child { transform: translate(3px, -3px); }

.project-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: #ddd9cf;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 0 solid rgba(255, 255, 255, .8);
  transition: border-width 300ms ease;
}

.project:hover .project-visual::after { border-width: 8px; }

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 650ms cubic-bezier(.2, .7, .2, 1);
}

.project:hover .project-visual img { transform: scale(1.025); }

.project-copy {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(22px, 2.4vw, 34px);
}

.project-copy h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.7vw, 1.65rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.035em;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

.project-copy p {
  margin: 0;
  color: var(--muted);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: .88rem;
  line-height: 1.75;
  letter-spacing: .02em;
}

.js-reveal .project {
  opacity: 0;
  transform: translateY(26px);
}

.js-reveal .project.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 550ms ease, transform 550ms cubic-bezier(.2, .7, .2, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.js-reveal .project.is-visible:hover { transform: translateY(-7px); }

.closing {
  padding: var(--section-space) 0;
  background: var(--ink);
  color: white;
}

.closing-grid {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr);
  gap: clamp(48px, 10vw, 160px);
}

.closing-index {
  margin: -.08em 0 0;
  color: var(--accent);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(6rem, 15vw, 15rem);
  line-height: .8;
  letter-spacing: -.08em;
}

.closing-copy { min-width: 0; }

.closing-copy > p:not(.section-kicker) {
  max-width: 700px;
  margin: 40px 0 0;
  color: #b8b6b0;
  font-size: .92rem;
  line-height: 1.95;
}

.closing-link {
  max-width: 700px;
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 54px;
  padding: 0 28px;
  border: 1px solid #787671;
  color: white;
  text-decoration: none;
  font-size: clamp(.9rem, 1.5vw, 1.15rem);
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.closing-link span:first-child { word-break: auto-phrase; overflow-wrap: normal; min-width: 0; }
/* 2026-08-14: 文言が「0円ホームページ制作を無料で相談する」へ伸び、keep-all のままだと
   320px で 19px はみ出した(browser gate が horizontal-overflow を検出)。
   語の途中では折らず、文節で折れるようにする。 */
.closing-link span:last-child { flex: 0 0 auto; color: var(--accent); font-size: 1.2rem; }
.closing-link:hover { border-color: white; background: white; color: var(--ink); }

.site-footer {
  padding: 52px 0;
  border-top: 1px solid #343434;
  background: var(--ink);
  color: white;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: clamp(36px, 6vw, 90px);
}

.footer-inner strong { font-size: .84rem; }
.footer-inner p { margin: 10px 0 0; color: #96948f; font-size: .75rem; }
.footer-links { display: flex; gap: 26px; font-size: .75rem; }
.footer-links a { text-underline-offset: 4px; white-space: nowrap; }
.copyright { margin: 0 !important; white-space: nowrap; }

@media (max-width: 1100px) {
  :root { --shell: min(100% - 48px, 1440px); }
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 64px; }
  .project, .project--wide { grid-column: span 6; }
  .archive-guide { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 28px; }
}

@media (max-width: 780px) {
  :root { --shell: calc(100% - 40px); }
  .header-inner { min-height: 72px; }
  .header-nav > a:not(.header-cta) { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 58px; }
  .hero h1 { font-size: clamp(3.2rem, 14.5vw, 6.7rem); }
  .hero-note { max-width: 560px; }
  .archive-guide { min-height: 0; grid-template-columns: 1fr auto; padding: 24px 0; }
  .archive-guide p { grid-column: 1 / -1; grid-row: 2; }
  .scroll-cue { grid-column: 2; grid-row: 1; }
  .archive-head { align-items: start; flex-direction: column; gap: 28px; }
  .result-count { margin: 0; }
  .closing-grid { grid-template-columns: minmax(0, 1fr); gap: 58px; }
  .closing-index { font-size: clamp(7rem, 32vw, 11rem); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .copyright { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 28px); --grid-gap: 24px; }
  .brand-name { font-size: .75rem; }
  .header-cta { min-height: 38px; padding-inline: 16px; }
  .hero { padding-top: 64px; }
  .hero h1 { margin-top: 30px; font-size: clamp(2.85rem, 14vw, 5.2rem); line-height: 1; }
  .hero-lead { margin-top: 38px; font-size: 1rem; line-height: 1.9; }
  .hero-stats { gap: 8px; }
  .hero-stats span { font-size: .75rem; letter-spacing: .04em; }
  .archive-guide { gap: 18px; }
  .archive-guide p { line-height: 1.9; }
  .filters { gap: 8px; padding: 16px 0; }
  .filter { min-height: 38px; padding: 0 14px; font-size: .75rem; }
  .project, .project--wide { grid-column: 1 / -1; }
  .project-copy { min-height: 138px; padding: 24px 20px 26px; }
  .project-copy h3 { font-size: clamp(1.05rem, 5.5vw, 1.45rem); }
  .closing h2 { font-size: clamp(2rem, 9vw, 2.35rem); }
  .closing-link { min-height: 72px; padding-inline: 20px; font-size: .84rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
  .footer-links { flex-direction: column; gap: 14px; }
  .copyright { grid-column: auto; }
}

@media (max-width: 360px) {
  .brand-name { display: none; }
  .hero h1 { font-size: 2.65rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .hero-stats div { display: flex; align-items: baseline; gap: 12px; }
  .hero-stats span { margin-top: 0; }
  .archive-guide-title { font-size: .75rem; }
  .scroll-cue { font-size: .75rem; }
  .project-copy h3 { font-size: 1rem; }
  .closing h2 { font-size: 1.75rem; letter-spacing: -.04em; }
  .closing-copy > p:not(.section-kicker) { font-size: .84rem; }
  .closing-link { gap: 12px; padding-inline: 16px; font-size: .76rem; flex-wrap: wrap; min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js-reveal .project { opacity: 1; transform: none; }
}

/* Match the web-production sans system and remove gallery Mincho drift. */
:where(h1,h2,h3,h4,.title-serif,.gallery-intro,.sample-card,.sample-card-title){
  font-family:"Yu Gothic","Hiragino Sans","Hiragino Kaku Gothic ProN",Meiryo,sans-serif!important;
}

/* Keep semantic phrase lines visually separated. */
.phrase + .phrase{margin-top:8px}

/* Final gallery line separation. */
.phrase + .phrase{margin-top:16px}
.hero h1,.archive-head h2,.closing h2{line-height:1.15}
.sample-card p{line-height:1.55}

/* Verified gallery phrase clearance. */
.phrase + .phrase{margin-top:24px}
.sample-card p .phrase + .phrase{margin-top:12px}

/* Final card label rhythm. */
.sample-card strong + span{display:block;padding-top:12px}

main,main *{
  font-family:"Yu Gothic","Hiragino Sans","Hiragino Kaku Gothic ProN",Meiryo,sans-serif!important;
}

/* Final heading system: match the production LP's bold display hierarchy.
   Phrase spans are lines inside one heading, not separate blocks. */
.hero h1,
.archive-head h2,
.closing h2{
  font-weight:800!important;
  line-height:1.08!important;
}
.hero h1 .phrase,
.archive-head h2 .phrase,
.closing h2 .phrase{
  margin-block-start:0!important;
  padding-block-start:0!important;
  line-height:inherit!important;
}
.project-copy h3{font-weight:800!important}

html body{padding-top:0}

.head :where(a:not(.btn),button:not(.btn),[role="button"]),
.foot :where(a:not(.btn),button:not(.btn),[role="button"]){
  min-width:auto;
  min-height:auto;
}

@media (max-width:820px){
  .head :where(a,button,[role="button"]),
  .foot :where(a,button,[role="button"]){
    min-width:auto!important;
    min-height:auto!important;
  }
  .head .btn,.foot .btn{min-height:46px!important}
}
@media (max-width:768px){
  .foot-links a{min-height:44px!important;min-width:44px!important}
  .head .logo,.foot .logo{min-height:44px!important}
  #burger{min-width:44px!important;min-height:44px!important}
}

.project-note{margin-top:6px;font-size:12px;letter-spacing:.04em;color:var(--ink-3,#818892);display:inline-block;border:1px solid currentColor;border-radius:999px;padding:3px 10px}
