/* =========================================================
   株式会社Tribe Foods Japan — 日本語版公式サイト
   Black × White × Deep Green × A Touch of Gold
========================================================= */

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

:root{
  --pure-black: #000000;
  --white: #FFFFFF;
  --off-white: #F5F5F0;
  --forest-green: #1A3D32;
  --muted-gold: #C9A86A;
  --soft-sage: #A3B8A2;

  --text-on-black: rgba(245,245,240,0.92);
  --text-on-white: #111111;

  --header-h: 72px;
  --radius: 14px;
  --shadow-soft: 0 12px 40px rgba(0,0,0,0.35);

  --ease: ease-out;
  --fade-dur: 0.6s;
  --title-fade-dur: 0.8s;
  --rise: 15px;
  
  --section-v: 12rem;
  --section-v-full: 14rem;
  --content-breath: 4rem;
}

body{
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--pure-black);
  color: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
  padding-top: var(--header-h);
  font-feature-settings: "palt"; /* プロポーショナルメトリクス */
}

section { scroll-margin-top: calc(var(--header-h) + 18px); }
a { color: inherit; text-decoration: none; }

/* === Typography === */
h1, h2, h3{
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.7;
}

p, li{
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.serif{
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.body-text{
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 2;
  color: var(--text-on-black);
  margin-top: var(--content-breath);
}

/* === Header / Nav === */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 50;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner{
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand{
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 1.8rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav a{
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.72);
  padding: 0.55rem 0.2rem;
  position: relative;
  transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
  white-space: nowrap;
}

.site-nav a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.25rem;
  width: 0;
  height: 2px;
  background: var(--muted-gold);
  transition: width 0.45s var(--ease);
  opacity: 0.95;
}

.site-nav a:hover{ color: rgba(255,255,255,0.92); }
.site-nav a:hover::after{ width: 100%; }

.site-nav a.active{ color: rgba(255,255,255,0.95); }
.site-nav a.active::after{ width: 100%; }

.nav-cta{ color: rgba(245,245,240,0.92); }

/* === Layout Containers === */
.section{
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-v) 5%;
  position: relative;

  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity var(--fade-dur) var(--ease), transform var(--fade-dur) var(--ease);
}

.section.visible{
  opacity: 1;
  transform: translateY(0);
}

.section--full{
  padding-top: var(--section-v-full);
  padding-bottom: var(--section-v-full);
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.container-narrow{
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* === Section Titles === */
.section-title-left,
.section-title-center{
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--title-fade-dur) var(--ease), transform var(--title-fade-dur) var(--ease);
}

.section.visible .section-title-left,
.section.visible .section-title-center{
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.section-title-left{
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--muted-gold);
  position: relative;
  padding-bottom: 1.1rem;
  margin-bottom: var(--content-breath);
}

.section-title-left::after{
  content:"";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 84px;
  height: 2px;
  background: var(--muted-gold);
  opacity: 0.9;
}

.section-title-center{
  font-size: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.section-subtitle{
  text-align: center;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.15em;
  margin-bottom: var(--content-breath);
  font-weight: 300;
}

.section-subtitle2{
  text-align: left;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.15em;
  margin-bottom: var(--content-breath);
  font-weight: 300;
}

.section-subtitle3{
  text-align: left;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.15em;
  margin-bottom: var(--content-breath);
  font-weight: 300;
}


/* === Hero === */
.hero{
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 5%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
}

.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05) brightness(1.1);
  transform: scale(1.01);
}

.hero-overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(26,61,50,0.14) 0%, transparent 65%),
    linear-gradient(180deg, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.65) 100%);
}

.hero-content{
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.2s var(--ease);
}

@keyframes fadeInUp{
  from{ opacity: 0; transform: translateY(15px); }
  to{ opacity: 1; transform: translateY(0); }
}

.logo{
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  margin-bottom: 4.5rem;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.3s forwards;
}

@keyframes fadeIn{ to{ opacity: 1; } }

.hero-headline{
  color: var(--muted-gold);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 600;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.6s forwards;
  letter-spacing: 0.08em;
}

.hero-tagline{
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 2;
  max-width: 720px;
  margin: 0 auto 2.8rem;
  font-weight: 400;
  color: rgba(245,245,240,0.90);
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.9s forwards;
}

.scroll-indicator{
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeInBounce 2s var(--ease) 1.8s forwards;
  z-index: 2;
}

@keyframes fadeInBounce{
  0%{ opacity: 0; transform: translateX(-50%) translateY(-5px); }
  100%{ opacity: 0.6; transform: translateX(-50%) translateY(0); }
}

/* === Business Section === */
.business-section{
  background: var(--off-white);
  color: var(--pure-black);
  text-align: center;
}

