/*
Theme Name: ST Theme
Theme URI: https://st-niigata.jp
Author: 株式会社ST
Author URI: https://st-niigata.jp
Description: 株式会社ST 公式サイトテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: st-theme
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black:   #0a0a0a;
  --dark:    #111111;
  --gray-dk: #1e1e1e;
  --gray-md: #2e2e2e;
  --gray-lt: #555555;
  --white:   #f5f5f0;
  --off-wh:  #e8e8e0;
  --red:     #d42b2b;
  --orange:  #e8601c;
  --amber:   #f0921a;
  --khaki:   #b8a882;
  --khaki-lt:#e8dfc8;
  --accent:  linear-gradient(135deg, #d42b2b 0%, #e8601c 50%, #f0921a 100%);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--orange); color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 2px; }

/* ===== UTILITY ===== */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange);
  border-left: 3px solid var(--orange);
  padding-left: 10px;
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800; line-height: 1.15; letter-spacing: -.02em;
  color: var(--white);
}
.section-title span {
  background: var(--accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .08em;
  padding: 15px 34px; border: none; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: opacity .25s, transform .25s;
}
.btn-primary:hover { opacity: .85; transform: translateY(-2px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: var(--white);
  font-size: 14px; font-weight: 700; letter-spacing: .08em;
  padding: 14px 33px; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  transition: border-color .25s, color .25s, transform .25s;
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.divider { width: 60px; height: 3px; background: var(--accent); margin: 24px 0 36px; }

/* ===== HEADER ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .35s, backdrop-filter .35s;
}
#header.scrolled {
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo {
  font-size: 22px; font-weight: 900; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 4px;
}
.logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  margin-right: 8px; flex-shrink: 0;
}
.logo-text { color: var(--white); }
.logo-dot { color: var(--orange); }
nav { display: flex; align-items: center; gap: 36px; }
nav a {
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  color: rgba(245,245,240,.65); position: relative; transition: color .2s;
}
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
nav a:hover { color: var(--white); }
nav a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  background: var(--accent); color: #fff !important;
  padding: 9px 22px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.nav-cta::after { display: none; }

/* ===== RESPONSIVE NAV ===== */

/* ハンバーガーボタン（デフォルトは非表示） */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* 📱 スマホ対応（768px以下） */
@media (max-width: 768px) {
    /* 1. ボタンを表示させる */
    .menu-toggle {
        display: flex !important; /* 強制的に表示 */
        position: relative;
        z-index: 1100;
    }

    /* 2. メニュー本体の初期状態（隠す） */
    #nav-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        position: fixed;
        top: 0;
        right: -100%; /* 画面の右外に隠す */
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 1050;
    }

    /* 3. JSで 'is-active' が付いた時の状態（現れる） */
    #nav-menu.is-active {
        right: 0 !important; /* 画面内に戻す */
    }

    /* 4. メニュー内のリンクをスマホ用に調整 */
    #nav-menu a {
        font-size: 20px;
        color: #fff;
        opacity: 0;
        transform: translateY(20px);
        transition: 0.3s;
    }

    #nav-menu.is-active a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s; /* 少し遅れてふわっと出す */
    }

    /* 5. お問い合わせボタンの調整 */
    .nav-cta {
        background: var(--accent);
        padding: 15px 40px !important;
        clip-path: none !important; /* スマホではシンプルにしてもOK */
    }
}

/* ボタンの基本スタイルとアニメーションの準備 */
.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--white);
    display: block;
    transition: all 0.3s ease; /* これがないと一瞬で切り替わって動かない */
}

/* スマホ時（is-activeがついた時）の動き */
@media (max-width: 768px) {
    /* 1本目：中央へ移動して45度回転 */
    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    /* 2本目：透明にして消す */
    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px); /* 横にスライドして消えるとおしゃれ */
    }

    /* 3本目：中央へ移動して逆向きに45度回転 */
    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}




