:root {
  --bg: #fffbf5; /* ロゴの背景色に合わせた少し温かみのある白 */
  --text: #333333;
  --muted: #666666;
  --border: #e0e0e0;
  --primary: #d62828;
  --accent: #8c9b7f; /* 自然な緑色 */
  --font-serif: "Shippori Mincho", "Noto Serif JP", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 2;
  font-feature-settings: "palt";
  overflow-x: hidden; /* 横スクロール防止（カクつき防止） */
  width: 100%;
  /* overscroll-behavior-y: none; バウンススクロールを抑制 - Pull to Refreshを有効にするため削除 */
  touch-action: manipulation; /* タッチ操作の最適化 */
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: 0.1em;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg); /* 透明度をなくして完全に不透明に */
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 100;
  transition: all 0.3s ease;
}

.site-header.hide {
  opacity: 0;
  pointer-events: none;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  height: 60px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 21px;
  letter-spacing: 0.1em;
  position: relative;
  font-family: var(--font-serif);
  font-weight: 600;
  text-shadow: 
    -0.5px -0.5px 0 rgba(255, 255, 255, 0.25),
    0.5px -0.5px 0 rgba(255, 255, 255, 0.25),
    -0.5px 0.5px 0 rgba(255, 255, 255, 0.25),
    0.5px 0.5px 0 rgba(255, 255, 255, 0.25);
}

.site-nav a::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 158px;
  height: 158px;
  background-image: url('../img/tomato_mini_hober.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  opacity: 0.75;
}

/* Instagramアイコンにはホバーエフェクトを表示しない */
.site-nav a[target="_blank"]::after {
  display: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Hero Full */
.hero-full {
  position: relative;
  height: 100vh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* 写真全体を少し暗くして文字を読みやすく */
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8); /* 文字の影を濃くして可読性アップ */
}

.hero-content h1 {
  font-size: 32px;
  margin-bottom: 32px;
  line-height: 1.8;
  letter-spacing: 0.15em;
}

.hero-en {
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  margin-top: 24px;
  opacity: 1; /* 透明度をなくしてくっきり表示 */
  font-weight: 800;
  color: #000; /* 黒色 */
  background-color: rgba(255, 255, 255, 0.5); /* さらに薄い背景 */
  padding: 8px 24px;
  display: inline-block;
  text-shadow: none;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  text-decoration: none;
  border: 1px solid currentColor;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.btn-white {
  color: #fff;
  border-color: #fff;
}

.btn-white:hover {
  background: #fff;
  color: var(--text);
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.8;
}

.scroll-down::after {
  content: '';
  display: block;
  width: 1px;
  height: 60px;
  background: #fff;
  margin: 10px auto 0;
  animation: scrollAnim 2s infinite;
}

@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Feature Section (Story Layout) */
.feature-section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: 32px;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: inline-block;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 20px;
}

.product-grid-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
}

/* 3番目の要素（シュガープラム）を中央配置にする（PC用） */
.product-grid-new .product-card:nth-child(3) {
  grid-column: 1 / -1;
  width: calc(50% - 30px); /* (100% - 60px gap) / 2 と同じ幅 */
  margin: 0 auto;
}

.product-card {
  border: 1px solid var(--border);
  padding: 60px 40px 40px;
  position: relative;
  text-align: center;
  margin-top: 20px; /* タイトルがはみ出る分のスペース */
}

.product-card h3 {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 20px;
  margin: 0;
  font-size: 20px;
  white-space: nowrap;
  letter-spacing: 0.1em;
  color: var(--text);
  font-weight: 500;
}

/* タイトルの上の短い縦線（装飾） */
.product-card h3::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 20px;
  background: var(--border);
}

.product-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.product-card p {
  text-align: left;
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.feature-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: none;
}

/* ご挨拶セクションの画像のみ丸くする */
#greeting .feature-image img {
  width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: none;
  margin: 0 auto;
}

.alternate .feature-image {
  order: 2;
}

.alternate .feature-text {
  order: 1;
}

.sub-label {
  display: block;
  font-family: var(--font-sans);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.feature-text h2 {
  font-size: 32px;
  margin: 0 0 40px;
  line-height: 1.5;
}

.feature-text p {
  margin-bottom: 24px;
  color: var(--muted);
  text-align: justify;
}

.product-item {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.product-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.product-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.value-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.value-list li {
  margin-bottom: 32px;
}

.value-list h3 {
  font-size: 18px;
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.value-list h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.sig {
  text-align: right;
  margin-top: 32px;
  font-size: 14px;
}

/* Process Section */
.process-section {
  padding: 120px 0;
  background: var(--bg); /* 全体の背景色と統一 */
}

.process-section h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 60px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.step {
  text-align: center;
  position: relative;
}

.step-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 200;
  color: #ddd;
  margin-bottom: 16px;
}

.step img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.step h3 {
  font-size: 18px;
  margin: 0;
}

/* News Section */
.news-section {
  padding: 120px 0;
}

.news-section h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 60px;
}

.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  border-bottom: 1px solid var(--border);
}

