/* Shared styles for the four production homepages. */
:root { --paper: #f8f3e8; --ink: #302d24; --orange: #b94727; --green: #344f3d; --line: #302d2429; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', Arial, sans-serif; font-size: 16px; line-height: 1.7; word-break: normal; overflow-wrap: normal; hyphens: none; }
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 6px; }
.arrow { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.site-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 25px; font-weight: 700; letter-spacing: -1px; white-space: nowrap; }
.brand img { object-fit: contain; }
.brand-dot { color: var(--orange); }
nav { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 500; }
nav a { text-decoration: none; padding-block: 12px; }
nav a:hover, .text-link:hover { color: var(--orange); }
.language { border-left: 1px solid var(--line); padding-left: 28px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; padding-block: 68px 80px; }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700; margin: 0 0 22px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; letter-spacing: -2px; }
h1 { font-size: clamp(52px, 5.7vw, 80px); line-height: 1.04; margin-bottom: 26px; }
h1 em, h2 em { color: var(--orange); font-weight: 400; }
.intro { font-size: 20px; max-width: 370px; line-height: 1.5; margin-bottom: 16px; }
.hero-description { font-size: 15px; color: #625e53; max-width: 380px; margin-bottom: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; background: var(--orange); color: #fffaf0; min-height: 50px; padding: 14px 24px; border-radius: 4px; text-decoration: none; font-size: 14px; font-weight: 600; transition: background .2s; }
.button:hover { background: #96391f; }
.button-note { font-size: 11px; color: #625e53; margin: 12px 0 0; }
.community-strip { background: var(--green); color: var(--paper); }
.strip-inner { display: flex; gap: 32px; align-items: center; justify-content: space-between; min-height: 86px; padding-block: 20px; font-size: 15px; font-weight: 500; line-height: 1.7; }
.strip-inner p { margin: 0; text-wrap: balance; }
.strip-inner strong { font-family: 'DM Serif Display', Georgia, serif; font-size: 26px; font-weight: 400; margin-right: 8px; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-block: 94px 56px; }
h2 { font-size: clamp(38px, 4vw, 54px); line-height: 1.1; margin-bottom: 0; }
.about-copy { padding-top: 28px; color: #625e53; font-size: 16px; line-height: 1.8; }
.about-copy p:first-child { color: var(--ink); font: inherit; margin-bottom: 18px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding-bottom: 88px; }
.pillars article { border-top: 1px solid var(--line); padding-top: 22px; }
.pillar-number { color: var(--orange); font-size: 10px; letter-spacing: 1.5px; font-weight: 700; }
h3 { font-family: 'DM Serif Display', Georgia, serif; font-size: 24px; line-height: 1.2; font-weight: 400; letter-spacing: -.4px; margin-block: 18px 12px; }
.pillars p { color: #625e53; font-size: 14px; max-width: 290px; margin-bottom: 0; }
.connect { background: #efe5d3; padding: 52px 32px 56px; text-align: center; border-radius: 8px; }
.connect .eyebrow { margin-bottom: 16px; }
.connect h2 { margin-bottom: 20px; }
.connect > p:not(.eyebrow) { color: #625e53; font-size: 14px; }
.contact-links { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 26px; }
.text-link { font-size: 14px; padding-block: 14px; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; padding-block: 40px; font-size: 12px; color: #625e53; }
.footer-brand { font-weight: 700; font-size: 20px; letter-spacing: -.6px; color: var(--ink); text-decoration: none; }
.site-footer p { margin: 0; text-align: center; }
.site-footer small { font-size: 11px; text-align: right; }
@media (min-width: 1400px) { .hero { padding-block: 86px 96px; } }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 28px; }
  h1 { font-size: 54px; }
  .intro { font-size: 18px; }
  .about { gap: 40px; }
  .strip-inner { font-size: 14px; gap: 24px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 88px; gap: 12px; }
  .brand { font-size: 21px; gap: 8px; }
  .brand img { width: 42px; height: 42px; }
  nav { gap: 16px; font-size: 12px; }
  .site-header nav > a:first-child { display: none; }
  .language { padding-left: 12px; }
  .hero { grid-template-columns: 1fr; padding-block: 40px; gap: 32px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.3px; margin-bottom: 20px; }
  h1 { font-size: clamp(46px, 11.5vw, 68px); }
  .intro { max-width: 330px; }
  .hero-description { max-width: 100%; }
  .strip-inner { flex-direction: column; gap: 10px; padding-block: 20px; text-align: center; font-size: 13px; }
  .strip-inner strong { font-size: 24px; }
  .about { grid-template-columns: 1fr; gap: 24px; padding-block: 56px 32px; }
  h2 { font-size: 42px; }
  .about-copy { padding: 0; }
  .about-copy p:last-child { margin-bottom: 0; }
  .pillars { grid-template-columns: 1fr; gap: 28px; padding-bottom: 52px; }
  .pillars p { max-width: 100%; }
  h3 { margin-top: 12px; }
  .connect { padding: 36px 20px; }
  .connect h2 { font-size: 35px; letter-spacing: -1.2px; }
  .contact-links { flex-direction: column; gap: 8px; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; gap: 8px; padding-block: 28px; }
  .site-footer small { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } }

/* Japanese typography uses the same layout with room for natural line breaks. */
html:lang(ja) body { font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif; font-size: 15px; font-weight: 400; line-height: 1.95; line-break: strict; word-break: normal; overflow-wrap: normal; }
html:lang(ja) .brand, html:lang(ja) .footer-brand { font-family: 'DM Sans', Arial, sans-serif; }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3 { font-family: inherit; font-weight: 600; font-style: normal; letter-spacing: 0; }
html:lang(ja) h1 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.5; }
html:lang(ja) h1 em, html:lang(ja) h2 em { font-style: normal; font-weight: inherit; }
html:lang(ja) h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.55; }
html:lang(ja) h3 { font-size: 20px; line-height: 1.65; }
html:lang(ja) .intro { font-size: 17px; line-height: 1.9; max-width: 100%; }
html:lang(ja) .about-copy { font-size: 15px; line-height: 1.95; }
@media (max-width: 900px) and (min-width: 681px) {
  html:lang(ja) nav { gap: 20px; font-size: 12px; }
  html:lang(ja) .language { padding-left: 18px; }
  html:lang(ja) .strip-inner { flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding-block: 16px; }
}
@media (max-width: 680px) {
  html:lang(ja) nav { gap: 12px; }
  html:lang(ja) .hero h1 { font-size: clamp(32px, 8vw, 44px); }
  html:lang(ja) .connect h2 { font-size: clamp(22px, 5.8vw, 32px); }
}
@media (max-width: 370px) {
  html:lang(ja) .site-header { gap: 6px; }
  html:lang(ja) .brand { font-size: 18px; gap: 4px; }
  html:lang(ja) .brand img { width: 34px; height: 34px; }
  html:lang(ja) nav { gap: 8px; font-size: 10px; }
  html:lang(ja) .language { padding-left: 8px; }
}

.moments { padding-bottom: 80px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 80px; margin-bottom: 36px; }
.section-heading > p { color: #625e53; font-size: 15px; margin: 0; max-width: 420px; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-card { display: flex; flex-direction: column; padding: 32px; border-radius: 8px; }
.story-festival { background: var(--green); color: var(--paper); }
.story-student { background: #efe5d3; }
.story-dinner { background: #ead8bc; }
.story-topline { display: flex; justify-content: space-between; align-items: start; gap: 16px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.story-topline > span:last-child { opacity: .65; }
.story-card h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; margin-block: 32px 20px; }
.story-card p { font-size: 14px; margin-bottom: 28px; }
.story-card a { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; border-top: 1px solid currentColor; padding-top: 18px; font-size: 13px; font-weight: 600; text-decoration: none; }
.story-card a:hover { text-decoration: underline; }
.instagram-panel { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 28px; margin-top: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.profile-heading { display: flex; align-items: center; gap: 16px; }
.profile-heading img { flex-shrink: 0; }
.profile-heading .eyebrow { font-size: 9px; margin-bottom: 6px; }
.profile-heading h3 { font-family: 'DM Sans', Arial, sans-serif; font-size: 24px; font-weight: 600; margin: 0; }
.instagram-panel > p { font-size: 13px; color: #625e53; margin: 0; }
html:lang(ja) .story-card h3 { font-size: clamp(20px, 1.8vw, 24px); }
html:lang(ja) .profile-heading h3 { font-family: 'DM Sans', Arial, sans-serif; font-size: 24px; }
@media (max-width: 900px) {
  .section-heading { gap: 40px; }
  .story-card { padding: 24px; }
  .instagram-panel { grid-template-columns: 1fr 1fr; }
  .instagram-panel .button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 680px) {
  .moments { padding-bottom: 52px; }
  .section-heading, .story-grid, .instagram-panel { grid-template-columns: 1fr; }
  .section-heading { gap: 24px; margin-bottom: 28px; }
  .story-card h3 { margin-top: 28px; font-size: 32px; }
  .instagram-panel { gap: 20px; padding-bottom: 24px; }
  .instagram-panel .button { justify-self: stretch; }
}

@media (max-width: 1100px) and (min-width: 681px) {
  .story-grid { grid-template-columns: 1fr; }
}

.hero-illustration { margin: 0; width: 100%; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hero-drawing { width: 100%; aspect-ratio: 4 / 3; background: url("/assets/images/shared-table-transparent.webp") center / contain no-repeat; pointer-events: none; }
@media (max-width: 680px) {
  .hero-illustration { max-width: 520px; justify-self: center; }
}

.scroll-reveal {
  transition: opacity 650ms ease, transform 650ms cubic-bezier(.2, .65, .3, 1), background-color 200ms ease;
}
.scroll-reveal.is-pending {
  opacity: 0;
  transform: translateY(16px);
}
@media (prefers-reduced-motion: reduce), print {
  .scroll-reveal, .scroll-reveal.is-pending {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Keep Japanese phrases intact; wrap between meaning units instead of characters. */
.phrase { display: inline-block; white-space: nowrap; }
.heading-line { display: block; white-space: nowrap; }
h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.hero > *, .about > *, .section-heading > *, .story-card { min-width: 0; }
nav a, .profile-heading h3 { white-space: nowrap; }
html:lang(ja) .eyebrow, html:lang(ja) .pillar-number, html:lang(ja) .story-topline { letter-spacing: .06em; }
html:lang(ja) .hero-description { max-width: 100%; }
html:lang(ja) .pillars p { max-width: 100%; }
html:lang(ja) .button, html:lang(ja) .text-link, html:lang(ja) .story-card a { word-break: normal; overflow-wrap: normal; }
@media (max-width: 680px) {
  html:lang(ja) h2 { font-size: 30px; }
  html:lang(ja) .story-card h3 { font-size: 22px; }
}

.link-label { min-width: 0; }
@media (max-width: 370px) {
  .site-header { gap: 8px; }
  .brand { font-size: 18px; gap: 4px; }
  .brand img { width: 34px; height: 34px; }
  nav { gap: 10px; font-size: 11px; }
  .language { padding-left: 10px; }
}

/* Balance complete sentences; keep phrase units short enough to flow naturally. */
.hero-description, .about-copy p:first-child, .section-heading > p,
.story-card p, .pillars p, .instagram-panel > p,
.connect > p:not(.eyebrow) { text-wrap: balance; }
.sentence { display: block; text-wrap: balance; }
html:lang(ja) .about-copy p:first-child { text-wrap: balance; }

.profile-heading h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.profile-heading h3 a:hover { color: var(--orange); }

.inline-brand {
  display: inline-block;
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: .98em;
  letter-spacing: -.035em;
  white-space: nowrap;
  color: inherit;
}
.inline-brand-dot { color: #ad6554; }
.story-festival .inline-brand-dot { color: #ecc0aa; }

/* One explicit visibility state for the language menu in every browser. */
/* Balance the globe between the divider and the header's right edge. */
.language-menu { position: relative; border-left: 1px solid var(--line); padding-inline: 12px; }
.language-menu .language-trigger { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; list-style: none; transition: color 160ms ease, background-color 160ms ease; }
.language-globe { width: 22px; height: 22px; }
.language-menu .language-trigger[aria-expanded="true"] { color: var(--orange); background-color: #efe5d3; }
.language-menu .language-trigger:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
.language-menu ul { position: absolute; top: calc(100% + 8px); right: 0; z-index: 10; min-width: 160px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 8px 24px #302d2414; }
.language-menu ul[hidden] { display: none; }
.language-menu li a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 14px; border-radius: 3px; font-family: 'DM Sans', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', sans-serif; font-size: 14px; font-weight: 500; text-decoration: none; }
.language-menu li a:hover, .language-menu li a:focus-visible { color: var(--orange); background: #efe5d3; }
.language-check { display: block; width: 16px; height: 16px; flex: 0 0 16px; color: var(--green); }
.language-menu ul:has(a:hover) a:focus-visible:not(:hover) { color: inherit; background: transparent; }
html:lang(zh) body { font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 15px; line-height: 1.95; line-break: strict; }
html:lang(ko) body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; font-size: 15px; line-height: 1.9; word-break: keep-all; }
html:is(:lang(zh), :lang(ko)) :is(h1, h2, h3) { font-family: inherit; font-weight: 600; letter-spacing: 0; line-height: 1.55; }
html:is(:lang(zh), :lang(ko)) :is(.brand, .footer-brand, .profile-heading h3) { font-family: 'DM Sans', Arial, sans-serif; }
html:is(:lang(zh), :lang(ko)) h1 { font-size: clamp(32px, 3.5vw, 48px); }
html:is(:lang(zh), :lang(ko)) h2 { font-size: clamp(28px, 2.8vw, 38px); }
html:is(:lang(zh), :lang(ko)) h3 { font-size: 21px; }
html:is(:lang(zh), :lang(ko)) :is(h1 em, h2 em) { font-style: normal; font-weight: inherit; }
html:is(:lang(zh), :lang(ko)) .intro { max-width: 100%; font-size: 17px; line-height: 1.9; }
html:is(:lang(zh), :lang(ko)) :is(.hero-description, .pillars p) { max-width: 100%; }
html:is(:lang(zh), :lang(ko)) .about-copy { font-size: 15px; line-height: 1.95; }
html:is(:lang(zh), :lang(ko)) .story-card h3 { font-size: clamp(20px, 1.7vw, 23px); }
html:is(:lang(zh), :lang(ko)) .profile-heading h3 { font-size: 24px; }
html:is(:lang(zh), :lang(ko)) :is(.eyebrow, .pillar-number, .story-topline) { letter-spacing: .06em; }
@media (max-width: 900px) {
  .language-menu { padding-inline: 8px; }
}
@media (max-width: 680px) {
  .language-menu { padding-inline: 6px; }
  html:is(:lang(zh), :lang(ko)) .hero h1 { font-size: clamp(30px, 8vw, 42px); }
  html:is(:lang(zh), :lang(ko)) .connect h2 { font-size: clamp(22px, 5.6vw, 30px); }
  html:is(:lang(zh), :lang(ko)) .story-card h3 { font-size: 21px; }
}
@media (max-width: 480px) {
  .site-header nav > a { display: none; }
}

/* Latin/CJK spacing is visual only; no padding spaces in the copy. */
html:is(:lang(ja), :lang(ko), :lang(zh)) main { text-autospace: no-autospace; }
html:is(:lang(ja), :lang(ko), :lang(zh)) main :is(.latin-text, .inline-brand) {
  margin-inline: .2em;
}
.latin-text { display: inline-block; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .language-menu .language-trigger { transition: none; }
}

@keyframes page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
html { background-color: var(--paper); }
body { animation: page-enter 240ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
