/* =========================================================
   SASE YUYA — Portfolio
   Minimal / Refined
   ========================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@400;500;600&family=Shippori+Mincho:wght@400;500;600&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ---- Tokens ---- */
:root {
  --bg:        #f6f5f1;
  --bg-soft:   #efeee8;
  --ink:       #16171b;
  --ink-soft:  #3a3b40;
  --muted:     #8a8a84;
  --line:      rgba(22, 23, 27, 0.12);
  --line-soft: rgba(22, 23, 27, 0.06);
  --accent:    #35564a;   /* deep muted green */
  --accent-2:  #b98a3e;   /* muted gold */
  --white:     #fbfbf9;

  --serif-en: 'Cormorant', serif;
  --serif-jp: 'Shippori Mincho', serif;
  --sans-jp:  'Zen Kaku Gothic New', sans-serif;

  --pad: clamp(20px, 5vw, 90px);
  --maxw: 1240px;
}

/* ---- Reset-ish ---- */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans-jp);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---- Grain overlay (あしらい) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
section { position: relative; }

.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-num {
  font-family: var(--serif-en);
  font-size: 14px; letter-spacing: 0.28em; color: var(--accent);
}
.sec-title {
  font-family: var(--serif-en);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  margin: 0;
}
.sec-title .jp {
  display: block;
  font-family: var(--sans-jp);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 10px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  mix-blend-mode: normal;
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.site-header.scrolled {
  background: rgba(246, 245, 241, 0.82);
  backdrop-filter: blur(10px);
  padding-block: 14px;
  box-shadow: 0 1px 0 var(--line-soft);
}
.brand {
  font-family: var(--serif-en);
  font-size: 19px; font-weight: 600; letter-spacing: 0.16em;
  white-space: nowrap;
}
.nav { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; }
.nav a {
  font-size: 12px; letter-spacing: 0.16em; color: var(--ink-soft);
  position: relative; padding: 6px 0;
}
.nav a::after {
  content:""; position:absolute; left:0; bottom:0; width:0; height:1px;
  background: var(--accent); transition: width .35s ease;
}
.nav a:hover::after { width: 100%; }
.nav .en { font-family: var(--serif-en); font-size: 14px; letter-spacing: 0.2em; }
.nav-cta {
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 9px 20px !important; font-size: 11px !important;
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg); }
.nav-cta::after { display:none; }
@media (max-width: 860px){
  /* 1ページ完結なので、狭い画面ではセクションリンクを隠し Contact だけ残す */
  .nav { gap: 12px; }
  .nav a:not(.nav-cta) { display: none; }
  .site-header { padding: 16px var(--pad); }
  .brand { font-size: 18px; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 90px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-role {
  font-family: var(--serif-en);
  font-size: 13px; letter-spacing: 0.3em; color: var(--accent);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.js .hero-role { opacity: 0; transform: translateY(14px); }
.hero-role::before { content:""; width: 46px; height: 1px; background: var(--accent); }
.hero-title {
  font-family: var(--serif-jp);
  font-weight: 500;
  /* 最小値は「むずかしいことを、」(9文字) が 320px 幅でも1行に収まる値。
     9文字 × 9vw < 本文幅 になるよう 9vw を基準にしている */
  font-size: clamp(28px, 9vw, 116px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 26px 0 0;
}
.hero-title .line { display: block; }
.hero-title .line > span { display: inline-block; }
/* 板書アニメ: 1文字ずつ左から書かれていく。
   JS が .ch を作る前・reduce 指定時は素のテキストとして見える */
.js .hero-title .ch {
  display: inline-block;
  clip-path: inset(-15% 100% -25% -8%);
  will-change: clip-path;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 34px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.6vw, 16px);
}
.js .hero-sub { opacity: 0; transform: translateY(14px); }
.hero-name {
  margin-top: 40px;
  display: flex; align-items: baseline; gap: 16px;
}
.js .hero-name { opacity: 0; transform: translateY(14px); }
.hero-name .en { font-family: var(--serif-en); font-size: 22px; letter-spacing: 0.22em; }
.hero-name .jp { font-size: 12px; letter-spacing: 0.24em; color: var(--muted); }

/* hero deco (あしらい) */
.hero-arc {
  position: absolute; z-index: 1;
  right: -12vw; top: 50%; transform: translateY(-50%);
  width: 62vw; height: 62vw; max-width: 780px; max-height: 780px;
  border-radius: 50%;
  border: 1px solid var(--line);
  pointer-events: none;
}
.hero-arc::after {
  content:""; position: absolute; inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(53,86,74,0.08), transparent 60%);
}
.hero-dots {
  position: absolute; z-index: 1; right: 8vw; bottom: 12vh;
  width: 90px; height: 90px;
  background-image: radial-gradient(var(--line) 1.4px, transparent 1.4px);
  background-size: 15px 15px;
  opacity: .7; pointer-events: none;
}
@media (max-width: 860px){ .hero-dots { display: none; } }
/* スマホでは名前を縦積みにして、日本語表記を1行に収める */
@media (max-width: 700px){
  .hero-name { flex-direction: column; align-items: flex-start; gap: 7px; }
  .hero-name .jp { letter-spacing: 0.16em; }
}
.scroll-hint {
  position: absolute; z-index: 2; left: var(--pad); bottom: 26px;
  font-family: var(--serif-en); font-size: 11px; letter-spacing: 0.28em; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.scroll-hint span { display:block; width: 40px; height: 1px; background: var(--muted); position: relative; overflow: hidden; }
.scroll-hint span::after{ content:""; position:absolute; inset:0; background: var(--ink); transform: translateX(-100%); animation: scrollline 2.4s ease-in-out infinite; }
@keyframes scrollline { 0%{transform:translateX(-100%)} 50%{transform:translateX(0)} 100%{transform:translateX(100%)} }

/* =========================================================
   About
   ========================================================= */
.about { padding: clamp(90px, 14vh, 180px) 0; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 5vw, 70px); }
@media (min-width: 900px){ .about-grid { grid-template-columns: 0.9fr 1.1fr; } }
.about-lead {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.75;
  margin: 0 0 1.1em;
  letter-spacing: 0.03em;
}
.about-lead em { font-style: normal; color: var(--accent); }
.about-body p { margin: 0 0 1.4em; color: var(--ink-soft); font-size: 15px; }
/* リードは本文より強く見せる（.about-body p より詳細度を上げる）。
   1文（16文字）がスマホ幅で1行に収まるよう 5.2vw を基準にしている */
.about-body p.about-lead {
  font-size: clamp(16px, 5.2vw, 30px);
  color: var(--ink);
  margin-bottom: 1.5em;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-tags li {
  font-size: 11px; letter-spacing: 0.1em; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}

/* =========================================================
   Works
   ========================================================= */
.works { padding: clamp(70px, 12vh, 150px) 0; background: var(--bg-soft); }
.works-list { display: grid; grid-template-columns: 1fr; gap: clamp(46px, 7vw, 96px); }
@media (min-width: 820px){ .works-list { grid-template-columns: 1fr 1fr; } }

.work { display: block; }
.work-figure {
  position: relative; overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 10;
  background: #ddd;
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.5);
}
.work-figure img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.work:hover .work-figure img { transform: scale(1.04); }
.work-figure::after {
  content: "View ↗";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-en); letter-spacing: 0.2em; font-size: 18px; color: #fff;
  background: rgba(22,23,27,.28); opacity: 0; transition: opacity .5s ease;
}
.work:hover .work-figure::after { opacity: 1; }
.work-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 20px; }
.work-title { font-family: var(--serif-jp); font-weight: 500; font-size: clamp(18px, 2.2vw, 23px); margin: 0; }
.work-idx { font-family: var(--serif-en); font-size: 13px; color: var(--muted); letter-spacing: .12em; }
.work-cat { margin: 6px 0 0; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.work-desc {
  margin: 14px 0 0; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px; line-height: 1.95; color: var(--ink-soft);
}

/* =========================================================
   Services
   ========================================================= */
.services { padding: clamp(90px, 14vh, 180px) 0; }
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: clamp(30px, 5vw, 52px) 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px){ .svc { grid-template-columns: 64px 1fr 1.1fr; gap: 40px; align-items: start; } }
.svc-no { font-family: var(--serif-en); font-size: 15px; color: var(--accent); letter-spacing: .14em; }
.svc-name { font-family: var(--serif-jp); font-weight:500; font-size: clamp(20px, 2.6vw, 28px); margin: 0; }
.svc-name small { display:block; font-family: var(--serif-en); font-size: 13px; letter-spacing:.2em; color: var(--muted); margin-top: 6px; }
.svc-desc { margin: 0; color: var(--ink-soft); font-size: 15px; }
.svc-desc .skills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.svc-desc .skills span { font-size: 11px; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px; }

