/*
Theme Name:  Surprise, Again
Theme URI:   https://surprise-again.com
Description: 3DCGデザインスタジオ「Surprise, Again」のカスタムWordPressテーマ。ACF Pro連携、バニラJS、CSSカスタムプロパティを活用したラグジュアリーコーポレートサイト。
Version:     1.0.0
Author:      Surprise, Again
Author URI:  https://surprise-again.com
License:     All Rights Reserved
Text Domain: surprise-again
Tags:        full-site-editing, custom-background, custom-logo, threaded-comments
*/

/* ============================================================
   1. CSS カスタムプロパティ（デザイントークン）
   ============================================================ */
:root {
  /* --- カラーパレット --- */
  --sa-bg-warm:       #F7F5F0;   /* ベージュ背景（メインBG） */
  --sa-bg-cream:      #EEEAE2;   /* やや濃いベージュ（セクション交互） */
  --sa-bg-white:      #FFFFFF;   /* 白背景 */
  --sa-surface:       #FBFAF7;   /* 入力フィールドBG */

  /* --- アクセントカラー --- */
  --sa-brown:         #7B5A4A;   /* メインブラウン */
  --sa-brown-dark:    #5D4438;   /* 濃いブラウン */
  --sa-brown-light:   #8A6354;   /* 明るめブラウン */
  --sa-gold:          #C3A46B;   /* ゴールド／アクセント */
  --sa-gold-dark:     #A3824F;   /* 濃いゴールド */
  --sa-mauve:         #8A6F86;   /* モーブ（3rdアクセント） */

  /* --- テキストカラー --- */
  --sa-text-dark:     #2D2A28;   /* メインテキスト */
  --sa-text-mid:      #5F5A55;   /* サブテキスト */
  --sa-text-light:    #8A857F;   /* 薄いテキスト */
  --sa-footer-bg:     #2D2A28;   /* フッター背景 */

  /* --- グラデーション --- */
  --sa-grad-brown:    linear-gradient(135deg, #8A6354, #7B5A4A);
  --sa-grad-brown-dark: linear-gradient(135deg, #7B5A4A, #5D4438);
  --sa-grad-icon-brown: linear-gradient(145deg, #9B8090, #7B5A4A);
  --sa-grad-icon-mauve: linear-gradient(145deg, #A08AA0, #8A6F86);
  --sa-grad-icon-gold:  linear-gradient(145deg, #D4B878, #C3A46B);

  /* --- シャドウ --- */
  --sa-shadow-card:   drop-shadow(0px 26px 54px rgba(80, 60, 50, 0.32));
  --sa-shadow-btn:    drop-shadow(0px 18px 34px rgba(123, 90, 74, 0.6));
  --sa-shadow-soft:   drop-shadow(0px 22px 46px rgba(80, 60, 50, 0.3));
  --sa-shadow-flow:   drop-shadow(0px 16px 30px rgba(80, 60, 50, 0.4));

  /* --- タイポグラフィ --- */
  --sa-font-jp:       'Zen Kaku Gothic New', sans-serif;
  --sa-font-en:       'Outfit', sans-serif;

  /* --- スペーシング --- */
  --sa-section-py:    clamp(86px, 12vh, 140px);
  --sa-section-px:    clamp(22px, 6vw, 80px);
  --sa-max-width:     1180px;

  /* --- ボーダーラジウス --- */
  --sa-radius-card:   28px;
  --sa-radius-btn:    999px;
  --sa-radius-icon:   22px;
  --sa-radius-tag:    999px;

  /* --- トランジション --- */
  --sa-ease-reveal:   cubic-bezier(0.22, 0.6, 0.36, 1);
  --sa-dur-reveal:    0.9s;
}

/* ============================================================
   2. リセット & ベース
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--sa-bg-warm);
  color: var(--sa-text-dark);
  font-family: var(--sa-font-jp);
  font-size: 16px;
  line-height: 1.7;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================================
   3. グローバルレイアウト
   ============================================================ */
.sa-container {
  max-width: var(--sa-max-width);
  margin-inline: auto;
  padding-block: var(--sa-section-py);
  padding-inline: var(--sa-section-px);
}

.sa-section-label {
  font-family: var(--sa-font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sa-gold);
  margin-bottom: 18px;
}

/* ============================================================
   4. ヘッダー
   ============================================================ */
#sa-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.45s, box-shadow 0.45s;
}

#sa-header .sa-header-inner {
  max-width: 1260px;
  margin-inline: auto;
  padding: 13px clamp(18px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#sa-header .sa-logo img {
  height: 46px;
  width: auto;
}

#sa-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}

#sa-nav-links a:not(.sa-btn-contact) {
  font-size: 14px;
  font-weight: 500;
  color: var(--sa-text-mid);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

#sa-nav-links a:not(.sa-btn-contact):hover {
  color: var(--sa-brown);
}

.sa-btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: #fff !important;
  padding: 11px 22px;
  border-radius: var(--sa-radius-btn);
  background: var(--sa-grad-brown);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  filter: var(--sa-shadow-btn);
  transition: filter 0.25s, transform 0.2s;
}

.sa-btn-contact:hover {
  filter: drop-shadow(0px 22px 38px rgba(123, 90, 74, 0.75));
  transform: translateY(-1px);
}

/* ハンバーガーボタン */
#sa-nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  filter: drop-shadow(0px 8px 22px rgba(80, 60, 50, 0.4));
}

#sa-nav-burger .burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--sa-text-dark);
  border-radius: 2px;
  box-shadow: 0 6px 0 var(--sa-text-dark), 0 -6px 0 var(--sa-text-dark);
  transition: box-shadow 0.3s;
}

