/* =================================================================
   サービス利用申し込みフォーム — 日本企業向けコーポレートスタイル
   ================================================================= */

:root {
  --bg-primary:    #FAF9F6;
  --bg-secondary:  #F0EDE6;
  --color-primary: #01392A;
  --color-accent:  #003366;
  --color-gold:       #C5A059;
  --color-gold-light: #E0C99E;
  --gradient-gold: linear-gradient(135deg, #C5A059 0%, #F1E5AC 50%, #A68966 100%);
  --text-main:     #1C1C1C;
  --text-muted:    #6B6860;
  --text-on-dark:  #FAF9F6;
  --border-color:  rgba(0,0,0,.09);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06);
  --shadow-md:     0 2px 8px rgba(0,0,0,.05), 0 12px 48px rgba(0,0,0,.08);
  --font-serif:    'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --font-sans:     'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --ease:          0.2s ease;
  --radius:        2px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  align-items: center;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
  border-radius: 1px;
}
.brand-divider {
  width: 1px;
  height: 22px;
  background: rgba(197,160,89,.35);
  flex-shrink: 0;
}
.brand-name {
  color: var(--text-on-dark);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.header-gold-bar {
  height: 2px;
  background: var(--gradient-gold);
}

/* ===== PAGE LAYOUT ===== */
.page-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
}

/* ===== INFO PANEL (LEFT) ===== */
.info-panel {
  background: linear-gradient(175deg, #01392A 0%, #011e17 100%);
  padding: 3.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}

/* 右端の金の縦ライン */
.info-panel::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(197,160,89,.4) 30%, rgba(197,160,89,.4) 70%, transparent 100%);
}

/* 背景の装飾的な円 */
.info-panel::before {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(197,160,89,.06);
  pointer-events: none;
}

.info-inner { position: relative; }

.info-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: rgba(197,160,89,.55);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.info-heading {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-on-dark);
  line-height: 1.45;
  letter-spacing: .04em;
  margin-bottom: 1.75rem;
}
.info-description {
  font-size: .83rem;
  color: rgba(250,249,246,.6);
  line-height: 1.9;
  border-left: 1px solid rgba(197,160,89,.45);
  padding-left: 1rem;
  margin-bottom: 2.75rem;
}

/* Steps */
.info-steps { margin-bottom: 2.5rem; }
.step-row {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
}
.step-num {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid rgba(197,160,89,.35);
  color: var(--color-gold-light);
  font-family: var(--font-serif);
  font-size: .68rem;
  letter-spacing: .03em;
  flex-shrink: 0;
  border-radius: 1px;
}
.step-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-top: .2rem;
}
.step-title {
  color: var(--text-on-dark);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.step-desc {
  color: rgba(250,249,246,.4);
  font-size: .72rem;
}
.step-line {
  width: 1px; height: 18px;
  background: rgba(197,160,89,.18);
  margin: .3rem 0 .3rem 13px;
}

/* Notice */
.info-notice {
  font-size: .78rem;
  color: rgba(250,249,246,.5);
  line-height: 2;
  padding: .875rem 1.25rem;
  border: 1px solid rgba(197,160,89,.15);
  background: rgba(0,0,0,.12);
}
.info-notice strong { color: rgba(224,201,158,.75); font-weight: 500; }

/* ===== FORM PANEL (RIGHT) ===== */
.form-panel {
  background: var(--bg-secondary);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 2.5rem;
}
.form-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--color-gold);
  box-shadow: var(--shadow-md);
  padding: 2.75rem;
  width: 100%;
  max-width: 560px;
}