.news-header {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 24px 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.news-header:hover {
  opacity: 0.7;
}

.news-meta {
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.news-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  flex-grow: 1;
}

.news-toggle-icon {
  width: 16px;
  height: 16px;
  position: relative;
  flex-shrink: 0;
  margin-left: 16px;
}

.news-toggle-icon::before,
.news-toggle-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.news-toggle-icon::before {
  width: 100%;
  height: 1px;
}

.news-toggle-icon::after {
  width: 1px;
  height: 100%;
}

.news-item.open .news-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.news-content {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.news-item.open .news-content {
  opacity: 1;
}

.news-content-inner {
  padding: 0 40px 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Contact Section */
.contact-section {
  padding: 120px 0;
  background: var(--bg); /* 全体の背景色と統一 */
}

.contact-section h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 20px;
}

.contact-desc {
  text-align: center;
  margin-bottom: 60px;
  color: var(--muted);
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 60px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-family: var(--font-sans);
}

.required {
  color: var(--primary);
  font-size: 12px;
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.privacy-policy {
  margin: 40px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  height: 200px;
  overflow-y: scroll;
}

.privacy-policy h3 {
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 12px;
}

.privacy-content ul {
  padding-left: 20px;
}

.form-submit {
  text-align: center;
}

.btn-submit {
  background: var(--text);
  color: #fff;
  border: none;
  cursor: pointer;
  min-width: 200px;
}

.btn-submit:hover {
  background: var(--accent);
  color: #fff;
}

/* Footer */
.site-footer {
  background: var(--bg); /* 全体の背景色と統一 */
  padding: 80px 0 40px;
  color: var(--text);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer-brand {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  display: block;
}

.footer-address {
  font-style: normal;
  line-height: 1.8;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.6;
}

.copy {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.05);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-sans);
}

/* Animation */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  .pc-only {
    display: none;
  }

  .site-header .container {
    padding: 0 15px; /* ヘッダーはさらに広げる */
  }

  .contact-form {
    padding: 30px;
  }
  .header-inner {
    height: 70px;
  }
  
  .nav-toggle {
    display: block;
    z-index: 101;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg); /* メニュー背景も統一 */
    flex-direction: column;
    padding: 100px 40px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  }

  .site-nav.open {
    right: 0;
  }

  .hero-content h1 {
    font-size: 22px; /* スマホで1行に収まるように小さく調整 */
    white-space: nowrap;
  }

  .product-grid-new {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* モバイル/iPadでは通常配置に戻す */
  .product-grid-new .product-card:nth-child(3) {
    grid-column: auto;
    width: auto;
    margin: 20px 0 0 0;
    justify-self: stretch;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Philosophyセクションのレイアウト調整 */
  #philosophy.feature-section {
    display: flex;
    flex-direction: column;
  }
  
  #philosophy .container {
    display: flex;
    flex-direction: column;
    gap: 0; /* ギャップをなくしてマージンで調整 */
  }
  
  #philosophy .feature-text {
    display: contents; /* 子要素の順序制御のためcontentsに */
  }

  #philosophy .feature-text h2 {
    order: 1; /* タイトル */
    margin-bottom: 30px;
  }
  
  #philosophy .feature-image {
    order: 2; /* 写真 */
    margin-bottom: 40px;
  }

  #philosophy .value-list {
    order: 3; /* リスト */
  }
  
  #philosophy .feature-text p {
    order: 4; /* 説明文 */
  }
  
  #philosophy .sub-label {
    display: block;
    order: 0; /* タイトルの上 */
    margin-bottom: 10px;
  }

  /* Philosophyセクションの行間調整 */
  #philosophy .value-list li {
    margin-bottom: 5px;
  }

  #philosophy .value-list h3 {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.4;
  }

  #philosophy .feature-text p {
    line-height: 1.5;
    margin-top: 5px;
    margin-bottom: 20px;
  }

  /* Greetingセクションのレイアウト調整 */
  #greeting .container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #greeting .feature-text {
    display: contents;
  }

  #greeting .sub-label {
    display: block;
    order: 0;
    margin-bottom: 10px;
  }

  #greeting .feature-text h2 {
    order: 1;
    margin-bottom: 30px;
  }

  #greeting .feature-image {
    order: 2;
    margin-bottom: 40px;
  }

  #greeting .feature-text p {
    order: 3;
    margin-bottom: 20px;
  }

  .feature-image img {
    box-shadow: none;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    text-align: center;
    align-items: center;
    order: -1;
  }

  .brand-title {
    font-size: 13px; /* スマホで1行に収まるようにさらに小さく調整 */
    white-space: nowrap; /* 改行を禁止 */
  }

  .feature-text h2,
  .section-header h2,
  .news-section h2,
  .contact-section h2,
  .process-section h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 20px;
    display: table;
  }

  /* 中央揃えが必要な見出し */
  .section-header h2,
  .news-section h2,
  .contact-section h2,
  .process-section h2 {
    margin-left: auto;
    margin-right: auto;
  }

  /* 元のマージン調整を維持しつつ調整 */
  .news-section h2,
  .process-section h2 {
    margin-bottom: 40px;
  }

  .contact-section h2 {
    margin-bottom: 20px;
  }

  .feature-text h2 {
    margin-bottom: 40px;
  }

  .section-header h2 {
    white-space: nowrap;
  }
}
