/*
Theme Name: Hanami Studio
Theme URI: https://hanami.isteam-tw.com
Author: Hanami Studio
Description: 花見室內設計｜室內設計與建築設計雙主線客製主題
Version: 1.0.0
Text Domain: hanami
*/

:root {
  --ink: #25231f;
  --muted: #706c65;
  --paper: #f7f5f0;
  --white: #fff;
  --wood: #a67955;
  --blush: #c99b9b;
  --line: rgba(37,35,31,.14);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.75; }
body.no-scroll { overflow: hidden; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: auto; }
.eyebrow { margin: 0 0 12px; color: var(--wood); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.section-title { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 4.2rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.22; }
.section-lead { max-width: 660px; margin: 24px 0 0; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 48px; }
.section-head .section-lead { margin: 0; }

.site-header { position: fixed; z-index: 50; inset: 0 0 auto; height: 76px; color: white; transition: .3s ease; }
.site-header.scrolled { color: var(--ink); background: rgba(247,245,240,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 31px; height: 31px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: .98rem; font-weight: 600; letter-spacing: .08em; }
.brand-text small { margin-top: 4px; font-size: .55rem; letter-spacing: .22em; opacity: .74; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: .82rem; letter-spacing: .06em; }
.nav-links a { position: relative; }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: currentColor; transition: .25s; }
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: 9px 18px; border: 1px solid currentColor; border-radius: 999px; }
.menu-toggle { display: none; border: 0; color: inherit; background: none; font-size: 1.45rem; }

.hero { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; background: #292823; color: #fff; }
.hero-choice { position: relative; min-height: 100svh; display: flex; align-items: end; overflow: hidden; isolation: isolate; }
.hero-choice::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(15,15,13,.8), rgba(15,15,13,.08) 65%); }
.hero-choice::before { content: ""; position: absolute; z-index: -2; inset: 0; background: center/cover no-repeat var(--bg); transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .5s; }
.hero-choice:hover::before { transform: scale(1.035); }
.hero-interior { --bg: url('assets/images/concept-compact-living.webp'); }
.hero-architecture { --bg: url('assets/images/architecture-infill.webp'); border-left: 1px solid rgba(255,255,255,.25); }
.hero-copy { width: 100%; padding: clamp(90px, 10vw, 150px) clamp(28px, 5vw, 86px) 70px; }
.hero-copy .num { display: block; margin-bottom: 20px; font-size: .65rem; letter-spacing: .2em; opacity: .72; }
.hero-copy h1 { margin: 0 0 15px; font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 5rem); font-weight: 500; line-height: 1.1; }
.hero-copy p { max-width: 440px; margin: 0 0 30px; opacity: .82; }
.arrow-link { display: inline-flex; gap: 16px; align-items: center; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.65); font-size: .78rem; letter-spacing: .12em; }
.arrow-link span { transition: transform .25s; }
.arrow-link:hover span { transform: translateX(6px); }
.hero-center { position: absolute; z-index: 4; top: 32px; left: 50%; translate: -50%; text-align: center; pointer-events: none; }
.hero-center .brand-mark { width: 44px; height: 44px; margin: auto; }
.hero-center b { display: block; margin-top: 8px; font-family: var(--serif); font-size: .9rem; font-weight: 500; letter-spacing: .2em; }

