/* ————— Hansei by Design ————— */

:root {
  color-scheme: dark;
  --bg: #0b0908;
  --bg-2: #131010;
  --ink: #f5efe6;
  --ink-2: #c9c0b2;
  --ink-muted: #8d8578;
  --lantern: #ff9f5a;
  --lantern-deep: #e2542e;
  --gold: #e8c168;
  --hairline: rgba(245, 239, 230, 0.09);
  --script: 'Kaushan Script', cursive;
  --jp: 'Noto Serif JP', serif;
  --ui: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(90vw 60vh at 85% -10%, rgba(226, 84, 46, 0.13), transparent 60%),
    radial-gradient(70vw 50vh at 5% 25%, rgba(232, 193, 104, 0.07), transparent 65%),
    radial-gradient(80vw 60vh at 60% 110%, rgba(226, 84, 46, 0.09), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: rgba(255, 159, 90, 0.35); }

#embers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .nav, .footer { position: relative; z-index: 2; }

/* ————— nav ————— */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background 0.35s, backdrop-filter 0.35s, padding 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 9, 8, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--hairline);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav-brand {
  font-family: var(--script);
  font-size: 24px;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand span { color: var(--lantern); font-size: 18px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--lantern);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  border: 1px solid rgba(255, 159, 90, 0.5);
  border-radius: 999px;
  padding: 9px 20px !important;
  color: var(--lantern) !important;
  transition: background 0.25s, color 0.25s !important;
}
.nav-cta:hover { background: var(--lantern); color: #1a0e05 !important; }
.nav-burger { display: none; }

/* ————— hero ————— */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero-kanji {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -54%;
  font-family: var(--jp);
  font-weight: 600;
  font-size: clamp(280px, 46vw, 640px);
  line-height: 1;
  color: rgba(245, 239, 230, 0.028);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.lantern {
  position: absolute;
  width: 46px;
  height: 64px;
  border-radius: 46% 46% 42% 42% / 38% 38% 46% 46%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 220, 160, 0.95), var(--lantern) 45%, var(--lantern-deep) 85%);
  box-shadow:
    0 0 24px rgba(255, 159, 90, 0.55),
    0 0 90px 24px rgba(226, 84, 46, 0.22);
  opacity: 0.85;
  animation: sway 6.5s ease-in-out infinite;
  pointer-events: none;
}
.lantern::before {
  content: '';
  position: absolute;
  top: -14px; left: 50%;
  translate: -50%;
  width: 2px; height: 14px;
  background: rgba(245, 239, 230, 0.25);
}
.lantern::after {
  content: '';
  position: absolute;
  inset: 8% 26%;
  border-radius: inherit;
  border-left: 1px solid rgba(90, 25, 8, 0.4);
  border-right: 1px solid rgba(90, 25, 8, 0.4);
}
.lantern.l1 { top: 16%; left: 11%; scale: 0.85; animation-delay: -1.4s; }
.lantern.l2 { top: 24%; right: 13%; scale: 1.1; animation-delay: -3.6s; }
.lantern.l3 { bottom: 20%; left: 20%; scale: 0.6; animation-delay: -5s; opacity: 0.55; }
.lantern.l4 { top: 12%; right: 16%; scale: 0.8; animation-delay: -2s; opacity: 0.6; }

@keyframes sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-9px); }
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(58px, 11vw, 148px);
  line-height: 1.05;
  margin: 18px 0 6px;
  text-shadow: 0 6px 60px rgba(226, 84, 46, 0.25);
}
.hero-title em {
  font-style: normal;
  color: var(--lantern);
  font-size: 0.55em;
  vertical-align: middle;
  padding: 0 0.1em;
}

