/*
Theme Name: Hori Jusetsu
Theme URI: https://example.com/
Author: 堀住設
Description: 堀住設のコーポレートサイト用オリジナルテーマ。深緑×ゴールドの上質で落ち着いたデザイン。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: horijusetsu
*/

/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --pine: #14312a;
  --pine-deep: #0c211c;
  --pine-mist: #1d4237;
  --gold: #b3924e;
  --gold-soft: #d4bd8c;
  --gold-line: #c3a869;
  --paper: #f6f4ee;
  --paper-dark: #eeebe1;
  --ink: #26332e;
  --ink-soft: #55645e;
  --white: #ffffff;

  --font-display: "Shippori Mincho", "Yu Mincho", serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;

  --w-content: 1080px;
  --w-narrow: 760px;
  --ease: cubic-bezier(.22, .7, .3, 1);
}

/* ==========================================================
   Base
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 2;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  letter-spacing: .04em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .08em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap { max-width: var(--w-content); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--w-narrow); }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.site-header.is-solid {
  background: rgba(12, 33, 28, .96);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  box-shadow: 0 1px 0 rgba(195, 168, 105, .25);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
  letter-spacing: .14em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand small {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--gold-soft);
}
.global-nav ul { display: flex; gap: 34px; align-items: center; }
.global-nav a {
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  letter-spacing: .12em;
  position: relative;
  padding: 6px 0;
}
.global-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold-line);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.global-nav a:hover::after,
.global-nav .current-menu-item a::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  border: 1px solid var(--gold-line) !important;
  padding: 9px 22px !important;
  color: var(--gold-soft) !important;
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--gold-line); color: var(--pine-deep) !important; }
.nav-cta::after { display: none; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px; height: 1.5px;
  background: var(--white);
  transition: all .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed;
    inset: 0;
    background: var(--pine-deep);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .global-nav.is-open { opacity: 1; visibility: visible; }
  .global-nav ul { flex-direction: column; gap: 30px; text-align: center; }
  .global-nav a { font-size: 17px; }
}

/* ==========================================================
   Hero (front page)
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  background:
    linear-gradient(105deg, rgba(12, 33, 28, .96) 0%, rgba(20, 49, 42, .88) 45%, rgba(20, 49, 42, .45) 100%),
    url(images/faucet.jpg) center right / cover no-repeat;
  color: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
}
@media (max-width: 860px) {
  .hero {
    background:
      linear-gradient(rgba(12, 33, 28, .93), rgba(20, 49, 42, .9)),
      url(images/faucet.jpg) center / cover no-repeat;
  }
}
.hero-ripples {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
}
.hero-ripples path {
  fill: none;
  stroke: var(--gold-line);
  stroke-width: 1;
  opacity: .35;
}
.hero .wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 90px;
}
.hero-copy { max-width: 560px; }
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: .42em;
  color: var(--gold-soft);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-eyebrow::before {
  content: "";
  width: 42px; height: 1px;
  background: var(--gold-line);
}
.hero-title {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: .1em;
}
.hero-title em {
  font-style: normal;
  color: var(--gold-soft);
}
.hero-lead {
  margin-top: 26px;
  font-size: 15px;
  color: rgba(255, 255, 255, .82);
  line-height: 2.2;
}
.hero-actions { margin-top: 40px; display: flex; gap: 18px; flex-wrap: wrap; }

/* 縦書きの銘 — signature element */
.hero-tate {
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 17px);
  letter-spacing: .42em;
  color: var(--gold-soft);
  border-left: 1px solid rgba(195, 168, 105, .5);
  padding-left: 26px;
  height: auto;
  max-height: 74vh;
  align-self: center;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .hero-tate { display: none; }
  .hero-scroll { display: none !important; }
  .hero .wrap { padding-top: 120px; padding-bottom: 60px; }
}

.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .4em;
  color: rgba(255, 255, 255, .6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll::after {
  content: "";
  width: 1px; height: 44px;
  background: linear-gradient(var(--gold-line), transparent);
  animation: scrollcue 2.4s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: .16em;
  padding: 16px 38px;
  border: 1px solid var(--gold-line);
  color: var(--gold-soft);
  background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease);
  cursor: pointer;
}
.btn::after {
  content: "→";
  font-size: 13px;
  transition: transform .3s var(--ease);
}
.btn:hover { background: var(--gold-line); color: var(--pine-deep); }
.btn:hover::after { transform: translateX(4px); }

.btn--solid {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--pine-deep);
}
.btn--solid:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

