/* ============================================================
   components.css — UIパターン（部品）
   各ブロックは独立。新しいセクションは既存パターンを流用して拡張する。
   目次:
     1. Header / Nav（フローティングピル）
     2. Buttons
     3. Hero
     4. Section heads（共通見出し）
     5. Works（フィルター + カードグリッド）
     6. Services
     7. About
     8. Contact / Form
     9. Footer
    10. Responsive
   ============================================================ */

/* ============ 1. Header / Nav ============ */
header{ position:sticky; top:18px; z-index:var(--z-header); }
.nav{
  max-width:var(--maxw);
  margin:0 auto;
  margin-left:var(--gutter);
  margin-right:var(--gutter);
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(12px);
  border:1px solid var(--line);
  border-radius:var(--r-pill);
  padding:11px 12px 11px 26px;
  box-shadow:var(--shadow-sm);
}
.brand{
  font-family:var(--maru); font-weight:var(--fw-bold); font-size:19px;
  display:flex; align-items:center; gap:11px;
}
.brand .dot{
  width:30px; height:30px; border-radius:50%;
  background:var(--accent); color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:var(--fs-md);
}
.menu{ display:flex; gap:8px; align-items:center; }
.menu a{
  font-size:var(--fs-md); color:var(--ink-soft);
  padding:8px 16px; border-radius:var(--r-pill);
  transition:background var(--t-fast), color var(--t-fast);
}
.menu a:hover{ background:var(--accent-soft); color:var(--ink); }
.menu .cta{ background:var(--accent); color:#fff; font-weight:var(--fw-medium); }
.menu .cta:hover{ background:var(--accent-2); color:#fff; }

.burger{
  display:none; flex-direction:column; gap:5px;
  background:none; border:none; cursor:pointer; padding:10px;
}
.burger span{
  width:22px; height:2px; background:var(--ink); border-radius:2px; display:block;
  transition:transform var(--t-fast), opacity var(--t-fast);
}
/* 開いている間は × に変形（線の間隔5px + 線幅2px = 中心間7px） */
.nav.open .burger span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav.open .burger span:nth-child(2){ opacity:0; }
.nav.open .burger span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ============ 2. Buttons ============ */
.btn{
  border-radius:var(--r-pill);
  padding:15px 30px;
  font-size:var(--fs-base); font-family:var(--maru); font-weight:var(--fw-medium);
  display:inline-flex; align-items:center; gap:9px; cursor:pointer;
  transition:transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.btn-primary{ background:var(--accent); color:#fff; box-shadow:var(--shadow); }
.btn-primary:hover{ background:var(--accent-2); transform:translateY(-2px); }
.btn-ghost{ background:transparent; border:1px solid var(--ink); color:var(--ink); }
.btn-ghost:hover{ background:var(--ink); color:#fff; }

/* ============ 3. Hero ============ */
.hero{ padding:70px 0 80px; }
.hero-inner{
  display:grid; grid-template-columns:1.05fr 0.95fr; gap:54px; align-items:center;
}
.badge{
  display:inline-flex; align-items:center; gap:9px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-pill);
  padding:7px 16px 7px 8px;
  font-size:var(--fs-sm); color:var(--ink-soft);
  box-shadow:var(--shadow); margin-bottom:28px;
}
.badge b{
  background:var(--accent-soft); color:var(--accent-2);
  border-radius:var(--r-pill); padding:3px 11px;
  font-weight:var(--fw-bold); font-family:var(--maru); font-size:var(--fs-xs);
}
.hero h1{
  font-family:var(--maru); font-weight:var(--fw-black);
  font-size:clamp(36px,5.6vw,68px); line-height:1.32; letter-spacing:0.01em;
  margin-bottom:26px;
}
.hero h1 .hl{ position:relative; white-space:nowrap; } /* マーカー下線つきの強調語 */
/* 語の途中で改行させたくない塊。狭い幅では、この塊ごと次の行へ送られる */
.hero h1 .nb{ white-space:nowrap; }
.hero h1 .hl::after{
  content:""; position:absolute; left:-2px; right:-2px; bottom:6px; height:14px;
  background:var(--accent-soft); z-index:-1; border-radius:4px;
}
.hero p.lead{
  font-size:var(--fs-lg); color:var(--ink-soft); line-height:2;
  max-width:480px; margin-bottom:34px;
}
.hero-btns{ display:flex; gap:14px; flex-wrap:wrap; }

.hero-visual{ position:relative; }
.hero-card{ background:var(--surface); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); }
.hero-card .img{
  aspect-ratio:4/5; border-radius:18px; background:var(--bg-warm);
  overflow:hidden;
}
/* 実画像が用意でき次第、assets の画像を差し替えるだけでよい */
.hero-card .img img{ width:100%; height:100%; object-fit:cover; display:block; }
/* 画像に重なる浮きチップ */
.float-chip{
  position:absolute; background:var(--surface); border-radius:var(--r-md);
  box-shadow:var(--shadow); padding:13px 18px;
  display:flex; align-items:center; gap:11px; font-size:var(--fs-sm); font-weight:var(--fw-medium);
}
.float-chip .ic{
  width:34px; height:34px; border-radius:11px;
  display:flex; align-items:center; justify-content:center; font-size:var(--fs-lg);
}
.chip-1{ top:24px; left:-26px; }
.chip-1 .ic{ background:var(--accent-soft); color:var(--accent-2); }
.chip-2{ bottom:30px; right:-26px; }
.chip-2 .ic{ background:var(--sage); color:var(--sage-ink); }

/* ============ 4. Section heads（共通見出し） ============ */
.sec{ padding:var(--sp-section) 0; }
.sec-head{ text-align:center; margin-bottom:50px; }
.sec-head .k{ /* セクションのキーワードラベル（WORKS / SERVICES …） */
  display:inline-block; font-family:var(--maru); font-weight:var(--fw-bold);
  font-size:var(--fs-sm); letter-spacing:0.12em; color:var(--accent);
  background:var(--accent-soft); padding:5px 16px; border-radius:var(--r-pill);
  margin-bottom:18px;
}
.sec-head h2{
  font-family:var(--maru); font-weight:var(--fw-black);
  font-size:clamp(28px,3.8vw,44px); line-height:1.35;
}
.sec-head p{
  font-size:14.5px; color:var(--ink-soft); margin-top:14px;
  max-width:520px; margin-left:auto; margin-right:auto;
}

/* ============ 5. Works（フィルター + カードグリッド） ============ */
.filters{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-bottom:42px; }
.filters button{
  font-family:var(--maru); font-weight:var(--fw-medium); font-size:var(--fs-md);
  border:1px solid var(--line); background:var(--surface); color:var(--ink-soft);
  padding:10px 24px; border-radius:var(--r-pill); cursor:pointer;
  transition:all var(--t-fast);
}
.filters button:hover{ border-color:var(--accent); color:var(--accent); }
.filters button.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

.grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; }
/* 作品が1件だけのとき: 2カラムの大きめカードで主役として見せる */
.grid.solo{ grid-template-columns:1fr; max-width:960px; margin:0 auto; }
.grid.solo .card{ display:grid; grid-template-columns:0.9fr 1.1fr; gap:10px; align-items:center; }
.grid.solo .thumb{ aspect-ratio:4/3; }
.grid.solo .card-body{ padding:10px 20px 10px 12px; }

.card{
  background:var(--surface); border-radius:var(--r); padding:14px;
  transition:transform var(--t-base), box-shadow var(--t-base);
}
.card:hover{ transform:translateY(-6px); box-shadow:var(--shadow); }
.thumb{
  aspect-ratio:16/10; border-radius:var(--r-md); position:relative; overflow:hidden;
  display:flex; align-items:flex-end; background:var(--thumb-grad);
}
.thumb span{
  font-family:ui-monospace,monospace; font-size:11px; color:var(--ink-faint);
  background:rgba(255,255,255,.82); padding:5px 10px; border-radius:8px; margin:14px;
}
/* アプリアイコンを主役に見せるサムネ（ストライプのプレースホルダーは使わない） */
.thumb-icon{
  background:var(--bg-warm); align-items:center; justify-content:center; padding:10%;
}
.thumb-icon img{ width:100%; height:auto; max-width:230px; }
.card-body{ padding:22px 16px 16px; }
.card-top{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.tag{ /* カテゴリタグ */
  font-family:var(--maru); font-weight:var(--fw-bold); font-size:var(--fs-xs);
  color:var(--accent-2); background:var(--accent-soft);
  padding:4px 13px; border-radius:var(--r-pill);
}
.year{ font-size:var(--fs-xs); color:var(--ink-faint); letter-spacing:0.05em; }
.card-body h3{ font-family:var(--maru); font-weight:var(--fw-bold); font-size:var(--fs-xl); margin-bottom:9px; line-height:1.45; }
.card-body p{ font-size:var(--fs-md); color:var(--ink-soft); line-height:1.8; }
.card-body p + p{ margin-top:14px; }
/* 配信先・関連サイトへの実リンク（旧「詳しく見る」の置き換え） */
.links{ display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.lnk{
  font-family:var(--maru); font-weight:var(--fw-medium); font-size:13.5px;
  color:var(--accent-2); background:var(--accent-soft);
  padding:9px 18px; border-radius:var(--r-pill);
  display:inline-flex; align-items:center; gap:7px;
  transition:background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.lnk::after{ content:"↗"; font-size:12px; }
.lnk:hover{ background:var(--accent); color:#fff; transform:translateY(-2px); }

/* 技術スタックの小チップ（Worksカード内） */
.stack{ list-style:none; display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.stack li{
  font-size:11.5px; color:var(--ink-soft);
  background:var(--round); border:1px solid var(--line);
  padding:4px 11px; border-radius:var(--r-pill);
}

/* ============ 5b. Skills ============ */
/* スキルカードは 2×2 で見せる（Servicesの3列とは別レイアウト）
   .svc-grid が後段で再定義されるため、2クラス指定で打ち消されないようにする */
.svc-grid.skill-grid{ grid-template-columns:repeat(2,1fr); max-width:920px; margin:0 auto; }
.skill-grid .svc:nth-child(4) .ic{ background:var(--accent-soft); }

/* ============ 7b. About — 屋号の由来チップ（Anchor ＋ Keystone） ============ */
.origin{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:28px; }
.origin-item{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  padding:13px 20px; box-shadow:var(--shadow-sm);
}
.origin-item b{ font-size:var(--fs-base); line-height:1.25; display:block; }
.origin-item span{ font-size:var(--fs-xs); color:var(--ink-faint); }
.origin-plus{ font-weight:var(--fw-bold); color:var(--accent); font-size:var(--fs-xl); }

/* ============ 6. Services ============ */
.svc-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.svc{
  background:var(--surface); border-radius:var(--r); padding:34px 28px 30px;
  transition:transform var(--t-base), box-shadow var(--t-base);
}
.svc:hover{ transform:translateY(-5px); box-shadow:var(--shadow); }
.svc .ic{
  width:58px; height:58px; border-radius:18px;
  display:flex; align-items:center; justify-content:center; font-size:26px; margin-bottom:22px;
}
/* カードごとに差し色を変える */
.svc:nth-child(1) .ic{ background:var(--accent-soft); }
.svc:nth-child(2) .ic{ background:var(--sage); }
.svc:nth-child(3) .ic{ background:var(--rose); }
.svc h3{ font-family:var(--maru); font-weight:var(--fw-bold); font-size:21px; margin-bottom:13px; }
.svc p{ font-size:var(--fs-md); color:var(--ink-soft); line-height:1.85; margin-bottom:18px; }
.svc ul{ list-style:none; display:flex; flex-wrap:wrap; gap:8px; }
.svc li{
  font-size:12.5px; color:var(--ink-soft);
  background:var(--round); border:1px solid var(--line);
  padding:5px 12px; border-radius:var(--r-pill);
}

/* ============ 7. About ============ */
.about-grid{ display:grid; grid-template-columns:0.8fr 1.2fr; gap:48px; align-items:center; }
.about-grid .hero-card{ max-width:340px; margin:0 auto; }
.about-grid .hero-card .img{ aspect-ratio:1/1; }
.about-text p{ font-size:var(--fs-lg); color:var(--ink-soft); line-height:2.1; }
.about-text p + p{ margin-top:22px; }

/* ============ 8. Contact / Form ============ */
.contact-card{
  background:var(--bg-warm); border-radius:var(--r-lg); padding:56px;
  display:grid; grid-template-columns:0.85fr 1.15fr; gap:50px; align-items:start;
  border:1px solid var(--line);
}
.contact-left h3{ font-family:var(--maru); font-weight:var(--fw-black); font-size:var(--fs-2xl); line-height:1.4; margin-bottom:18px; }
.contact-left p{ font-size:14.5px; color:var(--ink-soft); line-height:2; margin-bottom:28px; }
.contact-left .info{ display:flex; flex-direction:column; gap:14px; }
.contact-left .info div{ display:flex; align-items:center; gap:13px; font-size:var(--fs-md); }
.contact-left .info .ic{
  width:38px; height:38px; border-radius:var(--r-sm); flex:none;
  background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:var(--fs-lg);
}
.contact-cta{ margin-top:30px; }

/* フォーム非表示中の1カラム版。フォーム復活時は HTML の solo を外すだけで戻る。
   中身が少ないぶん、PC幅では連絡先を横1列にして間延びを防ぐ（狭い幅では縦に戻す） */
.contact-card.solo{
  grid-template-columns:1fr; max-width:760px; margin:0 auto;
  text-align:center; padding:48px;
}
.contact-card.solo .contact-left p{ max-width:560px; margin:0 auto 26px; }
.contact-card.solo .info{
  flex-direction:row; flex-wrap:wrap; justify-content:center; gap:12px 26px;
}
.contact-card.solo .contact-cta{ margin-top:26px; }

form{
  background:var(--surface); border-radius:24px; padding:32px;
  display:grid; grid-template-columns:1fr 1fr; gap:18px; box-shadow:var(--shadow);
}
.field{ display:flex; flex-direction:column; gap:7px; }
.field.full{ grid-column:1/-1; }
.field label{ font-size:var(--fs-sm); font-weight:var(--fw-medium); color:var(--ink); font-family:var(--maru); }
.field input, .field textarea, .field select{
  background:var(--round); border:1px solid var(--line); border-radius:var(--r-sm);
  color:var(--ink); font-family:var(--sans); font-size:var(--fs-base); padding:12px 14px;
  transition:border-color var(--t-fast), background var(--t-fast);
}
.field textarea{ resize:vertical; min-height:100px; }
.field input:focus, .field textarea:focus, .field select:focus{
  outline:none; border-color:var(--accent); background:#fff;
}
.submit{ grid-column:1/-1; }
.submit button{
  width:100%; background:var(--accent); color:#fff; border:none;
  font-family:var(--maru); font-weight:var(--fw-bold); font-size:var(--fs-base);
  padding:16px; border-radius:14px; cursor:pointer;
  transition:background var(--t-fast), transform var(--t-fast);
}
.submit button:hover{ background:var(--accent-2); transform:translateY(-2px); }

/* ============ 9. Footer ============ */
footer{ padding:56px 0 40px; }
.foot{
  background:var(--ink); border-radius:30px; padding:44px 48px;
  display:flex; justify-content:center; align-items:center; gap:24px; flex-wrap:wrap;
}
.foot .brand{ color:#fff; }
.foot .brand .dot{ background:var(--accent); }
.copy{ text-align:center; font-size:var(--fs-xs); color:var(--ink-faint); margin-top:24px; }

/* ============ 10. Responsive ============ */
@media(max-width:880px){
  .burger{ display:flex; }
  .nav{ position:relative; }
  /* メニューはナビ直下に開くドロップダウンにする（.nav.open で開閉） */
  .menu{
    display:none;
    position:absolute; top:calc(100% + 10px); left:0; right:0;
    flex-direction:column; align-items:stretch; gap:4px;
    background:rgba(255,255,255,.96); backdrop-filter:blur(12px);
    border:1px solid var(--line); border-radius:var(--r); padding:12px;
    box-shadow:var(--shadow);
  }
  .nav.open .menu{ display:flex; }
  .menu a{ padding:14px 18px; border-radius:var(--r-sm); }
  .menu .cta{ text-align:center; margin-top:4px; }
  .hero-inner{ grid-template-columns:1fr; gap:40px; }
  .grid, .svc-grid, .svc-grid.skill-grid{ grid-template-columns:1fr; }
  .grid.solo .card{ grid-template-columns:1fr; }
  .grid.solo .card-body{ padding:22px 16px 16px; }
  .about-grid{ grid-template-columns:1fr; gap:32px; }
  /* 由来チップ: 幅が足りないと flex-wrap で「＋」だけが横に取り残されるので縦積みにする */
  .origin{ flex-direction:column; align-items:stretch; gap:10px; }
  .origin-plus{ text-align:center; line-height:1; }
  .contact-card{ grid-template-columns:1fr; padding:32px; gap:32px; }
  .contact-card.solo{ padding:32px; }
  .contact-card.solo .info{ display:inline-flex; flex-direction:column; text-align:left; }
  form{ grid-template-columns:1fr; }
  .float-chip{ display:none; }
}