.business-section .section-title-left{
  color: var(--forest-green);
  text-align: left;
}

.business-section .section-subtitle{
  color: rgba(0,0,0,0.55);
  text-align: left;
}

.business-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem 2.5rem;
  margin-top: calc(var(--content-breath) * 0.5);
}

.business-item{
  display: flex;
  gap: 1.5rem;
  text-align: left;
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius);
  border: 1px solid rgba(26,61,50,0.08);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

.business-item:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  border-color: rgba(26,61,50,0.18);
}

.business-icon{
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-green);
  color: var(--muted-gold);
  border-radius: 50%;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.business-icon svg{
  width: 28px;
  height: 28px;
  display: block;
}

.business-item:hover .business-icon{
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26,61,50,0.35);
}


.business-content{
  flex: 1;
}

.business-title{
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-bottom: 0.8rem;
  color: var(--forest-green);
  font-weight: 600;
  line-height: 1.6;
}

.business-description{
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.9;
  color: var(--text-on-white);
}

/* === Philosophy Section === */
.philosophy-section{
  background: var(--forest-green);
  text-align: center;
}

.philosophy-section .section-title-center{
  color: var(--muted-gold);
}

.philosophy-section .section-subtitle{
  color: rgba(245,245,240,0.65);
}

.philosophy-body{
  margin-top: calc(var(--content-breath) * 0.5);
}

.philosophy-quote{
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  line-height: 2.2;
  max-width: 720px;
  margin: 0 auto;
  margin-bottom: var(--content-breath);
  color: rgba(245,245,240,0.95);
}

.philosophy-quote--small{
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin-top: calc(var(--content-breath) * 1.5);
}

.divider{
  width: 64px;
  height: 2px;
  background: var(--muted-gold);
  margin: var(--content-breath) auto;
  opacity: 0.95;
}

.philosophy-principles{
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 2.4;
  max-width: 680px;
  margin: 0 auto;
  color: rgba(245,245,240,0.92);
}

.philosophy-principles p + p{ 
  margin-top: 2.5rem;
}

.return-statement{
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  margin-top: calc(var(--content-breath) * 1.5);
  font-weight: 600;
  color: rgba(255,255,255,0.98);
  line-height: 2;
}

.return-core{
  display: block;
  margin-top: 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--muted-gold);
  letter-spacing: 0.15em;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
}

/* === Company Section === */
.company-section{
  background: var(--pure-black);
  color: var(--white);
  text-align: left;
}

.company-section .section-title-left{
  color: var(--muted-gold);
}

.company-section .section-title-left::after{
  background: var(--muted-gold);
}


.company-info{
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.company-item{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}


.company-item:last-child{
  border-bottom: none;
}

.company-label{
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 600;
  color: var(--muted-gold);
  letter-spacing: 0.1em;
}

.company-value{
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 2;
  color: var(--text-on-black);
}


.business-purpose-list{
  list-style: none;
  counter-reset: purpose-counter;
}

.business-purpose-list li{
  counter-increment: purpose-counter;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

.business-purpose-list li::before{
  content: counter(purpose-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: var(--muted-gold);
}

/* === Contact Section === */
.contact-section{
  background: var(--white);
  text-align: left;
}

.contact-section::before{
  content:"";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,61,50,0.03) 0%, transparent 55%);
  pointer-events: none;
}

.contact-intro{
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-top: 1.2rem;
  margin-bottom: calc(var(--content-breath) * 0.8);
  color: var(--text-on-white);
  line-height: 2;
}

.contact-section .section-title-left{
  color: var(--forest-green);
}

.contact-section .section-title-left::after{
  background: var(--muted-gold);
}

.contact-form{ max-width: 720px; }

.form-group{ margin-bottom: 2.2rem; }


.required{
  color: var(--muted-gold);
  margin-left: 0.3rem;
}

.form-label{
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  color: var(--forest-green);
  font-weight: 500;
}

.form-input,
.form-textarea{
  width: 100%;
  padding: 1rem;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(26,61,50,0.18);
  color: var(--pure-black);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background-color 0.35s var(--ease);
  border-radius: 10px;
}

.form-input:focus,
.form-textarea:focus{
  outline: none;
  border-color: var(--muted-gold);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 4px rgba(201,168,106,0.12);
}


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

.form-actions{
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.submit-btn{
  background: var(--forest-green);
  color: var(--white);
  border: none;
  padding: 1.1rem 2.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease), background-color 0.45s var(--ease);
  border-radius: 999px;
}

.submit-btn:hover{
  background: #0f2a22;
  box-shadow: 0 14px 40px rgba(26, 61, 50, 0.45);
  transform: translateY(-1px);
}

.form-status{
  min-height: 1.3em;
  font-size: 0.95rem;
  color: var(--forest-green);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--fade-dur) var(--ease), transform var(--fade-dur) var(--ease);
  font-weight: 500; /* 追加: 視認性向上 */
  margin-top: 1rem; /* 追加: ボタンとの間隔 */
}


