/* =========================================================
   SKETCH CREATE — single page
   マーメイド紙 × ペン＆インク × 真鍮 × 古木
   ========================================================= */

:root{
  --paper:      #f4efe2;   /* マーメイド紙 */
  --paper-deep: #ece5d3;   /* 紙の陰 */
  --ink:        #202b66;   /* ロゴと同じ藍インク */
  --ink-soft:   rgba(32,43,102,.55);
  --graphite:   #3d3a33;   /* 鉛筆の芯 */
  --graphite-l: #6b6659;
  --brass:      #a8823c;   /* 真鍮 */
  --brass-l:    #c9a75c;
  --wood:       #33271b;   /* 古い木 */
  --wood-l:     #4a3a28;

  --font-jp: "Zen Old Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-en: "EB Garamond", Garamond, serif;
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  font-family: var(--font-jp);
  color: var(--graphite);
  background-color: #fcfcfa;        /* 画像読込前・非対応時の下地 */
  background-image: url("../img/paper.webp");
  background-repeat: repeat;        /* 継ぎ目なく全面に敷かれる */
  background-size: 512px 512px;
  font-size: 16px;
  line-height: 2;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main, .hero, .site-header, .site-footer{ position: relative; z-index: 1; }

img{ max-width: 100%; height: auto; }
a{ color: var(--ink); }

.nowrap{ white-space: nowrap; }

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: transparent;
  transition: background-color .5s ease;
}
/* 下辺に鉛筆の一本線 */
.site-header::after{
  content:"";
  position:absolute;
  left: 24px; right: 24px; bottom: 0;
  height: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 4' preserveAspectRatio='none'%3E%3Cpath d='M2,2.5 C120,1.2 300,3.4 598,1.8' fill='none' stroke='%233d3a33' stroke-width='1.1' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  opacity: 0;
  transition: opacity .5s ease;
}
.site-header.is-scrolled{
  background: rgba(32,43,102,.92);
  backdrop-filter: blur(4px);
}
.site-header.is-scrolled::after{
  opacity: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 4' preserveAspectRatio='none'%3E%3Cpath d='M2,2.5 C120,1.2 300,3.4 598,1.8' fill='none' stroke='%23c9a75c' stroke-width='1.1' stroke-linecap='round' opacity='.6'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.header-logo{ opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.site-header.is-scrolled .header-logo{ opacity: 1; pointer-events: auto; }
.header-logo img{ display:block; width: 140px; }
.site-header.is-scrolled .header-logo img{ filter: brightness(0) invert(1); }

.header-nav{ display: flex; gap: 26px; }
.header-nav a{
  font-size: 14px;
  text-decoration: none;
  color: var(--graphite);
  position: relative;
  padding-bottom: 4px;
  transition: color .35s ease;
}
.site-header.is-scrolled .header-nav a{ color: var(--paper); }
/* ホバーでインクの下線が引かれる */
.header-nav a::after{
  content:"";
  position:absolute;
  left:0; bottom:0;
  width:100%; height:2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 4' preserveAspectRatio='none'%3E%3Cpath d='M2,2.6 C20,1.4 55,3.2 78,1.8' fill='none' stroke='%23202b66' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.site-header.is-scrolled .header-nav a::after,
.header-nav.is-open a::after{
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 4' preserveAspectRatio='none'%3E%3Cpath d='M2,2.6 C20,1.4 55,3.2 78,1.8' fill='none' stroke='%23c9a75c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.header-nav a:hover::after,
.header-nav a:focus-visible::after{ transform: scaleX(1); }

.nav-toggle{ display:none; }
.site-header.is-scrolled .nav-toggle span{ background: var(--paper); }
/* モバイルの全画面メニューは常に紺色なので、開いている間はスクロール状態に関わらず淡色で統一 */
.nav-toggle.is-open span{ background: var(--paper); }
.header-nav.is-open a{ color: var(--paper); }

/* =========================================================
   ヒーロー
   ========================================================= */
.hero{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 20px 60px;
  position: relative;
}
.hero-logo img{
  width: min(420px, 72vw);
  display:block;
  margin: 0 auto;
}

.hero-line-wrap{
  width: min(760px, 88vw);
  margin: 8px auto 4px;
}
.hero-line{ display:block; width:100%; height:auto; }
#drawLine{
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
.line-anim #drawLine{
  animation: draw 2.6s cubic-bezier(.45,.05,.35,1) .4s forwards;
}
@keyframes draw{ to{ stroke-dashoffset: 0; } }

.hero-copy{
  font-size: clamp(18px, 3.4vw, 27px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .12em;
  margin-top: 18px;
}
.hero-sub{
  margin-top: 20px;
  font-size: clamp(13px, 1.6vw, 15px);
  color: var(--graphite-l);
  letter-spacing: .1em;
}

/* ヒーロー要素のフェード */
.reveal-hero{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal-hero.is-in{ opacity:1; transform: translateY(0); }
.reveal-hero.delay-1{ transition-delay: 1.8s; }
.reveal-hero.delay-2{ transition-delay: 2.3s; }

/* スクロールの合図 */
.scroll-cue{
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.cue-text{
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--brass);
  text-transform: uppercase;
}
.cue-line{
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--brass), transparent);
  animation: cue 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue{
  0%{ transform: scaleY(0); opacity:0; }
  35%{ transform: scaleY(1); opacity:1; }
  100%{ transform: scaleY(1); opacity:0; }
}

/* =========================================================
   セクション共通
   ========================================================= */
.section{ padding: 110px 0; }
.section-tint{
  background:
    linear-gradient(rgba(32,43,102,.035), rgba(32,43,102,.035));
}

.container{
  width: min(880px, 88vw);
  margin: 0 auto;
}

.sec-head{ text-align: center; margin-bottom: 54px; }

.eyebrow{
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: .38em;
  text-transform: uppercase;
  /* 真鍮の輝き */
  background: linear-gradient(105deg, var(--brass) 20%, var(--brass-l) 50%, var(--brass) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
/* 主見出しの直下に添える場合（上下反転） */
.eyebrow-sub{ margin-top: 12px; margin-bottom: 0; }

.sec-title{
  font-size: clamp(19px, 2.7vw, 26px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .1em;
}

/* 見出しに添えるタグライン */
.sec-tagline{
  margin-top: 16px;
  font-size: clamp(14px, 1.7vw, 16px);
  line-height: 2.1;
  letter-spacing: .12em;
  color: var(--graphite);
}

.title-line{
  display: block;
  width: 180px;
  margin: 14px auto 0;
}
.title-line path{
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 1.2s ease .3s;
}
.sec-head.is-in .title-line path{ stroke-dashoffset: 0; }

.sec-lead{
  margin-top: 26px;
  color: var(--graphite-l);
  font-size: 15px;
}

.prose p{ margin-bottom: 1.9em; }
.prose p:last-child{ margin-bottom: 0; }
.prose strong{ color: var(--ink); font-weight: 600; }

/* スクロールで滲み出るように現れる */
.reveal{
  opacity: 0;
  transform: translateY(22px);
  filter: blur(2px);
  transition: opacity 1s ease, transform 1s ease, filter 1s ease;
}
.reveal.is-in{ opacity:1; transform: translateY(0); filter: blur(0); }
.reveal.delay-1{ transition-delay: .15s; }
.reveal.delay-2{ transition-delay: .3s; }

/* =========================================================
   流儀（3S カード）
   ========================================================= */
.s-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 10px;
}
.s-card{
  position: relative;
  padding: 44px 26px 38px;
  text-align: center;
  transition: transform .4s ease;
}
.s-card:hover{ transform: translateY(-6px) rotate(-.4deg); }

.card-frame{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.s-latin{
  font-family: var(--font-en);
  font-size: 30px;
  font-style: italic;
  color: var(--brass);
  margin-bottom: 8px;
}
.s-title{
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .16em;
  margin-bottom: 18px;
  font-weight: 600;
}
.s-text{
  font-size: 14px;
  line-height: 2;
  text-align: left;
  color: var(--graphite);
}

/* =========================================================
   業務内容
   ========================================================= */
.services-intro{ margin-bottom: 50px; }

.svc-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px 56px;
}
.svc-title{
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
/* 見出し直下の短いリード文 */
.svc-lead{
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .06em;
  margin: 0 0 16px 62px;
}
/* 図版のような通し番号（制作実績の record-num と同じトーン） */
.svc-num{
  flex: none;
  width: 48px;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 24px;
  color: var(--brass);
}
.svc-list{
  list-style: none;
  font-size: 14px;
  line-height: 1.9;
}
.svc-list li{
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}
/* ペンで打った点 */
.svc-list li::before{
  content:"";
  position:absolute;
  left: 2px; top: .8em;
  width: 6px; height: 6px;
  background: var(--ink-soft);
  border-radius: 60% 45% 55% 50%;
  transform: rotate(12deg);
}

/* =========================================================
   制作実績
   ========================================================= */
.record-note{
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--graphite-l);
}

.record-list{
  list-style: none;
  margin-top: 10px;
  border-bottom: 1px solid rgba(32,43,102,.18);
}
.record-item{
  padding: 34px 0;
  border-top: 1px solid rgba(32,43,102,.18);
}
.record-head{
  display: flex;
  align-items: baseline;
  gap: 18px;
}
/* 図版のような通し番号 */
.record-num{
  flex: none;
  width: 56px;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 26px;
  color: var(--brass);
}
.record-title{
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .06em;
}
.record-body{
  margin: 12px 0 0 74px;
  font-size: 15px;
  color: var(--graphite);
}
.record-meta{
  margin: 8px 0 0 74px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

/* =========================================================
   会社概要
   ========================================================= */
.company-table{ border-top: 1px solid rgba(61,58,51,.3); }
.company-table .row{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 22px 6px;
  border-bottom: 1px solid rgba(61,58,51,.3);
  font-size: 15px;
  line-height: 1.9;
}
.company-table dt{
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .14em;
}

/* =========================================================
   プライバシーポリシー（下層ページ）
   ========================================================= */
.container-narrow{ width: min(720px, 88vw); }

.back-link{
  display: inline-block;
  margin-bottom: 40px;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .3s ease;
}
.back-link:hover,
.back-link:focus-visible{ color: var(--ink); }
.back-link-end{ margin-top: 40px; margin-bottom: 0; }

.policy-title{
  margin: 2.4em 0 .9em;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .08em;
}
.prose .policy-title:first-of-type{ margin-top: 1.8em; }

.policy-contact{ margin: 28px 0 32px; }

/* =========================================================
   フッター（スクロールヘッダーと同じ紺色）
   ========================================================= */
.site-footer{
  color: #e9e0cd;
  padding: 90px 0 36px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.05), rgba(0,0,0,.18)),
    var(--ink);
  position: relative;
}
/* 紺の中の細かい粒子 */
.site-footer::before{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  opacity:.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.16' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.06 0 0 0 0 0.14 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23w)'/%3E%3C/svg%3E");
}
/* 紙が紺の面で終わる、破れたような境界 */
.site-footer::after{
  content:"";
  position:absolute;
  top:-14px; left:0; right:0;
  height:15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 15' preserveAspectRatio='none'%3E%3Cpath d='M0,15 L0,9 C80,4 160,12 260,7 C380,2 460,11 580,6 C700,1 800,10 920,5 C1030,1 1120,9 1200,6 L1200,15 Z' fill='%23161d4a'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.site-footer .container{ position: relative; }

.footer-grid{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}
.footer-logo{
  display: block;
  width: 120px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}
.footer-brand-en{
  font-family: var(--font-en);
  font-size: 24px;
  letter-spacing: .18em;
  color: var(--brass-l);
  margin-bottom: 4px;
}
.footer-brand-ja{
  font-size: 15px;
  letter-spacing: .2em;
  margin-bottom: 26px;
}
.site-footer address{
  font-style: normal;
  font-size: 14px;
  line-height: 2.1;
  margin-bottom: 16px;
}
.footer-tel{ font-size: 14px; line-height: 2.1; margin-bottom: 24px; }

.footer-mail{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: .1em;
  color: #f0e8d3;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--brass);
  border-radius: 2px;
  transition: background-color .35s ease, color .35s ease;
}
.footer-mail svg{ width: 22px; height: 15px; }
.footer-mail:hover,
.footer-mail:focus-visible{
  background: var(--brass);
  color: #241a0e;
}

.footer-head{
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--brass-l);
  margin-bottom: 18px;
}
.access-list{
  list-style: none;
  font-size: 14px;
  line-height: 2.1;
  margin-bottom: 20px;
}
.access-list li{
  padding-left: 18px;
  position: relative;
}
.access-list li::before{
  content:"";
  position:absolute;
  left:0; top:.85em;
  width:8px; height:1px;
  background: var(--brass-l);
}
.footer-note{ font-size: 13px; color: #cfc3a8; }

.footer-bottom{
  border-top: 1px solid rgba(201,167,92,.3);
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.totop{
  color: var(--brass-l);
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201,167,92,.45);
  border-radius: 50%;
  transition: transform .35s ease, background-color .35s ease;
}
.totop svg{ width: 20px; height: 20px; }
.totop:hover{ transform: translateY(-4px); background: rgba(201,167,92,.14); }

.copyright{
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: .16em;
  color: #b9ac8e;
}

.footer-legal{
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-privacy-link{
  font-size: 12px;
  letter-spacing: .08em;
  color: #cfc3a8;
  text-decoration: none;
  border-bottom: 1px solid rgba(207,195,168,.4);
  transition: color .3s ease, border-color .3s ease;
}
.footer-privacy-link:hover,
.footer-privacy-link:focus-visible{
  color: var(--brass-l);
  border-color: var(--brass-l);
}
.footer-legal-links{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-legal-sep{ font-size: 12px; color: #7d735c; }

/* =========================================================
   レスポンシブ
   ========================================================= */
.pc-br{ display: inline; }

@media (max-width: 860px){
  .s-grid{ grid-template-columns: 1fr; gap: 20px; }
  .s-card{ max-width: 420px; margin: 0 auto; }
  .svc-grid{ grid-template-columns: 1fr; gap: 40px; }
  .footer-grid{ grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px){
  body{ font-size: 15px; line-height: 2; }
  .section{ padding: 80px 0; }
  .pc-br{ display: none; }

  /* モバイルナビ */
  .nav-toggle{
    display: block;
    background: none;
    border: none;
    width: 42px; height: 36px;
    position: relative;
    cursor: pointer;
    z-index: 120;
  }
  .nav-toggle span{
    position: absolute;
    left: 8px; right: 8px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .35s ease, opacity .3s ease, top .35s ease;
  }
  .nav-toggle span:nth-child(1){ top: 10px; }
  .nav-toggle span:nth-child(2){ top: 17px; }
  .nav-toggle span:nth-child(3){ top: 24px; }
  .nav-toggle.is-open span:nth-child(1){ top:17px; transform: rotate(35deg); }
  .nav-toggle.is-open span:nth-child(2){ opacity: 0; }
  .nav-toggle.is-open span:nth-child(3){ top:17px; transform: rotate(-35deg); }

  .header-nav{
    position: fixed;
    inset: 0;
    background: rgba(32,43,102,.96);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    font-size: 17px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
  }
  .header-nav.is-open{ opacity: 1; visibility: visible; }

  /* backdrop-filter は fixed 要素の基準座標をヘッダー自身に変えてしまうため、
     メニュー展開時にヘッダーが紺色でも全画面オーバーレイが正しく効くよう外す */
  .site-header.is-scrolled{ backdrop-filter: none; }

  .company-table .row{ grid-template-columns: 1fr; gap: 4px; padding: 18px 4px; }
  .footer-bottom{ flex-direction: column; gap: 18px; }
  .footer-legal{ flex-direction: column; gap: 10px; }

  .record-item{ padding: 26px 0; }
  .record-head{ gap: 12px; }
  .record-num{ width: 40px; font-size: 21px; }
  .record-body, .record-meta{ margin-left: 0; }
}

/* =========================================================
   動きを控える設定への配慮
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal, .reveal-hero{
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  #drawLine{ stroke-dashoffset: 0 !important; animation: none !important; }
  .title-line path{ stroke-dashoffset: 0 !important; }
  .cue-line{ animation: none; transform: scaleY(1); opacity: .7; }
  .s-card, .totop{ transition: none; }
}
