/* ==================================================================
   Rec-DR  スタイルシート(style.css)

   【このファイルの読み方】
   ・上から順に「変数 → 共通設定 → ヘッダー → ボタン → ヒーロー →
     各セクション → フォーム → スマホ用 → アニメーション」の順です。
   ・「===== ○○ =====」という見出しコメントを目印に探してください。
   ・色や角丸は、最初の「変数」だけ変えれば全体に反映されます。
   ・スマホ表示の指定は「レスポンシブ」のブロックにまとまっています
     (画面幅768px以下で有効)。
   ================================================================== */

/* ===== 配色・角丸などの変数 =====
   サイト全体の色や丸みは、ここで一括変更できます。
   例: アクセントの青を変えたいとき → --color-accent の色コードを書き換える */
:root {
  --color-bg: #f9fafb;            /* ページ全体の背景(薄いグレー) */
  --color-surface: #fff;          /* カード・表・ヘッダーの背景(白) */
  --color-text: #2b3340;          /* 本文の文字色 */
  --color-muted: #677282;         /* 補足文などの薄い文字色 */
  --color-line: #e1e5ea;          /* 区切り線の色 */
  --color-accent: #2fa9e1;        /* アクセントの青(ボタン・リンクなど) */
  --color-accent-light: #e8f1fc;  /* ごく薄い青(ヒーロー・バンドの背景) */
  --color-accent-mid: #eff7ff;    /* 表の見出しセルの青 */
  --color-table-border: #23aaff;  /* 表の外枠の色 */
  --color-error: #d33;            /* エラーメッセージの色 */
  --radius: 14px;                 /* 角の丸み */
  --shadow: 0 6px 20px rgba(40,70,110,.07);  /* カードの影 */
  --font-heading: "Zen Maru Gothic","Noto Sans JP",sans-serif;  /* 見出しのフォント */

  /* ↓ 以下は触らなくてOK(スマホのノッチ対策) */
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top,0px);
  padding-bottom: env(safe-area-inset-bottom,0px);
}

/* ダークモードの端末で表示するときの色 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #161a20;
    --color-surface: #1e232b;
    --color-text: #e8ecf1;
    --color-muted: #9ba6b4;
    --color-line: #303744;
    --color-accent: #6aa5f0;
    --color-accent-light: #1d2a3d;
    --color-accent-mid: #2b4468;
  }
}

/* ===== 基本設定(リセット・共通) ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + env(safe-area-inset-top,0px));
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 16px/1.9 "Noto Sans JP",system-ui,"Hiragino Sans","Yu Gothic",sans-serif;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top,0px);
  background: var(--color-surface);
  z-index: 30;
}

[hidden] {
  display: none!important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.5;
  margin: 0;
  font-weight: 500;
}

/* ===== レイアウト幅 ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ヘッダー・ナビゲーション ===== */
header {
  position: sticky;
  top: env(safe-area-inset-top,0px);
  z-index: 40;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font: 700 19px/1 var(--font-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  padding: 6px 0;
}

nav a:hover {
  color: var(--color-accent);
}

/* スマホのメニュー専用の項目(PCでは隠す) */
.nav-mobile-only {
  display: none;
}

nav a.nav-cta {
  background: var(--color-accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius);
}

nav a.nav-cta:hover {
  color: #fff;
  opacity: .88;
}

/* メニューのホバー下線(中央から左右に広がる)※PC表示のみ */
@media (min-width: 769px) {
  nav a:not(.nav-cta) {
    position: relative;
  }
  nav a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
  }
  nav a:not(.nav-cta):hover::after,
  nav a:not(.nav-cta):focus-visible::after {
    transform: scaleX(1);
  }
}

/* ===== ハンバーガーメニュー ===== */
.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.menu-button span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--color-text);
  transition: .25s;
}

.menu-button span:nth-child(1) {
  top: 15px;
}

.menu-button span:nth-child(2) {
  top: 21px;
}

.menu-button span:nth-child(3) {
  top: 27px;
}

.menu-button[aria-expanded=true] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-button[aria-expanded=true] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded=true] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
}

.btn:hover {
  opacity: .88;
}

.btn.ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

/* ===== セクション共通 ===== */
section {
  padding: 50px 0;
}

/* ===== ヒーロー ===== */
.main {
  background: linear-gradient(180deg, var(--color-accent-light), var(--color-surface));
  padding: 96px 0;
  /* 中身を上下中央に配置(高さはここで調整) */
  display: flex;
  align-items: center;
  min-height: 360px;
}

.main > .container {
  width: 100%;
}

.main h1 {
  /* 画面幅に合わせて縮む(PCは最大28px、スマホは約17px) */
  font-size: clamp(15px,4.4vw,28px);
  letter-spacing: .02em;
}