/* ===== FORM HEADER ===== */
.form-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.form-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.form-subtitle {
  font-size: .81rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.required-note { color: #b03a2e; font-weight: 600; }

/* ===== FIELDS ===== */
.form-fields {
  border: none; padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  animation: fadeUp .4s ease both;
}
.field-group[data-index="0"] { animation-delay: .04s; }
.field-group[data-index="1"] { animation-delay: .08s; }
.field-group[data-index="2"] { animation-delay: .12s; }
.field-group[data-index="3"] { animation-delay: .16s; }
.field-group[data-index="4"] { animation-delay: .20s; }

.field-label {
  font-size: .78rem;
  font-weight: 500;
  color: #2a2a2a;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.required { color: #b03a2e; font-size: .88em; }
.optional  { color: var(--text-muted); font-weight: 400; font-size: .88em; }

.field-input {
  width: 100%;
  padding: .75rem .9rem;
  font-family: var(--font-sans);
  font-size: .88rem;
  color: var(--text-main);
  background: var(--bg-primary);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  appearance: none;
}
.field-input::placeholder { color: #C4C0B9; }
.field-input:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(1,57,42,.07);
}
.field-textarea {
  resize: vertical;
  min-height: 110px;
}

/* Error state */
.field-group.has-error .field-input {
  border-color: #b03a2e;
  background: #fff9f8;
}
.field-group.has-error .field-input:focus {
  box-shadow: 0 0 0 3px rgba(176,58,46,.08);
}
.field-error {
  font-size: .74rem;
  color: #b03a2e;
  min-height: 1.1em;
}

/* ===== ACTIONS ===== */
.form-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  animation: fadeUp .4s ease .24s both;
}
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  padding: .9rem 2rem;
  background: var(--color-primary);
  color: var(--text-on-dark);
  font-family: var(--font-serif);
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .1em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), color .25s ease;
  position: relative;
  overflow: hidden;
}
.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity .25s ease;
}
.submit-btn:hover:not(:disabled)::before { opacity: 1; }
.submit-btn:hover:not(:disabled) {
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(197,160,89,.3);
}
.submit-btn:active:not(:disabled) { transform: translateY(0); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-label, .btn-arrow { position: relative; z-index: 1; }

.btn-loader {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(250,249,246,.3);
  border-top-color: var(--text-on-dark);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  position: relative; z-index: 1;
}
.submit-btn.loading .btn-label,
.submit-btn.loading .btn-arrow { display: none; }
.submit-btn.loading .btn-loader { display: block; }

.form-legal {
  font-size: .74rem;
  color: var(--text-muted);
  text-align: center;
}
.legal-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== ERROR BANNER ===== */
.form-error-banner {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  background: #fff9f8;
  border: 1px solid #e8c0b8;
  border-left: 2px solid #b03a2e;
  margin-top: 1rem;
}
.error-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  background: #b03a2e;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 50%;
}
.error-message {
  font-size: .82rem;
  color: #7b2419;
  line-height: 1.6;
}

/* ===== SUCCESS ===== */
.success-inner {
  text-align: center;
  padding: 2.5rem 1rem;
}
.success-icon-wrap { margin-bottom: 1.5rem; }
.success-check {
  width: 60px; height: 60px;
  color: var(--color-primary);
}
.check-circle {
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  animation: drawCircle .6s ease forwards;
}
.check-mark {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawMark .4s ease .5s forwards;
}
.success-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.success-body {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 1.75rem;
}
.success-id-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.success-id-label {
  font-size: .68rem;
  color: var(--text-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.success-id {
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  color: var(--color-primary);
  font-weight: 600;
  word-break: break-all;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(175deg, #01392A 0%, #011e17 100%);
  border-top: 1px solid rgba(197,160,89,.15);
  color: rgba(250,249,246,.38);
  padding: 1rem 2.5rem;
  text-align: center;
}
.footer-inner { }
.footer-copy { font-size: .72rem; letter-spacing: .07em; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawMark   { to { stroke-dashoffset: 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .info-panel {
    padding: 2.5rem 1.75rem;
  }
  .info-panel::after {
    width: 100%; height: 1px;
    top: auto; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(197,160,89,.35) 30%, rgba(197,160,89,.35) 70%, transparent 100%);
  }
  .info-heading { font-size: 1.9rem; }
  .form-panel {
    padding: 2.25rem 1.5rem;
  }
  .form-card { padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  .header-inner { padding: 0 1.25rem; }
  .form-card { padding: 1.5rem 1.25rem; }
}