/* モバイルメニュー */
#sa-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(247, 245, 240, 0.97);
  backdrop-filter: blur(16px);
  padding: 20px clamp(18px, 5vw, 56px) 24px;
  z-index: 99;
  border-bottom: 1px solid rgba(123, 90, 74, 0.1);
  box-shadow: 0 16px 40px rgba(80, 60, 50, 0.15);
}

#sa-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sa-mobile-menu li {
  padding: 0;
  margin: 0;
}

#sa-mobile-menu.is-open {
  display: flex;
}

#sa-mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--sa-text-mid);
  border-bottom: 1px solid rgba(123, 90, 74, 0.08);
}

#sa-mobile-menu a:last-child {
  border-bottom: none;
  margin-top: 8px;
}

/* ============================================================
   5. ボタン共通スタイル
   ============================================================ */
.sa-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 16px;
  color: #fff;
  padding: 16px 30px;
  border-radius: var(--sa-radius-btn);
  background: var(--sa-grad-brown);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  filter: var(--sa-shadow-btn);
  transition: filter 0.25s, transform 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.sa-btn-primary:hover {
  filter: drop-shadow(0px 24px 42px rgba(123, 90, 74, 0.75));
  transform: translateY(-2px);
}

.sa-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 16px;
  color: var(--sa-text-mid);
  padding: 16px 30px;
  border-radius: var(--sa-radius-btn);
  background: #fff;
  border: 1px solid rgba(123, 90, 74, 0.18);
  filter: drop-shadow(0px 10px 24px rgba(80, 60, 50, 0.3));
  transition: filter 0.25s, transform 0.2s;
  text-decoration: none;
}

.sa-btn-secondary:hover {
  filter: drop-shadow(0px 14px 30px rgba(80, 60, 50, 0.4));
  transform: translateY(-2px);
}

.sa-btn-arrow {
  font-family: var(--sa-font-en);
}

/* ============================================================
   6. カード共通スタイル
   ============================================================ */
.sa-card {
  background: var(--sa-bg-white);
  border-radius: var(--sa-radius-card);
  border: 1px solid rgba(123, 90, 74, 0.07);
  filter: var(--sa-shadow-card);
  transition: filter 0.3s, transform 0.3s;
}

.sa-card:hover {
  filter: drop-shadow(0px 34px 64px rgba(80, 60, 50, 0.38));
  transform: translateY(-4px);
}

/* ============================================================
   7. アニメーション
   ============================================================ */
@keyframes saFloatA {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

@keyframes saFloatB {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(14px); }
}

@keyframes saFloatC {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-12px) rotate(4deg); }
}

/* スクロール連動リビール */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--sa-dur-reveal) var(--sa-ease-reveal),
    transform var(--sa-dur-reveal) var(--sa-ease-reveal);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   8. フォームスタイル
   ============================================================ */
.sa-form {
  background: var(--sa-bg-white);
  border-radius: var(--sa-radius-card);
  padding: clamp(26px, 4vw, 44px);
  filter: drop-shadow(0px 30px 60px rgba(80, 60, 50, 0.34));
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sa-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-form label span {
  font-size: 13px;
  font-weight: 700;
  color: var(--sa-text-dark);
}

.sa-form input,
.sa-form textarea,
.sa-form select {
  font-family: inherit;
  font-size: 15px;
  color: var(--sa-text-dark);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(123, 90, 74, 0.18);
  background: var(--sa-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.sa-form input:focus,
.sa-form textarea:focus,
.sa-form select:focus {
  border-color: rgba(123, 90, 74, 0.45);
  box-shadow: 0 0 0 3px rgba(123, 90, 74, 0.08);
}

.sa-form textarea {
  resize: vertical;
  min-height: 120px;
}

.sa-form .sa-form-submit {
  margin-top: 6px;
  align-self: center;
}

/* ============================================================
   9. フッター
   ============================================================ */
.sa-footer {
  background: var(--sa-footer-bg);
  color: #fff;
}

.sa-footer-inner {
  max-width: var(--sa-max-width);
  margin-inline: auto;
  padding: clamp(54px, 8vh, 80px) var(--sa-section-px) clamp(28px, 4vh, 40px);
}

.sa-footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sa-footer-brand .sa-footer-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.sa-footer-brand .sa-footer-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.sa-footer-brand .sa-footer-logo span {
  font-family: var(--sa-font-en);
  font-weight: 600;
  font-size: 17px;
}

.sa-footer-brand p {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255,255,255,0.6);
  margin: 0;
  max-width: 24em;
}

.sa-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

.sa-footer-nav a {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  transition: color 0.2s;
}

.sa-footer-nav a:hover {
  color: #fff;
}

.sa-footer-copy {
  padding-top: 24px;
  font-family: var(--sa-font-en);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   10. ユーティリティ
   ============================================================ */
.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;
}

/* ============================================================
   11. レスポンシブ
   ============================================================ */
@media (max-width: 880px) {
  #sa-nav-links {
    display: none !important;
  }

  #sa-nav-burger {
    display: inline-flex !important;
  }
}

@media (max-width: 640px) {
  :root {
    --sa-section-py: clamp(60px, 10vh, 90px);
  }
}

/* ============================================================
   12. WordPress コアブロック上書き防止
   ============================================================ */
.wp-block {
  max-width: none;
}
