/* ===========================
   HIYORI 日和設計 — Stylesheet
   =========================== */

:root {
  --bg-dark: #0f0e0c;
  --bg-cream: #f5f1ea;
  --bg-warm: #ebe4d8;
  --accent: #c9a961;
  --accent-dark: #a68645;
  --text-dark: #1a1814;
  --text-light: #f5f1ea;
  --text-muted: #8a8580;
  --text-mid: #4a463f;
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --serif: 'Playfair Display', 'Noto Serif TC', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans TC', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text-dark);
  background: var(--bg-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.serif-italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 40px;
  transition: all 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(20px);
  padding: 16px 40px;
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  transition: color 0.4s;
}
.nav.scrolled .logo { color: var(--text-dark); }
.logo-mark {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
}
.logo-text {
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 600;
  line-height: 1.3;
}
.logo-text em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.nav-links a {
  color: var(--text-light);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav.scrolled .nav-links a { color: var(--text-dark); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-image {
  position: absolute;
  inset: 0;
  animation: heroZoom 20s ease-out forwards;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes heroZoom {
  from { transform: scale(1.15); }
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.5) 0%, rgba(15,14,12,0.2) 30%, rgba(15,14,12,0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 80px 140px;
  max-width: 1280px;
  margin: 0 auto;
  color: var(--text-light);
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 28px;
  opacity: 0;
  animation: slideUp 1s 0.3s var(--ease) forwards;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  opacity: 0;
  animation: slideUp 1.2s 0.5s var(--ease) forwards;
}
.hero-sub {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 48px;
  opacity: 0;
  animation: slideUp 1s 0.7s var(--ease) forwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 1s 0.9s var(--ease) forwards;
}
.hero-marquee {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 2;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
.marquee-track .dot { color: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.btn.full { width: 100%; justify-content: center; }
.btn-light {
  background: var(--accent);
  color: var(--bg-dark);
  border: 1px solid var(--accent);
}
.btn-light:hover {
  background: transparent;
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  background: var(--text-light);
  color: var(--bg-dark);
  border-color: var(--text-light);
}
.btn-dark {
  background: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--bg-dark);
}
.btn-dark:hover {
  background: transparent;
  color: var(--bg-dark);
}

/* ============ STATS ============ */
.stats {
  padding: 100px 0 80px;
  background: var(--bg-cream);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.stat h3 {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat sup {
  font-size: 24px;
  color: var(--accent);
  font-weight: 400;
  margin-left: 4px;
  vertical-align: super;
}
.stat p {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============ SECTION HEAD ============ */
.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
}
.section-eyebrow.light { color: var(--accent); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
.section-title.light { color: var(--text-light); }
.section-title em { font-style: italic; color: var(--accent); }
.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 600px;
}
.section-head { margin-bottom: 80px; }
.section-head.center {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ PHILOSOPHY ============ */
.philosophy {
  padding: 140px 0;
}
.philo-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 100px;
  align-items: center;
}
.philo-text { padding-right: 40px; }
.philo-body {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-top: 24px;
}
.philo-signature {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
}
.philo-signature small {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-top: 6px;
  font-weight: 500;
}
.philo-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
}
.philo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.philo-image:hover img { transform: scale(1.05); }
.philo-tag {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--bg-cream);
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--accent);
}

/* ============ PROJECTS ============ */
.projects {
  padding: 140px 0;
  background: var(--bg-warm);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.project-card {
  display: block;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.5s var(--ease);
}
.project-card.wide {
  grid-column: span 2;
}
.project-card:hover {
  transform: translateY(-8px);
}
.project-img {
  aspect-ratio: 4/5;
  overflow: hidden;
}
.project-card.wide .project-img {
  aspect-ratio: 8/5;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.project-card:hover .project-img img {
  transform: scale(1.08);
}
.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  background: linear-gradient(transparent, rgba(15,14,12,0.92));
  color: var(--text-light);
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.project-num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.project-info > div { flex: 1; }
.project-info h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 4px;
}
.project-info p {
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.project-arrow {
  color: var(--accent);
  transform: translate(-8px, 0) rotate(0deg);
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-arrow {
  transform: translate(0, -4px);
}
.projects-cta {
  text-align: center;
  margin-top: 80px;
}

/* ============ PROCESS ============ */
.process {
  padding: 140px 0;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.step {
  position: relative;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}
.step-num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 24px;
}
.step h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============ TESTIMONIAL ============ */
.testimonial {
  padding: 140px 0;
  background: var(--bg-warm);
}
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.testimonial-card {
  background: var(--bg-cream);
  border-radius: 6px;
  padding: 48px 36px;
  position: relative;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.06);
}
.quote-mark {
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 24px;
  display: block;
}
.testimonial-card blockquote {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-dark);
  margin-bottom: 28px;
}
.testimonial-project {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.9;
}
.testimonial-project strong {
  color: var(--text-dark);
  font-weight: 600;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}
.testimonial-author strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.testimonial-author small {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ============ CONTACT ============ */
.contact {
  padding: 140px 0;
  background: var(--bg-dark);
  color: var(--text-light);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}
.contact-desc {
  color: rgba(245,241,234,0.7);
  font-size: 16px;
  margin-top: 28px;
  margin-bottom: 48px;
  max-width: 440px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(245,241,234,0.85);
}
.info-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 48px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-light);
  padding: 14px 18px;
  font-size: 14px;
  font-family: inherit;
  border-radius: 4px;
  transition: all 0.3s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.form-field textarea { resize: vertical; }

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.footer-social {
  display: flex;
  gap: 16px;
}
.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: var(--text-light);
  transition: all 0.3s;
}
.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE NAV / HAMBURGER ============ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  background: transparent;
  border: 1px solid rgba(245, 241, 234, 0.3);
  border-radius: 50%;
  z-index: 1001;
  transition: all 0.4s var(--ease);
}
.nav.scrolled .nav-toggle { border-color: rgba(15, 14, 12, 0.2); }
.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--text-light);
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease);
}
.nav.scrolled .nav-toggle span { background: var(--text-dark); }
.nav-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 5px)); }
.nav-toggle span:nth-child(3) { transform: translate(-50%, calc(-50% + 5px)); }
body.menu-open .nav-toggle { border-color: rgba(245, 241, 234, 0.3) !important; }
body.menu-open .nav-toggle span { background: var(--text-light) !important; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  overflow-y: auto;
}
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-menu-inner {
  min-height: 100%;
  padding: 120px 32px 60px;
  display: flex;
  flex-direction: column;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--text-light);
  transition: padding 0.3s var(--ease), color 0.3s;
}
.mobile-nav a span {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 500;
}
.mobile-nav a:hover { padding-left: 12px; color: var(--accent); }
.mobile-cta {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 999px;
}
.mobile-foot {
  margin-top: auto;
  padding-top: 60px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  line-height: 1.8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .nav { padding: 22px 32px; }
  .nav.scrolled { padding: 14px 32px; }
  .hero-content { padding: 0 32px 140px; }
  .hero-title { font-size: clamp(56px, 8vw, 96px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 60px; }
  .philo-grid { grid-template-columns: 1fr; gap: 60px; }
  .philo-text { padding-right: 0; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.wide { grid-column: span 2; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav { padding: 18px 24px; }
  .nav.scrolled { padding: 14px 24px; }
  .container { padding: 0 24px; }
  .logo-mark { font-size: 28px; }
  .logo-text { font-size: 11px; }
  .logo-text em { font-size: 9px; }

  .hero { min-height: 100vh; }
  .hero-content { padding: 0 24px 110px; }
  .hero-eyebrow { font-size: 11px; margin-bottom: 24px; }
  .hero-title { font-size: clamp(44px, 12vw, 68px); line-height: 1.05; }
  .hero-sub { font-size: 14px; margin-top: 20px; }
  .hero-actions { gap: 12px; flex-wrap: wrap; }
  .hero-actions .btn { padding: 14px 24px; font-size: 11px; }
  .hero-marquee { font-size: 11px; padding: 12px 0; }

  .stats { padding: 70px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .stat h3 { font-size: 52px; }
  .stat p { font-size: 11px; }

  .philosophy, .projects, .process, .testimonial, .contact { padding: 80px 0; }
  .section-eyebrow { font-size: 11px; }
  .section-title { font-size: clamp(36px, 9vw, 52px); }

  .project-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-card.wide { grid-column: auto; }
  .project-card img { aspect-ratio: 4/5; }

  .process-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 36px 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { flex-direction: column; text-align: center; gap: 24px; padding: 40px 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(40px, 13vw, 56px); }
  .stat h3 { font-size: 44px; }
  .mobile-nav a { font-size: 26px; padding: 22px 0; }
  .mobile-menu-inner { padding: 110px 24px 50px; }
}
