:root {
  --bg: #fbf9f4;          /* warm near-white */
  --ink: #21201c;         /* near-black text */
  --ink-soft: rgba(33, 32, 28, 0.62);
  --ink-faint: rgba(33, 32, 28, 0.40);
  --hojicha: #b7773b;
  --kuwa: #7d9061;
  --kuromame: #a5624c;
  --line: rgba(33, 32, 28, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--hojicha);
  outline-offset: 4px;
}

/* ---------- floating UI ---------- */

.seal-logo {
  position: fixed;
  top: clamp(16px, 2.4vw, 30px);
  right: clamp(16px, 2.4vw, 34px);
  z-index: 60;
  width: clamp(52px, 5vw, 68px);
  height: clamp(52px, 5vw, 68px);
  border-radius: 50%;
  background: rgba(251, 249, 244, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 14px rgba(33, 32, 28, 0.12);
  transition: transform 0.3s ease;
}
.seal-logo:hover { transform: scale(1.05); }
.seal-logo img { width: 74%; height: 74%; object-fit: contain; }

.lang {
  position: fixed;
  top: clamp(16px, 2.4vw, 30px);
  left: clamp(16px, 2.4vw, 34px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(251, 249, 244, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 14px rgba(33, 32, 28, 0.12);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.lang button {
  background: none; border: none; color: var(--ink-faint);
  padding: 2px 5px; cursor: pointer; font: inherit;
  text-transform: uppercase; transition: color 0.2s ease;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--hojicha); }
.lang .div { color: var(--ink-faint); }

/* ---------- split sections ---------- */

.section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

.media {
  position: relative;
  overflow: hidden;
  min-height: 46vh;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.slide.is-active { opacity: 1; }

/* image on the right for alternating rhythm */
.section[data-side="right"] .media { order: 2; }
.section[data-side="right"] .panel { order: 1; }

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 8vh, 96px) clamp(28px, 6vw, 88px);
}

.panel-inner { width: 100%; max-width: 42ch; margin: 0 auto; text-align: center; }
.panel-inner > .section-title:last-child { margin-bottom: 0; }

/* eyebrow */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.eyebrow .sep { color: var(--kuwa); margin: 0 8px; }

/* section title */
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.26rem, 2.4vw, 2.04rem);
  line-height: 1.06;
  letter-spacing: -0.005em;
  margin: 0 0 24px;
}
.section-title em { font-style: italic; font-weight: 500; color: var(--hojicha); }

.copy {
  font-size: clamp(0.98rem, 1vw, 1.06rem);
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0;
  max-width: 46ch;
}
.copy + .copy { margin-top: 18px; }
.copy strong { font-weight: 600; color: var(--ink); }

/* ---------- rich body copy (about, teas, etc.) ---------- */

.tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.02rem, 1.3vw, 1.22rem);
  color: var(--hojicha);
  margin: 0 0 22px;
}
.sub-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--ink);
  margin: 32px 0 12px;
}
.copy + .sub-title { margin-top: 30px; }

.copy-list { margin: 14px 0 0; padding: 0; list-style: none; max-width: 46ch; }
.copy-list li {
  font-size: clamp(0.98rem, 1vw, 1.06rem);
  line-height: 1.7;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
  margin: 0 0 10px;
}
.copy-list li:last-child { margin-bottom: 0; }
.copy-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--kuwa);
}
.copy-list strong { font-weight: 600; color: var(--ink); }

/* ---------- homepage section teasers (clickable, link out to dedicated pages) ---------- */

.section-link {
  display: contents;
  cursor: pointer;
}
.section-link .media,
.section-link .panel { cursor: pointer; }
.section-link .section-title { display: inline; margin: 0; }