.main .container {
  text-align: left;
}

/* イラスト(左)と文字(右)を横に並べる。
   row-reverse は「HTMLで先に書いた文字を右、あとのイラストを左」にする指定 */
.main > .container {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center; /* イラストと文字のセットを左右中央に */
  gap: 48px;
}

.main-inner {
  flex: 0 1 auto;
  min-width: 0;
}

.main-image {
  flex: 0 0 40%;
  min-width: 0;
  max-width: 420px;
  height: auto;
}

/* 横並びのとき: 見出しの大きさ調整と、下端そろえ */
@media (min-width: 769px) {
  /* 文字をイラストの一番下のラインにそろえる(下端そろえ) */
  .main > .container {
    align-items: flex-end;
  }

  .main h1 {
    font-size: 25px;
    /* 行の下の余白ぶんを打ち消して、文字の下端をイラストの下端に合わせる。
       さらに + 10px で、文字を10px上に上げている(数字を変えると上下の位置を調整できる) */
    margin-bottom: calc(-.3em + 10px);
  }
}

/* スマホ・縦向きタブレット: 縦に並べて、イラストを上、文字を下にする */
@media (max-width: 768px) {
  .main > .container {
    flex-direction: column-reverse;
    gap: 28px;
  }

  .main-inner {
    flex: none;
  }

  .main-image {
    flex: none;
    width: 100%;
    max-width: 360px;
    /* このイラストは絵の重心が左寄り(左の本棚が細く、右の観葉植物が大きいため)。
       見た目が中央に来るよう、画像の幅の3%だけ右にずらしている */
    translate: 2.0% 0;
  }
}

/* ===== 見出し・カード ===== */
/* セクションの見出し。
   ・上に小さな英字ラベル(HTMLの data-en の文字が出る)
   ・下に青いグラデーションの短いバー
   ・太字で、少し字間を広げて目立たせている */
.section-title {
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 40px;
  font-size: clamp(25px, 3.6vw, 34px);
  font-weight: 700;
  letter-spacing: .06em;
}

.section-title[data-en]::before {
  content: attr(data-en);
  display: block;
  margin-bottom: 6px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  line-height: 1.4;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-table-border));
}

.section-lead {
  color: var(--color-muted);
  margin: 0 0 44px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
  margin-top: 32px;
}

/* 2列(長方形2つ)にするとき用。スマホでは1列に戻る */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.section-white {
  background: var(--color-surface);
}

/* ===== プロフィール表 ===== */
.info-table {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-table-border);
  border-radius: var(--radius);
  overflow: hidden;
  /* 立体的に見せる影(青みがかった柔らかい影+細い締めの影) */
  /* box-shadow: 0 8px 20px rgba(110, 110, 110, 0.22),
  0 1px 3px rgba(175, 175, 175, 0.1); */
}

.info-table > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--color-line);
}

.info-table > div:last-child {
  border: 0;
}

.info-table dt {
  background: var(--color-accent-mid);
  padding: 16px 22px;
  font-weight: 700;
  font-size: 14px;
}

.info-table dd {
  margin: 0;
  padding: 16px 22px;
  font-size: 15px;
}

/* ===== お問い合わせ誘導バンド ===== */
.contact-band {
  background: var(--color-accent-light);
  color: var(--color-text);
  text-align: center;
  padding: 64px 0;
}

.contact-band h2 {
  font-size: clamp(21px,3vw,28px);
  margin-bottom: 10px;
}

.contact-band p {
  margin: 0 0 26px;
  color: var(--color-muted);
}

.contact-band .btn {
  background: var(--color-accent);
  color: #fff;
}

/* ===== フッター ===== */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-line);
  padding: 36px 0;
  color: var(--color-muted);
  font-size: 13px;
  text-align: center;
}

/* ===== お問い合わせフォーム ===== */
.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.form-card label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin: 22px 0 6px;
}

.form-card .required-mark {
  color: #fff;
  background: var(--color-accent);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  margin-left: 8px;
  font-weight: 500;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius)/1.6);
  background: var(--color-bg);
  color: var(--color-text);
}

.form-card textarea {
  min-height: 160px;
  resize: vertical;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: 2px solid var(--color-accent);
  border-color: var(--color-accent);
}

.form-card .btn {
  width: 100%;
  margin-top: 28px;
}

/* 項目名の下に付ける説明文 */
.form-note {
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.7;
}

.back {
  display: inline-block;
  margin-bottom: 50px;
  color: var(--color-accent);
  font-weight: 500;
  font-size: 14px;
}

/* ページ最下部の「戻る」リンク(下の余白は不要) */
.back-bottom {
  margin-bottom: 0;
}