/* ===== HERO ===== */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; background: var(--black);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 40%, rgba(232,96,28,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(212,43,43,.07) 0%, transparent 50%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 80px 80px;
}
.hero-deco {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 900; letter-spacing: -.06em;
  color: rgba(255,255,255,.025);
  line-height: 1; pointer-events: none; user-select: none;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 28px;
}
.hero-eyebrow::before { content: ''; display: block; width: 40px; height: 2px; background: var(--orange); }
.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 28px;
}
.hero-title .line-accent {
  background: var(--accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: clamp(13px, 1.4vw, 16px);
  color: rgba(245,245,240,.55);
  max-width: 540px; margin-bottom: 44px; line-height: 1.9;
}
.hero-ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-badges {
  position: absolute; bottom: 56px; right: 0;
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end;
}
.hero-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 16px; color: rgba(245,245,240,.5);
  background: rgba(255,255,255,.03);
}
.hero-badge.active { border-color: var(--orange); color: var(--orange); background: rgba(232,96,28,.07); }
.scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .15em; color: rgba(255,255,255,.3); text-transform: uppercase;
}
.scroll-hint::after { content: ''; width: 1px; height: 48px; background: linear-gradient(to bottom, var(--orange), transparent); }

/* ===== TICKER ===== */
.ticker-wrap {
  background: var(--gray-dk);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: hidden; padding: 14px 0;
}
.ticker { display: flex; animation: ticker 28s linear infinite; white-space: nowrap; width: max-content; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 24px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(245,245,240,.3); padding: 0 40px;
}
.ticker-dot { width: 5px; height: 5px; background: var(--orange); border-radius: 50%; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== ABOUT ===== */
#about { padding: 120px 0; background: var(--dark); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-card-main {
  background: var(--gray-dk); border: 1px solid rgba(255,255,255,.08);
  padding: 48px; position: relative; overflow: hidden;
}
.about-card-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
}
.about-card-accent {
  position: absolute; bottom: -24px; right: -24px;
  width: 160px; height: 160px;
  background: var(--gray-md); border: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px;
}
.about-card-accent .big-num {
  font-size: 44px; font-weight: 900; letter-spacing: -.04em;
  background: var(--accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.about-card-accent .small-txt { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: rgba(245,245,240,.4); }
.mission-text {
  font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; line-height: 1.65; letter-spacing: -.01em; color: var(--white);
}
.mission-text strong { background: var(--accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.about-body { font-size: 15px; color: rgba(245,245,240,.55); line-height: 1.9; margin-top: 24px; }
.info-table { margin-top: 36px; border-top: 1px solid rgba(255,255,255,.08); }
.info-row { display: flex; border-bottom: 1px solid rgba(255,255,255,.06); padding: 14px 0; font-size: 13px; }
.info-label { width: 120px; flex-shrink: 0; color: var(--khaki); font-weight: 600; letter-spacing: .04em; }
.info-value { color: rgba(245,245,240,.75); }

/* ===== SERVICES ===== */
#services { padding: 120px 0; background: var(--black); }
.services-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px; }
.services-lead { font-size: 15px; color: rgba(245,245,240,.5); max-width: 360px; line-height: 1.8; }
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.06);
}
.service-card {
  background: var(--black); padding: 44px 40px;
  position: relative; overflow: hidden; transition: background .3s; cursor: default;
}
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .35s;
}
.service-card:hover { background: var(--gray-dk); }
.service-card:hover::after { transform: scaleX(1); }
.service-card.realestate { border-left: 2px solid rgba(184,168,130,.2); }
.service-icon {
  width: 56px; height: 56px; border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  margin-bottom: 24px; position: relative;
}
.service-icon::before {
  content: attr(data-num); position: absolute; top: -10px; right: -10px;
  font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--orange);
}
.service-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.service-desc { font-size: 13px; color: rgba(245,245,240,.5); line-height: 1.85; }
.service-tag {
  display: inline-block; margin-top: 24px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange); border: 1px solid rgba(232,96,28,.3); padding: 4px 10px;
}
.service-tag.khaki { color: var(--khaki); border-color: rgba(184,168,130,.3); }
.service-feat {
  grid-column: span 2; background: var(--gray-dk); padding: 44px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.service-feat-text h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.service-feat-text p { font-size: 14px; color: rgba(245,245,240,.5); line-height: 1.8; max-width: 560px; }
.service-divider-label {
  grid-column: span 2;
  background: var(--gray-dk);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px 40px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--khaki);
  display: flex; align-items: center; gap: 12px;
}
.service-divider-label::after { content: ''; flex: 1; height: 1px; background: rgba(184,168,130,.15); }