.link-cue {
  display: inline-block;
  margin-left: 8px;
  color: var(--kuwa);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68em;
  transform: translateY(-0.1em);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* fade is scoped to hovering the text/panel side only — hovering the photo never fades anything, it's just clickable */
.section-link .panel:hover .section-title,
.section-link .panel:hover .tagline {
  opacity: 0.5;
}
.section-link .panel:hover .link-cue {
  transform: translate(5px, -0.1em);
  opacity: 0.8;
}
.section-link .section-title, .section-link .tagline { transition: opacity 0.35s ease; }

/* ---------- hero panel ---------- */

#hero .panel-inner { max-width: min(86%, 440px); text-align: center; }

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.26rem, 2.4vw, 2.04rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.kanji-mark {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.42em;
  margin: 0 0 6px;
  padding-left: 0.42em; /* optical centering for tracked text */
}
.kanji-gloss {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 28px;
}
.hero-line {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 1.6vw, 1.42rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 22px;
}
.hero-sub {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 26px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kuwa);
}
.status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--kuwa);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.35;} 50%{opacity:1;} }

/* ---------- hero wordmark <-> calligraphy crossfade ---------- */
.hero-cycle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 100%;
}
.hero-cycle > * { grid-area: 1 / 1; margin: 0; }
.hero-cycle-word { animation: heroWord 11.2s ease infinite; }
.hero-cycle-kanji {
  display: block;
  width: clamp(190px, 82%, 320px);
  height: auto;
  justify-self: center;
  animation: heroKanji 11.2s ease infinite;
}
/* fade windows mirror the background slideshow: ~5.6s hold, ~1.4s crossfade */
@keyframes heroWord {
  0%   { opacity: 0; }
  12.5%{ opacity: 1; }
  50%  { opacity: 1; }
  62.5%{ opacity: 0; }
  100% { opacity: 0; }
}
@keyframes heroKanji {
  0%   { opacity: 1; }
  12.5%{ opacity: 0; }
  50%  { opacity: 0; }
  62.5%{ opacity: 1; }
  100% { opacity: 1; }
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: clamp(18px, 3vh, 34px);
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.scroll-cue .arrow { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0);opacity:.55;} 50%{transform:translateY(5px);opacity:1;} }

/* ---------- teas ---------- */

.tea-list { margin: 30px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.tea-row { display: flex; align-items: flex-start; gap: 18px; }
.seal {
  flex-shrink: 0;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1.5px solid var(--seal-color);
  transition: transform 0.3s ease;
}
.tea-row:hover .seal { transform: scale(1.06); }
.seal span {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500; font-size: 1.4rem; color: var(--seal-color);
}
.tea-name {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500;
  font-size: 1.1rem; margin: 4px 0 4px;
}
.tea-note { font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.hojicha-row  { --seal-color: var(--hojicha); }
.kuwa-row     { --seal-color: var(--kuwa); }
.kuromame-row { --seal-color: var(--kuromame); }

/* ---------- contact ---------- */

.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 30px; margin-top: 26px; }
.contact-links a {
  font-family: 'Fraunces', serif; font-style: italic; font-size: 1.2rem;
  text-decoration: underline; text-decoration-color: var(--hojicha);
  text-underline-offset: 5px; transition: color 0.2s ease;
}
.contact-links a:hover { color: var(--hojicha); }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 7vh, 72px) clamp(28px, 6vw, 88px);
  text-align: center;
}
.foot-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px;
  margin: 0 0 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.foot-nav a { text-decoration: none; color: var(--ink-soft); transition: color 0.2s ease; }
.foot-nav a:hover { color: var(--ink); }
.foot-nav .soon { color: var(--ink-faint); }
.foot-nav .soon small { text-transform: none; letter-spacing: 0.03em; }
.legal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.02em;
  color: var(--ink-faint); line-height: 1.9; margin: 0;
}

/* ---------- language blocks (rich content, not innerHTML-swapped) ---------- */
body[data-lang="fr"] .lang-en { display: none; }
body[data-lang="en"] .lang-fr { display: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.07s; }
.reveal.d2 { transition-delay: 0.14s; }
.reveal.d3 { transition-delay: 0.21s; }
.reveal.d4 { transition-delay: 0.28s; }
.reveal.d5 { transition-delay: 0.35s; }

/* ---------- dedicated sub-pages (about, teas, materials, contact) ---------- */

/* one frosted-glass photo behind the entire page — title, copy and footer all sit
   on it. Heavy blur, colour left nearly alone, so the photo stays guessable. */
