/* 住まいづくり相談フォーム */

:root {
    --navy: #293B5F;
    --navy-light: #1e2d4d;
    --gold: #b8953e;
    --gold-light: #d4b56a;
    --gold-pale: #f0e4c8;
    --cream: #faf8f4;
    --bg-warm: #f5f0e8;
    --bg-card: #ffffff;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --text-muted: #999;
    --border: #e0ddd6;
    --border-focus: #b8953e;
    --error: #c0392b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 16px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.8;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
  }

  /* ══════ HEADER ══════ */
  .header {
    background: linear-gradient(135deg, #fff 0%, #fdfbf7 50%, #f8f4ec 100%);
    position: relative; overflow: hidden;
    border-bottom: 1px solid var(--border);
  }
  .header::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(184,149,62,0.08) 0%, transparent 70%);
    border-radius: 50%;
  }
  .header-inner {
    max-width: 900px; margin: 0 auto;
    padding: 40px 24px 36px; position: relative; z-index: 1;
  }
  .header-logo { margin-bottom: 20px; }
  .header-logo img { height: 36px; width: auto; }
  .header-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 100px;
    padding: 6px 18px; font-size: 12.5px;
    color: var(--white); font-weight: 600;
    letter-spacing: 0.5px; margin-bottom: 20px;
  }
  .header-badge::before {
    content: ''; width: 8px; height: 8px;
    background: rgba(255,255,255,0.5); border-radius: 50%; flex-shrink: 0;
  }
  .header h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(24px, 4.5vw, 34px);
    color: var(--text); font-weight: 700; line-height: 1.4;
    margin-bottom: 8px; letter-spacing: 1px;
  }
  .header h1 span {
    display: block; font-size: clamp(14px, 2.5vw, 16px);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400; color: var(--text-light);
    letter-spacing: 0.5px; margin-top: 6px;
  }
  .header-deco { width: 50px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 16px; }

  /* BACK LINK */
  .back-link {
    max-width: 900px; margin: 0 auto; padding: 16px 24px 0;
  }
  .back-link a {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted); text-decoration: none;
    transition: color 0.2s;
  }
  .back-link a:hover { color: var(--gold); }
  .back-link svg { width: 14px; height: 14px; }

  /* TRUST BAR */
  .trust-bar { background: var(--bg-warm); border-bottom: 1px solid var(--border); }
  .trust-inner {
    max-width: 900px; margin: 0 auto; padding: 16px 24px;
    display: flex; flex-wrap: wrap; gap: 16px 32px;
    align-items: center; justify-content: center;
  }
  .trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-light); }
  .trust-item svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }

  /* PROGRESS */
  .progress-bar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
  }
  .progress-inner { max-width: 900px; margin: 0 auto; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
  .progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 2px; transition: width 0.4s; width: 0%; }
  .progress-text { max-width: 900px; margin: 0 auto; padding: 8px 0; font-size: 12px; color: var(--text-muted); text-align: right; }

  /* INTRO */
  .intro { max-width: 900px; margin: 0 auto; padding: 32px 24px 8px; }
  .intro-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 32px; box-shadow: var(--shadow-sm); }
  .intro-card h2 { font-family: 'Noto Serif JP', serif; font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
  .intro-card h2 svg { width: 22px; height: 22px; color: var(--gold); }
  .intro-card p { font-size: 14px; color: var(--text-light); line-height: 1.9; }
  .intro-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
  .intro-b { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); padding: 10px 14px; background: #f0ede6; border-radius: var(--radius); line-height: 1.6; }
  .intro-b svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }

  /* FORM */
  .form-container { max-width: 900px; margin: 0 auto; padding: 24px; }
  .form-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 20px; box-shadow: var(--shadow-sm); overflow: hidden; animation: fadeUp 0.5s ease both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
  .form-section:nth-child(1){animation-delay:.05s}.form-section:nth-child(2){animation-delay:.1s}.form-section:nth-child(3){animation-delay:.15s}.form-section:nth-child(4){animation-delay:.2s}.form-section:nth-child(5){animation-delay:.25s}.form-section:nth-child(6){animation-delay:.3s}.form-section:nth-child(7){animation-delay:.35s}.form-section:nth-child(8){animation-delay:.4s}

  .sh { display: flex; align-items: center; gap: 14px; padding: 20px 28px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #fafaf8, var(--bg-card)); }
  .sn { width: 34px; height: 34px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
  .st { font-family: 'Noto Serif JP', serif; font-size: 16px; font-weight: 600; color: var(--text); }
  .ss { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
  .sb { padding: 24px 28px 28px; }

  .fr { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .fg { margin-bottom: 22px; }
  .fg:last-child { margin-bottom: 0; }
  .fl { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 14px; font-weight: 600; color: var(--text); }
  .req { background: var(--error); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 3px; }
  .opt { background: var(--text-muted); color: #fff; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 3px; }
  .fh { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.6; }

  input[type="text"],input[type="email"],input[type="tel"],input[type="number"],input[type="date"],select,textarea {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-family: 'Noto Sans JP', sans-serif; font-size: 15px; color: var(--text);
    background: var(--bg-card); transition: all 0.2s; outline: none; appearance: none; -webkit-appearance: none;
  }
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
  textarea { resize: vertical; min-height: 110px; line-height: 1.8; }
  input:focus,select:focus,textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(184,149,62,0.15); }
  input::placeholder,textarea::placeholder { color: var(--text-muted); font-size: 14px; }

  .og { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 10px; }
  .ogw { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
  .ogn { grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); }
  .oi { position: relative; }
  .oi input { position: absolute; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2; }
  .oi label { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; font-size: 14px; background: var(--bg-card); user-select: none; }
  .oi label::before { content: ''; width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; transition: all 0.2s; }
  .oi input[type="checkbox"]+label::before { border-radius: 4px; }
  .oi input:checked+label { border-color: var(--gold); background: var(--gold-pale); color: var(--text); font-weight: 500; }
  .oi input:checked+label::before { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px var(--gold-pale); }
  .oi label:hover { border-color: var(--gold-light); background: #fdfbf7; }

  .rw { padding: 4px 0; }
  .rd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
  .rv { font-size: 22px; font-weight: 700; color: var(--gold); font-family: 'Noto Serif JP', serif; }
  .ru { font-size: 13px; color: var(--text-muted); }
  input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--val,50%), var(--border) var(--val,50%), var(--border) 100%); border-radius: 3px; outline: none; border: none; padding: 0; cursor: pointer; }
  input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--gold); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: grab; }
  input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; background: var(--gold); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: grab; }
  .rl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }

  .ps { background: var(--bg-warm); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 20px; }
  .ps h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
  .ps h3 svg { width: 18px; height: 18px; color: var(--gold); }
  .ps p { font-size: 13px; color: var(--text-light); line-height: 1.9; }
  .cr { margin-top: 16px; display: flex; align-items: flex-start; gap: 10px; }
  .cr input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; cursor: pointer; }
  .cr label { font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.7; }

  .submit-area { text-align: center; padding: 8px 0 48px; }
  .submit-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 18px 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #fff; border: none; border-radius: 100px;
    font-family: 'Noto Sans JP', sans-serif; font-size: 16px; font-weight: 700;
    letter-spacing: 1px; cursor: pointer;
    box-shadow: 0 4px 20px rgba(184,149,62,0.3);
    transition: all 0.3s; position: relative; overflow: hidden;
  }
  .submit-btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); transition: left 0.5s; }
  .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(184,149,62,0.4); }
  .submit-btn:hover::after { left: 100%; }
  .submit-btn svg { width: 20px; height: 20px; }
  .submit-note { font-size: 12.5px; color: var(--text-muted); margin-top: 14px; line-height: 1.7; }

  .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 24px; }
  .modal-overlay.active { display: flex; }
  .modal { background: var(--bg-card); border-radius: var(--radius-lg); padding: 40px; max-width: 520px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); animation: scaleIn 0.3s ease; }
  @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .modal-icon { width: 64px; height: 64px; background: var(--gold-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
  .modal-icon svg { width: 32px; height: 32px; color: var(--gold); }
  .modal h3 { font-family: 'Noto Serif JP', serif; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
  .modal p { font-size: 14px; color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
  .modal-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 36px; background: var(--gold); color: #fff; border: none; border-radius: 100px; font-family: 'Noto Sans JP', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; }
  .modal-btn:hover { background: var(--gold-light); }

  .footer { background: #3a3a3a; color: rgba(255,255,255,0.7); padding: 28px 24px; text-align: center; font-size: 12.5px; line-height: 1.8; }
  .footer strong { color: #fff; font-weight: 600; }
  .footer-deco { width: 40px; height: 2px; background: var(--gold); margin: 12px auto; }

  @media (max-width: 640px) {
    .header-inner { padding: 28px 18px; }
    .sh { padding: 16px 20px; }
    .sb { padding: 20px; }
    .intro-card { padding: 22px 20px; }
    .ps { padding: 20px; }
    .og { grid-template-columns: 1fr; }
    .ogn { grid-template-columns: 1fr 1fr; }
    .fr { grid-template-columns: 1fr; }
    .submit-btn { padding: 16px 44px; font-size: 15px; }
    .trust-inner { justify-content: flex-start; gap: 12px 24px; }
  }


/* ======================================================================
   フォーム用の控えめなホバー演出（PC・マウス操作時のみ）
   入力欄そのものより、選択肢・カード・送信ボタンを中心に動かす
   ====================================================================== */
:root {
  --motion-ease: cubic-bezier(.22,1,.36,1);
  --hover-shadow-form: 0 14px 34px rgba(41,59,95,.12);
}

.intro-card,
.intro-b,
.form-section,
.oi label,
.submit-btn,
.back-link a {
  transition:
    transform .26s var(--motion-ease),
    box-shadow .26s var(--motion-ease),
    border-color .26s var(--motion-ease),
    background-color .26s var(--motion-ease),
    color .26s var(--motion-ease);
}

@media (hover:hover) and (pointer:fine) {
  .intro-card:hover,
  .form-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow-form);
  }

  .intro-b:hover,
  .oi label:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(184,149,62,.10);
  }

  .oi label:hover {
    border-color: var(--gold-light);
    background: #fdfbf7;
  }

  .back-link a:hover {
    transform: translateX(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-card,
  .intro-b,
  .form-section,
  .oi label,
  .submit-btn,
  .back-link a {
    transition: none !important;
    animation: none !important;
  }
  .intro-card:hover,
  .intro-b:hover,
  .form-section:hover,
  .oi label:hover,
  .submit-btn:hover,
  .back-link a:hover {
    transform: none !important;
  }
}

/* ── GAS送信まわりの追加スタイル ── */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-error { max-width: 560px; margin: 0 auto 20px; padding: 14px 18px; border: 1px solid var(--error); border-radius: var(--radius); background: #fdf2f0; color: var(--error); font-size: 13.5px; line-height: 1.7; text-align: left; }
.form-error[hidden] { display: none; }
.submit-btn[disabled] { opacity: .6; cursor: wait; }


/* ── 個人情報保護方針リンク ── */
.ps-links { margin-top: 4px; }
.ps-links a { display: inline-block; margin-left: 14px; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ps-links a:first-of-type { margin-left: 8px; }
.ps-links a:hover { color: var(--navy); }

/* ── 完了モーダル（自動移動の案内） ── */
.modal-redirect { margin: -6px 0 20px; font-size: 13px; color: var(--text-muted); }
.modal-redirect span { display: inline-block; min-width: 1em; font-weight: 700; color: var(--gold); }
a.modal-btn { text-decoration: none; }