.btn--ink {
  border-color: var(--pine);
  color: var(--pine);
}
.btn--ink:hover { background: var(--pine); color: var(--paper); }

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: 110px 0; }
.section--dark { background: var(--pine); color: rgba(255, 255, 255, .9); }
.section--tint { background: var(--paper-dark); }

.section-head { margin-bottom: 56px; }
.section-eyebrow {
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 3.2vw, 36px);
  color: var(--pine);
}
.section--dark .section-title { color: var(--white); }
.section-title-line {
  display: block;
  width: 64px; height: 1px;
  background: var(--gold-line);
  margin-top: 24px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease) .2s;
}
.is-inview .section-title-line { transform: scaleX(1); }

.section-lead {
  margin-top: 24px;
  max-width: 640px;
  color: var(--ink-soft);
}
.section--dark .section-lead { color: rgba(255, 255, 255, .72); }

/* ==========================================================
   Scroll reveal
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-inview { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

/* ==========================================================
   Service cards (front)
   ========================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: rgba(195, 168, 105, .35);
  border: 1px solid rgba(195, 168, 105, .35);
}
.service-card {
  background: var(--paper);
  padding: 44px 32px;
  transition: background .4s var(--ease);
}
.service-card:hover { background: var(--white); }
.service-card .kanji {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--gold);
  display: block;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 20px; color: var(--pine); margin-bottom: 14px; }
.service-card p { font-size: 14px; color: var(--ink-soft); line-height: 2; }

/* ==========================================================
   Feature rows
   ========================================================== */
.feature-list { display: grid; gap: 0; }
.feature-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 38px 0;
  border-bottom: 1px solid rgba(195, 168, 105, .4);
}
.feature-item:first-child { border-top: 1px solid rgba(195, 168, 105, .4); }
.feature-item h3 { font-size: 19px; color: var(--gold-soft); }
.feature-item p { font-size: 14.5px; color: rgba(255, 255, 255, .78); }
@media (max-width: 700px) {
  .feature-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ==========================================================
   Flow (numbered steps — real sequence)
   ========================================================== */
.flow-list { display: grid; gap: 0; counter-reset: flow; }
.flow-step {
  counter-increment: flow;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 30px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(179, 146, 78, .35);
  position: relative;
}
.flow-step::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--gold);
  line-height: 1.4;
}
.flow-step h3 { font-size: 19px; color: var(--pine); margin-bottom: 8px; }
.flow-step p { font-size: 14.5px; color: var(--ink-soft); }
@media (max-width: 600px) {
  .flow-step { grid-template-columns: 56px 1fr; gap: 18px; }
  .flow-step::before { font-size: 24px; }
}

/* ==========================================================
   FAQ accordion
   ========================================================== */
.faq-list { display: grid; gap: 14px; }
.faq-item {
  background: var(--white);
  border: 1px solid rgba(179, 146, 78, .3);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 60px 24px 28px;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--pine);
  letter-spacing: .06em;
  position: relative;
  display: flex;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "Q";
  color: var(--gold);
  font-size: 18px;
  flex-shrink: 0;
}
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 26px; top: 50%;
  width: 10px; height: 10px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-answer {
  padding: 0 28px 26px 62px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 2.1;
  overflow-wrap: anywhere;
}

/* ==========================================================
   About / company table
   ========================================================== */
.about-message p { margin-bottom: 1.6em; }
.about-message p:last-child { margin-bottom: 0; }
.about-sign {
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .18em;
  color: var(--pine);
  text-align: right;
}
.about-sign small { display: block; font-size: 12px; color: var(--gold); letter-spacing: .3em; margin-bottom: 6px; }

.company-table { width: 100%; border-collapse: collapse; }
.company-table th,
.company-table td {
  text-align: left;
  padding: 20px 10px;
  border-bottom: 1px solid rgba(195, 168, 105, .35);
  font-size: 14.5px;
  font-weight: 400;
  vertical-align: top;
}
.company-table th {
  width: 160px;
  color: var(--gold-soft);
  font-family: var(--font-display);
  letter-spacing: .16em;
  white-space: nowrap;
}
.company-table td { color: rgba(255, 255, 255, .85); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .company-table th { width: 110px; }
}

/* ==========================================================
   CTA band
   ========================================================== */