.page-bg {
  position: fixed;
  inset: -40px;
  z-index: -2;
}
/* two copies of the photo at different blur radii. Cross-fading them makes the
   blur itself breathe, which the compositor handles as a plain opacity fade
   rather than re-rasterising a full-screen gaussian every frame.
   Colour is kept; contrast is pulled in so a photo's darkest patches can't drop
   below what the ink text needs — that, not the wash, does the readability work. */
.page-bg::before,
.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--page-photo);
  background-size: cover;
  background-position: center;
  transform: scale(1.12);
}
.page-bg::before { filter: blur(30px) brightness(1.2) saturate(1.12) contrast(0.76); }
.page-bg::after {
  filter: blur(8px) brightness(1.2) saturate(1.12) contrast(0.76);
  opacity: 0;
  animation: photoBreathe 9s ease-in-out infinite;
}
@keyframes photoBreathe { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

.page-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(251, 249, 244, 0.34);
  /* the rgba alpha above stays the value to tune — this only eases off it, on a
     period that doesn't divide into the blur's, so the pair never visibly loops */
  animation: washBreathe 11s ease-in-out infinite;
}
@keyframes washBreathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

.sub-hero {
  display: flex;
  justify-content: center;
  padding: clamp(108px, 15vh, 150px) clamp(24px, 6vw, 64px) clamp(18px, 3vh, 30px);
}
.sub-hero-inner { width: 100%; max-width: 60ch; }
.sub-hero-inner .section-title { color: var(--ink); margin: 0; }
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--ink); }

.sub-body {
  display: flex;
  justify-content: center;
  padding: clamp(24px, 4vh, 40px) clamp(24px, 6vw, 64px) clamp(48px, 8vh, 96px);
}
.sub-body-inner { width: 100%; max-width: 60ch; text-align: left; }

/* the photo is busier than flat paper, so the softer inks get more weight */
.photo-page .copy,
.photo-page .copy-list li,
.photo-page .tea-note { color: rgba(33, 32, 28, 0.92); }
.photo-page .foot-nav a,
.photo-page .legal { color: rgba(33, 32, 28, 0.8); }

/* these pages run the title serif throughout, at one column on a wide canvas */
.photo-page .copy,
.photo-page .copy-list li,
.photo-page .tea-note { font-family: 'Fraunces', serif; }
.photo-page .sub-hero-inner,
.photo-page .sub-body-inner { max-width: 36rem; }
.photo-page .section-title { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.photo-page .tagline {
  font-size: clamp(1.2rem, 1.9vw, 1.56rem);
  margin-bottom: 26px;
  font-style: normal;
  color: var(--ink);
}
.photo-page .sub-title { font-size: clamp(1.2rem, 1.75vw, 1.5rem); margin: 40px 0 14px; }
.photo-page .copy,
.photo-page .copy-list li { font-size: clamp(1.06rem, 1.2vw, 1.24rem); }
.photo-page .copy { line-height: 1.75; max-width: none; }
.photo-page .copy-list { max-width: none; }
.photo-page .copy-list li { line-height: 1.7; padding-left: 24px; margin-bottom: 14px; }
.photo-page .tea-name { font-size: 1.28rem; }
.photo-page .tea-note { font-size: 1.02rem; line-height: 1.6; }
.photo-page .contact-links a { font-size: 1.38rem; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .section { grid-template-columns: 1fr; }
  .media { min-height: 48vh; order: 0 !important; }
  .panel { order: 1 !important; padding: clamp(44px, 9vh, 72px) clamp(26px, 8vw, 48px); min-height: 52vh; }
  #hero .panel-inner, .panel-inner { max-width: 46ch; }
  #hero .panel-inner { max-width: 34ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue .arrow, .status .dot { animation: none; }
  .hero-cycle-word, .hero-cycle-kanji { animation: none; }
  /* settles on the deeper blur at full wash */
  .page-bg::after, .page-bg-overlay { animation: none; }
  .hero-cycle-kanji { opacity: 0; }
  .hero-cycle-word { opacity: 1; }
  .tea-row:hover .seal, .seal-logo:hover { transform: none; }
}
