/* ============================================================
   style.css — 株式会社永利建設 共通スタイル
   ============================================================ */

/* ---- TOKENS ---- */
:root {
  --bg:         #F5F4F0;
  --bg-alt:     #EEECE5;
  --dark:       #0B1220;
  --dark-2:     #162035;
  --dark-3:     #1E2D47;
  --accent:     #D94C1A;
  --accent-h:   #B83A13;
  --accent-2:   #E8A220;
  --steel:      #8D99AE;
  --white:      #FFFFFF;
  --text:       #1A1A2E;
  --text-muted: #6B7280;
  --border:     rgba(0,0,0,0.08);
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);

  --ff-display: 'Noto Serif JP', serif;
  --ff-cond:    'Noto Serif JP', serif;
  --ff-serif:   'Noto Serif JP', serif;
  --ff-sans:    'Noto Serif JP', serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- TOP BAR ---- */
.topbar {
  background: var(--dark);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 3rem;
  gap: 2.5rem;
}
.topbar a, .topbar span {
  font-family: var(--ff-cond);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.topbar a:hover { color: rgba(255,255,255,0.85); }
.topbar-div { width: 1px; height: 14px; background: rgba(255,255,255,0.12); }

/* ---- NAV ---- */
#mainNav {
  position: fixed;
  top: 36px; left: 0; right: 0;
  z-index: 999;
  height: 68px;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s, box-shadow 0.5s, top 0.5s;
}
#mainNav.scrolled {
  top: 0;
  background: rgba(11,18,32,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.3);
}
/* On inner pages the topbar scrolls away, so nav starts at top:0 */
body.inner-page #mainNav {
  top: 0;
  background: rgba(11,18,32,0.97);
}

.nav-logo { display: flex; align-items: center; gap: 1rem; }
.nav-logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { width: 20px; height: 20px; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-en {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: white;
  line-height: 1;
}
.nav-logo-ja {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.2em;
  margin-top: 2px;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 0.55rem 1.6rem;
  font-size: 0.78rem !important;
  letter-spacing: 0.12em !important;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--accent-h) !important; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: white;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  color: white;
  letter-spacing: 0.15em;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}
.mobile-nav a:hover { opacity: 1; color: var(--accent); }

/* ---- SECTION HELPERS ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
.pad-y  { padding-top: 8rem; padding-bottom: 8rem; }
.pad-y-sm { padding-top: 6rem; padding-bottom: 6rem; }

.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--ff-cond);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.sec-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.sec-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: 0.04em;
}
.sec-title.light { color: white; }
.sec-bar {
  width: 40px; height: 2px;
  background: var(--accent);
  margin-top: 1.5rem;
}

/* ---- INNER PAGE HERO ---- */
.page-hero {
  position: relative;
  background: var(--dark);
  padding: 8rem 3rem 5rem;
  overflow: hidden;
  margin-top: 0; /* no topbar on inner pages */
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(141,153,174,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141,153,174,0.05) 1px, transparent 1px);
  background-size: 70px 70px;
}
.page-hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,76,26,0.1) 0%, transparent 70%);
  right: -100px; top: -100px;
  pointer-events: none;
}
.page-hero-cut {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}
.page-hero-tag {
  font-family: var(--ff-cond);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.page-hero-tag::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.page-hero-h1 {
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  color: white;
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.page-hero-ja {
  font-family: var(--ff-serif);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.25em;
  margin-top: 0.75rem;
  font-weight: 400;
}
.breadcrumb {
  position: absolute;
  bottom: 1.5rem;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-cond);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.7); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--accent); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: white;
  padding: 0.9rem 2.2rem;
  font-family: var(--ff-sans);
  font-size: 0.83rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217,76,26,0.25);
}
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--dark);
  color: white;
  padding: 0.9rem 2.2rem;
  font-size: 0.83rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.btn-dark:hover { background: var(--dark-3); transform: translateY(-2px); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.85rem 2.2rem;
  font-size: 0.83rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--accent); color: white; }

/* ---- FORM ---- */
.form-group { margin-bottom: 1.35rem; }
.form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}
.form-label .req { color: var(--accent); margin-left: 4px; }
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #DDD9D0;
  background: white;
  font-family: var(--ff-sans);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,76,26,0.08);
}
textarea.form-input { resize: vertical; min-height: 150px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit {
  background: var(--dark);
  color: white;
  border: none;
  width: 100%;
  padding: 1rem;
  font-family: var(--ff-sans);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--accent); transform: translateY(-1px); }

/* ---- FOOTER ---- */
footer { background: var(--dark); padding: 5rem 0 2.5rem; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 4rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-brand-en {
  font-family: var(--ff-display);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  line-height: 1;
}
.footer-brand-ja {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.2em;
  margin: 0.4rem 0 1.5rem;
}
.footer-address {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  line-height: 2.2;
  letter-spacing: 0.04em;
}
.footer-col-title {
  font-family: var(--ff-cond);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.footer-col a {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: rgba(255,255,255,0.75); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
}
.page-num {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-cond);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.page-num:hover, .page-num.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 1.5rem; gap: 1.25rem; }
  #mainNav { padding: 0 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .wrap { padding: 0 1.5rem; }
  .pad-y { padding-top: 5rem; padding-bottom: 5rem; }
  .page-hero { padding: 6rem 1.5rem 4rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---- COMMON NAV SCRIPT helper ---- */
.nav-spacer { height: 104px; } /* topbar 36 + nav 68 */