.manifesto { padding: 130px 0; }
.manifesto-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 12vw; }
.manifesto-quote { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 4.5rem); font-weight: 400; line-height: 1.42; letter-spacing: -.045em; }
.manifesto-quote i { color: var(--blush); font-style: normal; }
.principles { margin-top: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.principle { padding-top: 18px; border-top: 1px solid var(--line); }
.principle b { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
.principle span { display: block; margin-top: 8px; color: var(--muted); font-size: .8rem; }

.projects { padding: 110px 0; background: #ece9e2; }
.filter { display: flex; gap: 8px; }
.filter button { padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; }
.filter button.active { color: white; border-color: var(--ink); background: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 22px; }
.project-card { grid-column: span 4; cursor: pointer; }
.project-card:nth-child(1), .project-card:nth-child(6) { grid-column: span 8; }
.project-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #ddd8ce; }
.project-card:nth-child(1) .project-media, .project-card:nth-child(6) .project-media { aspect-ratio: 16/9; }
.project-media img { height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.project-card:hover img { transform: scale(1.025); }
.project-tag { position: absolute; top: 15px; left: 15px; padding: 6px 10px; border-radius: 999px; color: white; background: rgba(30,28,25,.62); backdrop-filter: blur(8px); font-size: .58rem; font-weight: 700; letter-spacing: .12em; }
.project-meta { display: flex; justify-content: space-between; gap: 20px; padding-top: 14px; }
.project-meta h3 { margin: 0; font-family: var(--serif); font-size: 1.24rem; font-weight: 500; }
.project-meta p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.project-meta span { color: var(--muted); font-size: .72rem; white-space: nowrap; }

.showreel { position: relative; height: min(78vw, 760px); min-height: 520px; overflow: hidden; color: white; background: #1f1f1c; }
.showreel-frame { position: absolute; inset: 0; opacity: 0; animation: reel 20s infinite; }
.showreel-frame:nth-child(2) { animation-delay: 5s; }
.showreel-frame:nth-child(3) { animation-delay: 10s; }
.showreel-frame:nth-child(4) { animation-delay: 15s; }
.showreel-frame img { height: 100%; object-fit: cover; animation: drift 20s infinite; }
.showreel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,18,.72), rgba(20,20,18,.12)); }
.showreel-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.showreel-copy p { max-width: 500px; opacity: .83; }
.reel-label { margin-top: 30px; display: flex; align-items: center; gap: 14px; font-size: .7rem; letter-spacing: .15em; }
.pulse { width: 9px; height: 9px; border: 1px solid white; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: pulse 2s infinite; }
@keyframes reel { 0%, 22% { opacity: 1; } 25%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes drift { from { transform: scale(1.03); } to { transform: scale(1.12) translateX(-1.5%); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.process { padding: 120px 0; }
.steps { margin-top: 60px; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 28px; align-items: start; padding: 32px 0; border-bottom: 1px solid var(--line); }
.step-num { color: var(--blush); font-size: .72rem; letter-spacing: .15em; }
.step h3 { margin: 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.contact { padding: 120px 0; background: #292823; color: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; }
.contact .section-lead { color: rgba(255,255,255,.66); }
.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .7rem; letter-spacing: .1em; opacity: .65; }
.field input, .field textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.25); outline: 0; color: white; background: transparent; }
.field input:focus, .field textarea:focus { border-color: white; }
.submit { justify-self: start; margin-top: 14px; padding: 12px 24px; border: 1px solid white; border-radius: 999px; color: white; background: transparent; cursor: pointer; }
.submit:hover { color: var(--ink); background: white; }
.form-note { font-size: .72rem; opacity: .55; }
.footer { padding: 28px 0; color: rgba(255,255,255,.62); background: #292823; border-top: 1px solid rgba(255,255,255,.12); }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; font-size: .7rem; }

.modal { position: fixed; z-index: 100; inset: 0; display: none; color: white; background: rgba(19,18,16,.96); overflow-y: auto; }
.modal.open { display: block; }
.modal-close { position: fixed; z-index: 2; top: 22px; right: 26px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: white; background: transparent; cursor: pointer; }
.modal-inner { width: min(1100px, calc(100% - 48px)); margin: 90px auto; }
.modal-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; margin-bottom: 35px; }
.modal-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 5rem); font-weight: 400; }
.modal-head p { margin: 8px 0 0; color: rgba(255,255,255,.65); }
.modal-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-gallery img { height: 100%; max-height: 720px; object-fit: cover; }
.modal-gallery img:first-child:last-child { grid-column: 1/-1; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-choice { min-height: 62svh; }
  .hero-center { top: 94px; }
  .hero-architecture { border: 0; border-top: 1px solid rgba(255,255,255,.25); }
  .nav-links { position: fixed; inset: 76px 0 auto; display: none; padding: 24px; color: var(--ink); background: var(--paper); flex-direction: column; align-items: flex-start; }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .manifesto-grid, .contact-grid { grid-template-columns: 1fr; }
  .manifesto-grid { gap: 60px; }
  .project-card, .project-card:nth-child(1), .project-card:nth-child(6) { grid-column: span 6; }
  .project-card .project-media, .project-card:nth-child(1) .project-media, .project-card:nth-child(6) .project-media { aspect-ratio: 4/3; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 30px, 1200px); }
  .section-head { display: block; }
  .section-head .section-lead { margin-top: 20px; }
  .principles { grid-template-columns: 1fr; }
  .filter { margin-top: 28px; overflow-x: auto; }
  .project-grid { gap: 34px 0; }
  .project-card, .project-card:nth-child(1), .project-card:nth-child(6) { grid-column: 1/-1; }
  .step { grid-template-columns: 50px 1fr; }
  .step p { grid-column: 2; }
  .modal-head { grid-template-columns: 1fr; gap: 12px; }
  .modal-gallery { grid-template-columns: 1fr; }
  .footer .wrap { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