/* =========================================================
   Price
   ========================================================= */
.price { padding: clamp(70px, 12vh, 150px) 0; background: var(--bg-soft); }
.price-list { border-top: 1px solid var(--line); }
.price-row {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  padding: clamp(26px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 880px){
  .price-row { grid-template-columns: 15em 1fr 11em; gap: 34px; align-items: baseline; }
}
.p-name {
  font-family: var(--serif-jp); font-weight: 500;
  font-size: clamp(17px, 2.1vw, 21px); margin: 0;
}
.p-name small {
  display: block; font-family: var(--serif-en); font-size: 12px;
  letter-spacing: .2em; color: var(--muted); margin-top: 5px;
}
.p-desc { margin: 0; font-size: 14.5px; line-height: 1.95; color: var(--ink-soft); }
.p-amount {
  font-family: var(--serif-en); font-weight: 600;
  font-size: clamp(24px, 3vw, 31px); color: var(--accent);
  letter-spacing: .02em; white-space: nowrap;
}
@media (min-width: 880px){ .p-amount { text-align: right; } }
.p-amount .yen {
  font-family: var(--sans-jp); font-weight: 500;
  font-size: 13px; letter-spacing: .06em; margin-left: 3px; color: var(--ink-soft);
}
.price-note {
  margin: clamp(28px, 4vw, 40px) 0 0;
  font-size: 13px; line-height: 2.1; color: var(--muted);
  max-width: 46em;
}
.price-note b { color: var(--ink-soft); font-weight: 500; }
@media (max-width: 700px){
  .p-desc { font-size: 15px; line-height: 2; }
  .price-note { font-size: 13.5px; }
}

/* =========================================================
   Flow
   ========================================================= */
.flow { padding: clamp(70px, 12vh, 150px) 0; background: var(--ink); color: var(--bg); }
.flow .sec-num { color: var(--accent-2); }
.flow .sec-title .jp { color: rgba(255,255,255,.5); }
.flow-steps { display: grid; grid-template-columns: 1fr; gap: 2px; margin-top: 10px; }
@media (min-width: 760px){ .flow-steps { grid-template-columns: repeat(5, 1fr); } }
.flow-step { padding: 26px 0; border-top: 1px solid rgba(255,255,255,.16); }
.flow-step .n { font-family: var(--serif-en); font-size: 13px; letter-spacing:.2em; color: var(--accent-2); }
.flow-step .t { font-family: var(--serif-jp); font-size: 17px; margin: 10px 0 6px; }
.flow-step .d { font-size: 12px; color: rgba(255,255,255,.55); line-height:1.7; }

/* =========================================================
   Contact
   ========================================================= */
.contact { padding: clamp(100px, 18vh, 220px) 0; text-align: center; position: relative; overflow: hidden; }
.contact-arc {
  position:absolute; left:50%; top:60%; transform: translate(-50%,-50%);
  width: 80vw; max-width: 900px; aspect-ratio: 1; border-radius:50%;
  border:1px solid var(--line); pointer-events:none;
}
.contact .wrap { position: relative; z-index: 2; }
.contact-small { font-family: var(--serif-en); font-size: 13px; letter-spacing:.3em; color: var(--accent); text-transform: uppercase; }
.contact-title {
  font-family: var(--serif-jp); font-weight: 500;
  /* 狭い画面で「できますか？」が途中で折れないよう最小値を抑える
     （14文字 × font-size が本文幅に収まる必要がある） */
  font-size: clamp(22px, 6vw, 66px); line-height: 1.35; margin: 22px 0 0;
}
.contact-title em { font-style: normal; color: var(--accent); }
/* ブロックは中央、文字は左寄せ（最終行だけ中央に取り残されるのを防ぐ） */
.contact-sub { color: var(--ink-soft); margin: 26px auto 44px; max-width: 32em; font-size: 15px; text-align: left; }
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif-en); font-size: 16px; letter-spacing:.14em;
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 18px 40px; transition: background .35s, color .35s, gap .35s;
}
.btn:hover { background: var(--ink); color: var(--bg); gap: 22px; }
/* フォームが苦手な人向けの控えめなメール導線 */
.contact-mail { margin: 26px 0 0; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.contact-mail .lbl::after { content: " ── "; }
.contact-mail a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px; transition: border-color .3s, color .3s;
  white-space: nowrap;   /* アドレスの途中で改行させない */
}
.contact-mail a:hover { color: var(--accent); border-color: var(--accent); }
/* スマホは説明とアドレスを2行に分けて、アドレスを1行で見せる */
@media (max-width: 700px){
  .contact-mail { font-size: 13px; line-height: 1.9; }
  .contact-mail .lbl { display: block; margin-bottom: 6px; }
  .contact-mail .lbl::after { content: none; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 46px var(--pad); border-top: 1px solid var(--line); }
.footer-in { max-width: var(--maxw); margin-inline:auto; display:flex; flex-wrap:wrap; gap: 18px; align-items:center; justify-content: space-between; }
.footer-brand { font-family: var(--serif-en); letter-spacing:.16em; font-size: 16px; }
.footer-note { font-size: 11px; letter-spacing:.14em; color: var(--muted); }

/* =========================================================
   Reveal animation
   ========================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal].d1 { transition-delay: .08s; }
[data-reveal].d2 { transition-delay: .16s; }
[data-reveal].d3 { transition-delay: .24s; }

/* アニメーション軽減設定への対応はファイル末尾にまとめている
   （隠す側のルールより後ろに置かないと打ち消せないため） */

/* =========================================================
   「元・大手進学塾講師」アイデンティティ
   ── チョーク／黒板モチーフ（上品なアクセントとして）
   ========================================================= */

/* 手描き風チョーク下線（アクセント緑・明るい背景用） */
.chalk {
  position: relative;
  display: inline;
  /* インラインボックス下端はフォントメトリクスで文字よりかなり下になるため、
     背景位置を少し持ち上げて文字のすぐ下に線を置く */
  padding-bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.4 C 62 3.4, 118 6.4, 178 4.6 S 248 3.8, 298 5.2' fill='none' stroke='%2335564a' stroke-width='1.9' stroke-linecap='round' opacity='0.85'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left calc(100% - 0.13em);
  background-size: 100% 0.16em;
}
.js .chalk { background-size: 0% 0.16em; transition: background-size 1.1s cubic-bezier(.2,.7,.2,1) .5s; }
.js .in .chalk { background-size: 100% 0.16em; }
/* ヒーローは文字を書き終えてから下線を引く（.written は JS が付与） */
.js .hero-title .chalk { transition: background-size .85s cubic-bezier(.3,.7,.3,1); }
.js .hero-title.written .chalk { background-size: 100% 0.16em; }

/* Hero: アイデンティティ看板 */
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px;
  font-size: 12px; letter-spacing: 0.14em; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px 8px 14px;
  background: rgba(255,255,255,0.4);
}
.js .hero-badge { opacity: 0; transform: translateY(14px); }
.hero-badge .mark {
  font-family: var(--serif-en); font-weight: 600; color: var(--accent);
  font-size: 13px; letter-spacing: 0.1em;
}
.hero-badge .x { color: var(--muted); }