.form-status.visible{
  opacity: 1;
  transform: translateY(0);
}

/* === Footer === */
.footer{
  background: var(--pure-black);
  padding: calc(var(--content-breath) * 0.8) 5%;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.footer p{
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

/* === Fade Elements === */
.fade-element{
  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity var(--fade-dur) var(--ease), transform var(--fade-dur) var(--ease);
}

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

/* === Stagger Animation === */
.stagger-item{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.section.visible .stagger-item{
  opacity: 1;
  transform: translateY(0);
}

.philosophy-section.visible .philosophy-quote:not(.philosophy-quote--small){
  transition-delay: 1.2s;
}

.philosophy-section.visible .divider{
  transition-delay: 1.7s;
}

.philosophy-section.visible .philosophy-principles p:nth-child(1){
  transition-delay: 2.2s;
}

.philosophy-section.visible .philosophy-principles p:nth-child(2){
  transition-delay: 2.7s;
}

.philosophy-section.visible .philosophy-principles p:nth-child(3){
  transition-delay: 3.2s;
}

.philosophy-section.visible .philosophy-quote--small{
  transition-delay: 3.7s;
}

.philosophy-section.visible .return-statement{
  transition-delay: 4.2s;
}

/* === Back to Top === */
.back-to-top{
  position: fixed;
  right: 5%;
  bottom: 2.5rem;
  z-index: 40;

  width: 52px;
  height: 52px;
  border-radius: 50%;

  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201,168,106,0.25);

  color: var(--muted-gold);
  font-size: 1.5rem;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;

  transition: opacity var(--fade-dur) var(--ease), 
              transform var(--fade-dur) var(--ease),
              box-shadow 0.45s var(--ease),
              border-color 0.45s var(--ease),
              background-color 0.45s var(--ease);
}

.back-to-top.visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus{
  background: rgba(0,0,0,0.65);
  border-color: rgba(201,168,106,0.45);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  outline: none;
}

.back-to-top-icon{
  display: block;
  line-height: 1;
  transition: transform 0.45s var(--ease);
}

.back-to-top:hover .back-to-top-icon,
.back-to-top:focus .back-to-top-icon{
  transform: translateY(-3px);
}

/* 有機線 */
#organic-line {
    position: fixed;
    top: 0px;
    left: 0px;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    opacity: 0.6;
    filter: blur(1px);
}

/* === Mobile line breaks === */
.sp-only{ display: none; }

/* === Responsive === */
@media (max-width: 768px){
  :root{ 
    --header-h: 64px; 
    --section-v: 8rem;
    --section-v-full: 10rem;
    --content-breath: 3rem;
  }

  body{ padding-top: var(--header-h); }

  .logo{ margin-bottom: 3.2rem; }
  .site-nav{ gap: 0.9rem; }
  .sp-only{ display: inline; }

  .business-grid{
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .company-item{
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .back-to-top{
    right: 8%;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation: none !important; transition: none !important; }
}

/* === Mobile Nav (Hamburger) === */
.nav-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: box-shadow 0.45s ease-out, border-color 0.45s ease-out;
}

.nav-toggle:hover{
  border-color: rgba(201,168,106,0.35);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

.nav-toggle-lines{
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: rgba(245,245,240,0.92);
  border-radius: 2px;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after{
  content:"";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(245,245,240,0.92);
  border-radius: 2px;
  transition: transform 0.6s ease-out, top 0.6s ease-out, opacity 0.6s ease-out;
}

.nav-toggle-lines::before{ top: -6px; }
.nav-toggle-lines::after{ top: 6px; }

.nav-open .nav-toggle-lines{ background: transparent; }

.nav-open .nav-toggle-lines::before{
  top: 0;
  transform: rotate(45deg);
}

.nav-open .nav-toggle-lines::after{
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 768px){
  .nav-toggle{ display: inline-flex; align-items:center; justify-content:center; }

  .site-nav{
    position: absolute;
    top: calc(var(--header-h) - 10px);
    left: 0;
    right: 0;
    display: block;
    max-width: none;
    margin: 0;
    padding: 10px 5% 16px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .site-nav a{
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .site-nav a::after{ display:none; }
  .site-nav a:last-child{ border-bottom: none; }

  .nav-open .site-nav{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce){
  .site-nav,
  .nav-toggle-lines::before,
  .nav-toggle-lines::after{
    transition: none !important;
  }
}