.hero-jp {
  font-family: var(--jp);
  font-size: clamp(15px, 2.2vw, 21px);
  letter-spacing: 0.55em;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.hero-tag {
  max-width: 480px;
  font-size: clamp(16px, 2vw, 18.5px);
  color: var(--ink-2);
}
.hero-tag b { color: var(--gold); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 15px 30px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-solid {
  background: linear-gradient(135deg, var(--lantern), var(--lantern-deep));
  color: #1a0e05;
  font-weight: 600;
  box-shadow: 0 10px 34px rgba(226, 84, 46, 0.35);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(226, 84, 46, 0.5); }
.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(245, 239, 230, 0.3); transform: translateY(-2px); }
.btn-big { font-size: 17px; padding: 19px 42px; }

.scroll-hint {
  position: absolute;
  bottom: 30px; left: 50%;
  translate: -50%;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(245, 239, 230, 0.25);
  border-radius: 999px;
}
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  translate: -50%;
  width: 3px; height: 8px;
  border-radius: 3px;
  background: var(--lantern);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ————— marquee ————— */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0;
  background: rgba(19, 16, 16, 0.5);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scroll-x 28s linear infinite;
  font-size: 14.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.marquee-track i { color: var(--lantern); font-style: normal; }
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ————— sections ————— */

.section {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(90px, 12vw, 150px) clamp(20px, 5vw, 40px);
}

.section-kanji {
  position: absolute;
  top: 40px; right: -40px;
  font-family: var(--jp);
  font-weight: 600;
  font-size: clamp(180px, 26vw, 340px);
  line-height: 1;
  color: rgba(245, 239, 230, 0.025);
  pointer-events: none;
  user-select: none;
}

.section-eyebrow {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lantern);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 62px);
  margin-bottom: clamp(34px, 5vw, 56px);
}
.section-title em { font-style: normal; color: var(--gold); }

/* philosophy */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.philosophy-copy p { color: var(--ink-2); font-size: 17px; }
.philosophy-copy p + p { margin-top: 18px; }
.philosophy-copy b[lang='ja'] { font-family: var(--jp); color: var(--gold); font-weight: 600; }
.philosophy-quote {
  font-family: var(--script);
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.7;
  color: var(--ink);
  border-left: 2px solid var(--lantern);
  padding-left: 26px;
  text-shadow: 0 4px 40px rgba(226, 84, 46, 0.2);
}

/* services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.service-card {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 30px 26px;
  background: linear-gradient(180deg, rgba(245, 239, 230, 0.028), rgba(245, 239, 230, 0.008));
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 159, 90, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(226, 84, 46, 0.08);
}
.service-icon {
  font-size: 22px;
  color: var(--lantern);
  margin-bottom: 16px;
}
.service-card h3 {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 9px;
}
.service-card p { font-size: 14.5px; color: var(--ink-muted); }

/* process */
.process-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.process-steps li {
  position: relative;
  border-top: 1px solid var(--hairline);
  padding: 26px 8px 0;
}
.process-steps li::before {
  counter-increment: step;
  content: '0' counter(step);
  position: absolute;
  top: -11px; left: 8px;
  background: var(--bg);
  padding-right: 12px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--lantern);
}
.step-kanji {
  font-family: var(--jp);
  font-weight: 600;
  font-size: 44px;
  color: rgba(232, 193, 104, 0.8);
  display: block;
  margin-bottom: 12px;
}
.process-steps h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.process-steps p { font-size: 14.5px; color: var(--ink-muted); }

/* contact */
.contact { text-align: center; }
.contact-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.25;
}
.contact-title em { font-style: normal; color: var(--lantern); }
.contact-sub {
  color: var(--ink-muted);
  margin: 20px 0 36px;
  font-size: 16px;
}

/* footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding: 26px clamp(20px, 5vw, 56px);
  color: var(--ink-muted);
  font-size: 13.5px;
}
.footer-brand { font-family: var(--script); font-size: 17px; color: var(--ink-2); }
.footer [lang='ja'] { font-family: var(--jp); letter-spacing: 0.3em; }

/* ————— reveal animations ————— */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.12s; }
.d2 { transition-delay: 0.24s; }
.d3 { transition-delay: 0.36s; }
.d4 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .lantern, .marquee-track, .scroll-hint span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ————— mobile ————— */

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: rgba(11, 9, 8, 0.96);
    backdrop-filter: blur(20px);
    font-size: 22px;
    gap: 34px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 19px; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 11;
    padding: 8px;
  }
  .nav-burger span {
    width: 24px; height: 2px;
    background: var(--ink);
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-burger[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-burger[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .philosophy-grid { grid-template-columns: 1fr; }
  .section-kanji { right: -20px; }
}