.cta-band {
  background: var(--pine-deep);
  color: var(--white);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(195, 168, 105, .35);
  pointer-events: none;
}
.cta-band h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 18px;
}
.cta-band p { color: rgba(255, 255, 255, .75); font-size: 14.5px; margin-bottom: 36px; }
.cta-band .tel {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: .1em;
  color: var(--gold-soft);
  display: inline-block;
  margin-bottom: 8px;
}
.cta-band .tel-note { font-size: 12px; letter-spacing: .2em; color: rgba(255,255,255,.6); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================
   Page hero (sub pages)
   ========================================================== */
.page-hero {
  background: linear-gradient(150deg, var(--pine-deep), var(--pine));
  color: var(--white);
  padding: 190px 0 90px;
  position: relative;
  overflow: hidden;
}
.page-hero .section-eyebrow { color: var(--gold-soft); }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); }
.page-hero::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -80px;
  width: 340px; height: 340px;
  border: 1px solid rgba(195, 168, 105, .25);
  border-radius: 50%;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background: var(--pine-deep);
  color: rgba(255, 255, 255, .7);
  padding: 70px 0 36px;
  font-size: 13px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(195, 168, 105, .25);
  margin-bottom: 30px;
}
.footer-brand .brand { font-size: 20px; margin-bottom: 16px; }
.footer-brand p { line-height: 2; }
.footer-nav ul { display: grid; gap: 12px; }
.footer-nav a { transition: color .3s; letter-spacing: .1em; }
.footer-nav a:hover { color: var(--gold-soft); }
.copyright { text-align: center; font-size: 11px; letter-spacing: .2em; color: rgba(255,255,255,.4); }

/* ==========================================================
   Generic content (fallback pages / editor content)
   ========================================================== */
.entry-content h2 { font-size: 24px; color: var(--pine); margin: 2em 0 .8em; }
.entry-content h3 { font-size: 19px; color: var(--pine); margin: 1.8em 0 .7em; }
.entry-content p { margin-bottom: 1.4em; overflow-wrap: anywhere; }
.entry-content ul { list-style: none; margin-bottom: 1.4em; }
.entry-content ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: .5em;
}
.entry-content ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .95em;
  width: 8px; height: 1px;
  background: var(--gold);
}

/* ==========================================================
   Photos
   ========================================================== */
.service-card--photo { padding: 0 0 36px; overflow: hidden; }
.service-card--photo .photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 30px;
}
.service-card--photo .photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.88);
  transition: transform 1.2s var(--ease);
}
.service-card--photo:hover .photo img { transform: scale(1.05); }
.service-card--photo .kanji,
.service-card--photo h3,
.service-card--photo p { padding: 0 28px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.split .photo {
  position: relative;
  overflow: hidden;
}
.split .photo::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(195, 168, 105, .55);
  pointer-events: none;
}
.split .photo img { width: 100%; filter: saturate(.9); }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
}

.photo-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
.photo-duo figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.photo-duo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85);
  transition: transform 1.2s var(--ease);
}
.photo-duo figure:hover img { transform: scale(1.04); }
.photo-duo figcaption {
  position: absolute;
  left: 0; bottom: 0;
  padding: 10px 18px;
  background: rgba(12, 33, 28, .8);
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: .3em;
}
@media (max-width: 640px) {
  .photo-duo { grid-template-columns: 1fr; }
}

/* ==========================================================
   Page transition
   ========================================================== */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--pine-deep);
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.page-veil::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 120px; height: 1px;
  background: var(--gold-line);
  transform: translate(-50%, -50%) scaleX(0);
  transition: transform .45s var(--ease) .1s;
}
body.is-leaving .page-veil {
  opacity: 1;
  pointer-events: all;
}
body.is-leaving .page-veil::after { transform: translate(-50%, -50%) scaleX(1); }
body.is-entering .page-veil { opacity: 1; transition: none; }
body.is-entering .page-veil::after {
  transform: translate(-50%, -50%) scaleX(1);
  transition: none;
}

/* ==========================================================
   Mobile refinements (narrow phones)
   ========================================================== */
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .page-hero { padding: 150px 0 60px; }
  .cta-band { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .faq-item summary { padding: 20px 44px 18px 20px; gap: 12px; font-size: 15.5px; }
  .faq-item summary::after { right: 20px; }
  .faq-answer { padding: 0 20px 22px 20px; }
  .company-table th,
  .company-table td { padding: 16px 8px; font-size: 13.5px; }
  .cta-band::before { inset: 8px; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 26px; }
}

/* ==========================================================
   Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .section-title-line { transform: scaleX(1); transition: none; }
  .hero-scroll::after { animation: none; }
  .hero-ripples { display: none; }
  .page-veil { display: none; }
  .service-card--photo .photo img,
  .photo-duo img { transition: none; }
}