.form-thanks {
  text-align: center;
  padding: 24px 0;
}

/* ===== レスポンシブ(スマホ・縦向きタブレット) ===== */
@media (max-width: 768px) {
  .menu-button {
    display: block;
  }
  nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s;
  }
  nav.is-open {
    max-height: 480px;
  }
  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 12px;
  }
  nav li a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
    text-align: center;
  }
  nav li:last-child {
    display: none;
  }
  nav li:nth-last-child(2) a {
    border-bottom: 0;
  }
  /* スマホのメニューでは、青いボタンの代わりに「Contact」の文字リンクを表示 */
  .nav-mobile-only {
    display: list-item;
  }
  nav a.nav-cta {
    margin-top: 16px;
    text-align: center;
    border: 0;
    padding: 14px;
  }
  section {
    padding: 64px 0;
  }
  .main {
    padding: 64px 0;
    min-height: 240px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .info-table > div {
    grid-template-columns: 1fr;
  }
  .info-table dt {
    padding: 10px 18px 4px;
    background: var(--color-accent-mid);
  }
  .info-table dd {
    padding: 8px 18px 14px;
  }
  .form-card {
    padding: 28px 20px;
  }
}

/* ===== ふわっと表示アニメーション ===== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js-enabled .main-inner,
.js-enabled .main-image {
  animation: fade-up 1s ease both;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease,transform .9s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none!important;
  }
  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }
  .js-enabled .main-inner,
  .js-enabled .main-image {
    animation: none;
  }
}

/* ===== ポートフォリオ用の追加スタイル ===== */
.service-intro {
  margin-top: 40px;
}

.service-intro .info-table {
  margin-top: 16px;
}

/* 「画質とディスク」の表の上下の余白 */
.table-spaced {
  margin: 40px 0 40px;
}

/* 説明文と表の間隔を詰める(「納品方法」) */
.section-lead-tight {
  margin-bottom: 20px;
}

.section-lead-tight + .table-spaced {
  margin-top: 0;
}

/* 表の下のリンク(「毎日・毎週録画している番組一覧」) */
.service-intro .link-row {
  margin: 24px 0 0;
}

.textlink {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* 下線は中央から左右に広がる(ヘッダーメニューと同じ動き) */
.textlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s ease;
}

.textlink:hover::after,
.textlink:focus-visible::after {
  transform: scaleX(1);
}

/* 番組一覧ページ */
#page-programs .section-title {
  margin-bottom: 24px;
}

.under {
  border-bottom: solid 2px #ee004f;
}

/* この表の見出しセルは、他の表より少し明るい青にする */
.program-table dt {
  background: var(--color-accent-mid);
  background: color-mix(in srgb, var(--color-accent-mid) 55%, var(--color-accent-light));
}

/* 表の見出しの下に付ける補足(地域など) */
.table-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
}

/* PC表示では見出しの列を少し広げる */
@media (min-width: 769px) {
  .program-table > div {
    grid-template-columns: 240px 1fr;
  }
}

/* 文章の最後の段落だけ、下の表との間隔を広めに */
.service-intro div p:last-child {
  margin-bottom: 2em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  font-size: 14px;
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 500;
}

/* ===== お取引きの流れ(ステップ表示) ===== */
.flow {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}

.flow li {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

/* 番号の丸 */
.flow li::before {
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 18px/1 var(--font-heading);
}

/* 次のステップへつなぐ縦線 */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 45px;
  top: 100%;
  height: 17px;
  width: 2px;
  background: var(--color-accent);
  opacity: .35;
}

.flow h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

/* 説明文がないステップは見出しの下の余白をなくす */
.flow h3:last-child {
  margin-bottom: 0;
}

.flow p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

.flow .step-note {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .flow li {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 18px 16px;
    align-items: start;
  }
  .flow li::before {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .flow li:not(:last-child)::after {
    left: 33px;
  }
}

/* ===== フォームの小さな部品 ===== */
/* 入力もれのときに出るエラーメッセージ */
.form-error {
  color: var(--color-error);
  margin: 20px 0 0;
  font-size: 14px;
  white-space: pre-line; /* 複数のエラーを改行して並べる */
}

/* 入力もれの欄: 赤い枠にして、枠の中の薄い文字(未入力です)も赤くする */
.form-card .is-error {
  border-color: var(--color-error);
  background: #fff5f5;
}

.form-card .is-error::placeholder {
  color: var(--color-error);
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .form-card .is-error {
    background: #3a2326;
  }
}

/* ===== About(自己紹介) ===== */
.about-text {
  max-width: 40em;
  margin: 16px 0 0;
}

.about-text + .about-text {
  margin-top: 1em;
}
