/* ========================================
   まごころ食品商店 LP - メインCSS
   ======================================== */

/* --- リセット・ベース --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: #333;
  letter-spacing: 0.05em;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* --- fade-in アニメーション --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   ヘッダー
   ======================================== */
.header {
  padding: 20px 50px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__logo-img {
  width: 40px;
  height: 40px;
}

.header__logo-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.header__nav-list {
  display: flex;
  gap: 28px;
}

.header__nav-list a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
}

.header__nav-list a:hover {
  opacity: 0.6;
}

/* ハンバーガーメニュー */
.header__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.header__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  position: absolute;
  left: 0;
  transition: all 0.3s;
}

.header__hamburger span:nth-child(1) { top: 0; }
.header__hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.header__hamburger span:nth-child(3) { bottom: 0; }

/* ハンバーガー開閉時 */
.header__hamburger.is-active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.header__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* ========================================
   サイドテキスト（固定）
   ======================================== */
.side-text {
  position: fixed;
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #333;
  z-index: 100;
  top: 50%;
  transform: translateY(-50%);
}

.side-text--left {
  left: 14px;
}

.side-text--right {
  right: 14px;
}

/* ========================================
   ヒーロー
   ======================================== */
.hero {
  padding: 0 50px;
  margin-bottom: 80px;
}

.hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 458px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 48px 40px;
  position: relative;
}

.hero__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 60%);
}

.hero__text {
  position: relative;
  z-index: 1;
  color: #fff;
}

.hero__sub {
  font-family: 'Bad Script', cursive;
  font-style: italic;
  font-size: 30px;
  display: block;
  margin-bottom: 4px;
}

.hero__title {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

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

.section__inner {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
}

/* 縦書きセクションタイトル */
.section__title-vertical {
  writing-mode: vertical-rl;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.12em;
  border-right: 2px solid #333;
  padding-right: 12px;
  flex-shrink: 0;
  align-self: flex-start;
}

.section__content {
  flex: 1;
  min-width: 0;
}

/* ========================================
   ご挨拶
   ======================================== */
.greeting__heading {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  margin-bottom: 32px;
}

.greeting__body {
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.greeting__body p {
  margin-bottom: 24px;
}

.greeting__body p:last-child {
  margin-bottom: 0;
}

.greeting__image {
  margin-top: 48px;
}

.greeting__image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

/* ========================================
   私たちの仕事
   ======================================== */
.work-item {
  margin-bottom: 64px;
}

.work-item:last-child {
  margin-bottom: 0;
}

.work-item__number {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.work-item__num {
  font-family: 'Rubik', sans-serif;
  font-weight: 400;
  font-size: 28px;
  color: #050f77;
  position: relative;
  z-index: 1;
}

/* 番号右下の正方形グラデーション装飾 */
.work-item__num-deco {
  position: absolute;
  bottom: -2px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #050f77 0%, #4a5bd4 100%);
  opacity: 0.2;
  border-radius: 2px;
}

.work-item__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.work-item__text {
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

.work-item__images {
  display: flex;
  gap: 2%;
}

.work-item__img {
  width: 32%;
  flex-shrink: 0;
}

.work-item__img img {
  width: 100%;
  height: 126px;
  object-fit: cover;
  border-radius: 4px;
}

/* ========================================
   会社情報
   ======================================== */
.company__content {
  display: flex;
  gap: 40px;
}

.company__text {
  flex: 1;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.company__text p {
  margin-bottom: 20px;
}

.company__text p:last-child {
  margin-bottom: 0;
}

.company__table {
  flex: 1;
}

.company__table table {
  width: 100%;
}

.company__table th,
.company__table td {
  padding: 14px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  letter-spacing: 0.05em;
  vertical-align: top;
}

.company__table th {
  font-weight: 500;
  width: 100px;
  white-space: nowrap;
  color: #333;
}

.company__table td {
  color: #555;
}

.company__table td a {
  color: #050f77;
  text-decoration: underline;
}

.company__map-link {
  font-size: 13px;
  display: inline-block;
  margin-top: 4px;
}

/* ========================================
   お問い合わせ
   ======================================== */
.contact-form {
  max-width: 600px;
}

.contact-form__group {
  margin-bottom: 24px;
}

.contact-form__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.contact-form__label .required {
  font-size: 11px;
  color: #fff;
  background: #c0392b;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 8px;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: border-color 0.3s;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: #050f77;
}

.contact-form__textarea {
  resize: vertical;
}

.contact-form__group--checkbox {
  margin-top: 32px;
}

.contact-form__checkbox-label {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.contact-form__checkbox-label a {
  color: #050f77;
  text-decoration: underline;
}

.contact-form__group--submit {
  margin-top: 36px;
}

.contact-form__submit {
  display: inline-block;
  padding: 14px 48px;
  background: #050f77;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.3s;
}

.contact-form__submit:hover {
  opacity: 0.8;
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__thanks {
  text-align: center;
  padding: 60px 0;
}

.contact-form__thanks h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
}

.contact-form__thanks p {
  font-size: 14px;
  color: #666;
}

/* ========================================
   フッター
   ======================================== */
.footer {
  background: #323232;
  color: #fff;
  padding: 48px 50px 32px;
}

.footer__inner {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.footer__nav ul {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer__nav a {
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
}

.footer__nav a:hover {
  opacity: 0.7;
}

.footer__links {
  margin-bottom: 24px;
}

.footer__links a {
  font-size: 12px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.footer__links a:hover {
  opacity: 1;
}

.footer__copyright {
  font-size: 12px;
  opacity: 0.6;
}

/* ========================================
   レスポンシブ: タブレット（840px以下）
   ======================================== */
@media (max-width: 840px) {
  .section__inner {
    flex-direction: column;
    gap: 24px;
  }

  .section__title-vertical {
    writing-mode: horizontal-tb;
    border-right: none;
    border-bottom: 2px solid #333;
    padding-right: 0;
    padding-bottom: 8px;
    font-size: 20px;
  }

  .company__content {
    flex-direction: column;
  }

  .hero__title {
    font-size: 36px;
  }

  .greeting__heading {
    font-size: 26px;
  }

  .work-item__title {
    font-size: 26px;
  }

  /* サイドテキスト非表示 */
  .side-text {
    display: none;
  }

  .header {
    padding: 20px 24px;
  }

  .hero {
    padding: 0 24px;
  }

  .section {
    padding: 60px 24px;
  }

  .footer {
    padding: 40px 24px 24px;
  }
}

/* ========================================
   レスポンシブ: モバイル（540px以下）
   ======================================== */
@media (max-width: 540px) {
  /* ハンバーガー表示 */
  .header__hamburger {
    display: block;
  }

  .header__nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

  .header__nav.is-open {
    display: flex;
  }

  .header__nav-list {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .header__nav-list a {
    font-size: 18px;
  }

  /* ヒーロー */
  .hero {
    padding: 0 0 0 0;
    margin-bottom: 60px;
  }

  .hero__inner {
    margin-left: 0;
    margin-right: 38px;
    border-radius: 0 4px 4px 0;
    height: 360px;
    padding: 32px 24px;
  }

  .hero__sub {
    font-size: 22px;
  }

  .hero__title {
    font-size: 28px;
  }

  /* 仕事セクション画像 */
  .work-item__img img {
    height: 90px;
  }

  .work-item__title {
    font-size: 22px;
  }

  .greeting__heading {
    font-size: 22px;
  }

  /* フッター */
  .footer__nav ul {
    flex-direction: column;
    gap: 16px;
  }
}