/* About: 顔写真フレーム（チョークの円で囲む） */
.about-intro { display: flex; flex-direction: column; gap: 22px; }
.portrait {
  position: relative; margin: 22px 0 0;
  width: min(300px, 78%); aspect-ratio: 3 / 4;
}
/* 手描き円のかたちに切り抜く（線の SVG と同じパス） */
.clip-defs { position: absolute; width: 0; height: 0; }
.portrait-photo {
  position: absolute; inset: 0; z-index: 2;
  background-size: cover; background-position: center 32%;
  background-repeat: no-repeat;
  clip-path: url(#portraitClip);
}
.portrait-ph {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-en); font-size: 13px; letter-spacing: 0.2em;
  color: var(--muted); text-align: center; line-height: 1.8;
  background: var(--bg-soft);
  clip-path: url(#portraitClip);
}
.portrait::after { /* チョークの丸（切り抜きと同じ枠に重ねる） */
  content: ""; position: absolute; z-index: 3;
  inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 340' preserveAspectRatio='none'%3E%3Cpath d='M132 5 C 212 5 256 78 255 172 C 254 272 196 336 129 336 C 58 336 5 268 5 170 C 5 72 60 8 136 6' fill='none' stroke='%2335564a' stroke-width='2.6' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%;
}
.about-teacher-note {
  margin: 4px 0 0; font-size: 13px; letter-spacing: 0.08em; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.about-teacher-note::before { content: "▸"; font-size: 11px; }

/* Flow を「黒板」セクションに */
.flow {
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,255,255,0.04), transparent 60%),
    #26332e; /* チョークボードグリーン */
  color: #eef0ec;
  position: relative;
}
.flow::before { /* チョークの粉テクスチャ */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
}
.flow .wrap { position: relative; z-index: 1; }
.flow .sec-title { color: #f4f6f2; text-shadow: 0 0 12px rgba(255,255,255,0.06); }
.flow .sec-title .jp { color: rgba(238,240,236,0.55); }
.flow .sec-num { color: #cfe3d4; }
/* flex にすると各パーツが別々に折り返して段組みのように割れるため、
   通常のテキストとして流す */
.flow-note {
  margin: -6px 0 30px; font-size: 13.5px; line-height: 2; letter-spacing: 0.06em;
  color: rgba(238,240,236,0.72);
  max-width: 44em;
}
.flow-note .chalk-w {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.4 C 62 3.4, 118 6.4, 178 4.6 S 248 3.8, 298 5.2' fill='none' stroke='%23eef0ec' stroke-width='1.9' stroke-linecap='round' opacity='0.75'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left bottom; background-size: 100% 0.3em;
  padding-bottom: 0.24em;
}
.flow-step { border-top-color: rgba(238,240,236,0.18); }
.flow-step .n { color: #cfe3d4; }
.flow-step .t { color: #f4f6f2; }
.flow-step .d { color: rgba(238,240,236,0.6); }

/* =========================================================
   画面の高さが低い環境（ノートPC・横向きスマホ）
   ヒーローの要素が重ならないよう詰める
   ========================================================= */
/* =========================================================
   スマホの可読性: 小さすぎる文字を上げ、行間を広めに
   ========================================================= */
@media (max-width: 700px) {
  body { line-height: 2; }
  .hero-sub { font-size: 15px; line-height: 2; }
  .about-body p { font-size: 15.5px; line-height: 2.05; }
  .work-desc { font-size: 14.5px; line-height: 2; }
  .work-cat { font-size: 12.5px; }
  .svc-desc { font-size: 15px; line-height: 2.05; }
  .svc-desc .skills span { font-size: 12px; }
  .about-tags li { font-size: 12px; }
  .flow-note { font-size: 14px; }
  .flow-step .d { font-size: 13.5px; line-height: 1.95; }
  .flow-step .t { font-size: 18px; }
  .contact-sub { font-size: 15px; line-height: 2.05; }
  /* バッジは1行に収める（折り返すと肩書きが分断されて読みにくい） */
  .hero-badge {
    font-size: clamp(9.8px, 3.1vw, 12.5px);
    letter-spacing: 0.05em;
    gap: 6px;
    padding: 7px 13px;
    white-space: nowrap;
  }
}
/* 極小画面ではバッジの余白をさらに詰めて1行を維持する */
@media (max-width: 340px) {
  .hero-badge { padding: 6px 10px; gap: 5px; }
}

/* 縦が短い環境すべて: 余白を詰めて要素が重ならないようにする */
@media (max-height: 780px) {
  .hero { padding-top: 80px; padding-bottom: 48px; }
  .hero-sub { margin-top: 22px; }
  .hero-badge { margin-top: 20px; }
  .hero-name { margin-top: 22px; }
  .scroll-hint { display: none; }
}
/* 見出しの縮小は横に広い環境だけ。
   スマホに当てると幅基準の clamp を上書きして見出しが折り返してしまう */
@media (max-height: 780px) and (min-width: 700px) {
  .hero-title { font-size: clamp(38px, 7.2vw, 88px); }
}

/* =========================================================
   アニメーション軽減設定（隠す側のルールより後ろに置くこと）
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js [data-reveal],
  .js .hero-role, .js .hero-sub, .js .hero-badge, .js .hero-name {
    opacity: 1 !important; transform: none !important;
  }
  .js .hero-title .ch { clip-path: none; }
  /* チョーク下線も描画アニメなしで最初から引いた状態にする */
  .js .chalk, .js .in .chalk, .js .hero-title .chalk { background-size: 100% 0.16em; }
}