/* ===== WORKS ===== */
#works { padding: 120px 0; background: var(--dark); }
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.work-card { position: relative; overflow: hidden; background: var(--gray-dk); border: 1px solid rgba(255,255,255,.07); }
.work-thumb {
  width: 100%; aspect-ratio: 16/9; background: var(--gray-md);
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.work-thumb-bg { position: absolute; inset: 0; opacity: .5; }
.work-thumb-label { position: relative; z-index: 1; font-size: 48px; font-weight: 900; letter-spacing: -.05em; color: rgba(255,255,255,.07); }
.work-thumb-icon { position: absolute; bottom: 20px; left: 20px; font-size: 32px; z-index: 2; }
.work-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,.95) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; z-index: 3;
}
.work-cat { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; }
.work-title { font-size: 18px; font-weight: 800; line-height: 1.3; }
.work-body { padding: 20px 28px 28px; }
.work-desc { font-size: 13px; color: rgba(245,245,240,.45); line-height: 1.8; margin-bottom: 16px; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.work-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; background: rgba(255,255,255,.06); color: var(--khaki); padding: 4px 10px; }
.work-card.large { grid-column: span 2; }
.work-card.large .work-thumb { aspect-ratio: 21/8; }

/* ===== CTA BAND ===== */
#cta-band { padding: 100px 0; background: var(--gray-dk); position: relative; overflow: hidden; }
#cta-band::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.cta-bg-text {
  position: absolute; font-size: clamp(80px, 14vw, 180px); font-weight: 900; letter-spacing: -.05em;
  color: rgba(255,255,255,.02); top: 50%; left: 50%; transform: translate(-50%, -50%);
  white-space: nowrap; pointer-events: none; user-select: none;
}
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-heading { font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -.03em; line-height: 1.2; }
.cta-sub { margin-top: 12px; font-size: 15px; color: rgba(245,245,240,.45); }
.cta-actions { display: flex; gap: 14px; flex-shrink: 0; }


/* ================== */
/* ================== */
/* ===== FOOTER ===== */
/* ================== */
/* ================== */
footer {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 80px 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    gap: 40px;
}

.footer-brand {
    flex: 1;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-tagline {
    font-size: 13px;
    color: rgba(245, 245, 240, .35);
    max-width: 260px;
    line-height: 1.8;
}

.footer-nav h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--khaki);
    margin-bottom: 24px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav ul li a {
    font-size: 13px;
    color: rgba(245, 245, 240, .45);
    transition: color .2s;
    text-decoration: none;
}

.footer-nav ul li a:hover {
    color: var(--orange);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    font-size: 12px;
    color: rgba(245, 245, 240, .2);
}

/* ===== FADE-IN ANIMATION ===== */
.fade-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .8s cubic-bezier(0.2, 1, 0.2, 1), transform .8s cubic-bezier(0.2, 1, 0.2, 1);
}

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

/* =========================================
    📱 RESPONSIVE (Unified)
   ========================================= */
@media (max-width: 900px) {
    /* 共通レイアウトの解除 */
    .about-grid, 
    .contact-grid, 
    .services-grid, 
    .works-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .work-card.large, 
    .service-card.realestate, 
    .service-feat {
        grid-column: span 1 !important;
    }

    .service-feat {
        flex-direction: column;
        text-align: center;
    }

    /* フッター：スマホ対応 */
    .footer-top {
        flex-direction: column;
        gap: 50px;
    }

    .footer-brand {
        width: 100%;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-nav {
        width: 100%;
    }

    .footer-nav h4 {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .footer-nav ul li a {
        padding: 6px 0;
        display: block;
        font-size: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}