/* =========================================================
   Haku Private website styles
   Colours and type follow the agency deck:
   indigo ink, washi paper and muted gold;
   Cormorant Garamond for headings, Jost for text.
   ========================================================= */

:root {
  --ai: #141A26;           /* indigo ink: hero, partners, footer */
  --ai-raised: #1C2434;    /* a step lighter, for panels on indigo */
  --washi: #F6F2EA;        /* paper */
  --kinari: #EEE7DA;       /* deeper paper, for alternate sections */
  --kin: #C2A06A;          /* gold, on indigo */
  --bronze: #7A5C2E;       /* gold for text on paper */
  --ink: #141A26;          /* headings on paper */
  --text: #4B5260;         /* body text on paper */
  --muted: #5B6070;
  --on-dark: #CFC9BE;      /* body text on indigo */
  --on-dark-muted: #A9A69F;
  --rule: #D8CFBF;
  --field: #8C8577;        /* form field borders */

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --jp-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --jp-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(80px, 11vw, 152px);
  --max: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--washi);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; }

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
}

h1 { font-size: clamp(2.75rem, 1.8rem + 4.2vw, 5.5rem); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); letter-spacing: -0.005em; }
h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; }

p,
ul,
ol,
figure { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--kin); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--washi);
  color: var(--ink);
  text-decoration: none;
}

.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--kinari { background: var(--kinari); }
.section--ai { background: var(--ai); color: var(--on-dark); }
.section--ai h2,
.section--ai h3 { color: var(--washi); }

.label {
  margin-bottom: 14px;
  color: var(--bronze);
  font-family: var(--serif);
  font-size: 1.375rem;
  font-style: italic;
  line-height: 1.3;
}

.section--ai .label { color: var(--kin); }

.lead { color: var(--ink); font-size: 1.3rem; line-height: 1.6; }
.muted { color: var(--muted); }

/* Buttons ------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button--gold { background: var(--kin); color: var(--ai); }
.button--gold:hover { background: #D3B581; }
.button--ghost { border-color: rgba(207, 201, 190, 0.55); color: var(--washi); }
.button--ghost:hover { border-color: var(--washi); }
.button--ink { background: var(--ai); color: var(--washi); }
.button--ink:hover { background: #222B3D; }

/* Header -------------------------------------------------- */

.site-header { position: absolute; top: 0; right: 0; left: 0; z-index: 20; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
}

.wordmark,
.site-footer__mark {
  color: var(--washi);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav ul { display: flex; align-items: center; gap: 32px; padding: 0; list-style: none; }
.site-nav a { color: var(--on-dark); font-size: 0.9375rem; text-decoration: none; }
.site-nav a:hover { color: var(--washi); }

.nav-toggle {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(207, 201, 190, 0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--washi);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

/* Hero ---------------------------------------------------- */

.hero { padding-top: 96px; overflow: hidden; background: var(--ai); color: var(--on-dark); }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(40px, 7vw, 104px) clamp(88px, 11vw, 160px);
}

.hero__brandline { margin-bottom: 22px; color: var(--kin); font-family: var(--serif); font-size: 1.375rem; font-style: italic; line-height: 1.3; }
.hero h1 { color: var(--washi); }
.hero__sub { max-width: 30em; margin-top: 28px; font-size: 1.3rem; line-height: 1.6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.hero__place { margin-top: 56px; color: var(--on-dark-muted); font-size: 0.9375rem; }

/* The round window: a photo (images/hero.jpg) inside a gold ring.
   Without the photo, a raked-gravel garden drawing shows instead. */
.window { position: relative; justify-self: end; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; }
.window__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.window__ring circle {
  fill: none;
  stroke: var(--kin);
  stroke-width: 2;
  stroke-dasharray: 1860;
  stroke-dashoffset: 1860;
  animation: ring-draw 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}

.window__glass {
  position: absolute;
  inset: 6%;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #263047 0%, #141A26 72%);
}

.window__glass img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.window__art { position: absolute; inset: 0; width: 100%; height: 100%; }

@keyframes ring-draw { to { stroke-dashoffset: 0; } }

/* Intro --------------------------------------------------- */

.statement { max-width: 19em; font-size: clamp(2rem, 1.35rem + 2.7vw, 3.5rem); line-height: 1.18; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(56px, 7vw, 96px);
}

.pillar { padding-top: 28px; border-top: 1px solid var(--kin); }
.pillar p { max-width: 22em; margin-top: 12px; }

/* Experiences --------------------------------------------- */

.experience {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(56px, 7vw, 96px);
}

.experience--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.experience--flip .media { order: 2; }

.experience__where { color: var(--bronze); font-family: var(--serif); font-size: 1.375rem; font-style: italic; }
.experience h3 { margin-top: 10px; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 500; line-height: 1.15; }
.experience__desc { max-width: 30em; margin-top: 18px; }

.section__intro { max-width: 34em; margin-top: 20px; font-size: 1.2rem; line-height: 1.6; }

/* Photo frames: a photo covers the frame when its file exists.
   Without it, the gold line drawing on indigo shows instead. */
.media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ai); }
.media img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media__art { position: absolute; top: 50%; left: 50%; width: 36%; height: auto; transform: translate(-50%, -50%); }
.media--portrait { aspect-ratio: 4 / 5; }
.media--portrait .media__art { width: 52%; }

/* Partners ------------------------------------------------ */

/* The three words that describe the company */
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 80px);
}

.value { padding-top: 28px; border-top: 1px solid rgba(194, 160, 106, 0.6); }
.value__word { font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.75rem); font-weight: 500; line-height: 1.05; }
.value p { max-width: 22em; margin-top: 14px; }

.partners__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: clamp(56px, 7vw, 88px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--ai-raised);
}

.partners__cta p { max-width: 34em; color: var(--washi); font-size: 1.2rem; }

/* About and the Japanese page's message --------------------- */

.about__grid,
.message__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(40px, 5vw, 64px);
}

.about__text > * + * { margin-top: 1.1em; }
.about__text .lead { max-width: 26em; }
.about__text > p { max-width: 34em; }
.about__text .ruled-title { margin-top: 48px; font-size: 1.5rem; }

.ruled-list { padding: 0; list-style: none; }
h3 + .ruled-list { margin-top: 16px; }
.ruled-list li { padding: 16px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.ruled-list li:last-child { border-bottom: 1px solid var(--rule); }

.founder figcaption { margin-top: 22px; }
.founder__name { color: var(--ink); font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; }
.founder__role { color: var(--muted); font-size: 0.9375rem; }
.founder__bio { margin-top: 14px; font-size: 1rem; }
.founder__link { display: inline-block; margin-top: 14px; color: var(--bronze); font-size: 1rem; }

.founder-section__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
.founder-section .media--portrait { width: 100%; max-width: 440px; }
.founder-section h2 { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.5rem); }
.founder-section .founder__role { margin-top: 8px; }
.founder-section .founder__bio { max-width: 32em; margin-top: 20px; font-size: 1.125rem; }

.message__text p + p { margin-top: 1.2em; }
.message__sign { margin-top: 2em; color: var(--ink); text-align: right; }
.message__profile { margin-top: 20px; font-size: 0.9375rem; }

/* Contact ------------------------------------------------- */

.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.contact__grid h2 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); }
.contact__intro { max-width: 26em; margin-top: 22px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: 0.9375rem; font-weight: 500; }
.req { color: var(--bronze); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--field);
  border-radius: 0;
  background: var(--washi);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea { min-height: 168px; resize: vertical; }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--bronze); outline: 2px solid var(--bronze); outline-offset: 0; }

.check { display: flex; grid-column: 1 / -1; align-items: flex-start; gap: 12px; color: var(--ink); font-size: 0.9375rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ai); }

.form__actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; gap: 16px 24px; }
.form-note { color: var(--bronze); font-size: 0.9375rem; }

/* Company facts (Japanese page) ---------------------------- */

.facts { width: 100%; max-width: 52em; margin-top: 40px; border-collapse: collapse; }

.facts th,
.facts td { padding: 18px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }

.facts tr:last-child th,
.facts tr:last-child td { border-bottom: 1px solid var(--rule); }

.facts th { width: 30%; padding-right: 24px; color: var(--ink); font-weight: 500; }

/* Footer -------------------------------------------------- */

.site-footer { padding-block: clamp(56px, 7vw, 88px) 40px; background: var(--ai); color: var(--on-dark-muted); font-size: 0.9375rem; }
.site-footer a { color: var(--on-dark); }

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(194, 160, 106, 0.28);
}

.site-footer__tagline { margin-top: 8px; color: var(--kin); font-family: var(--serif); font-size: 1.75rem; font-style: italic; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; list-style: none; }
.site-footer__info { display: flex; flex-wrap: wrap; gap: 6px 40px; margin-top: 28px; }
.site-footer__copy { margin-top: 20px; }

/* Small pages: privacy, thanks, 404 ------------------------- */

.page-band { padding: 168px 0 80px; background: var(--ai); color: var(--on-dark); }
.page-band h1 { color: var(--washi); font-size: clamp(2.6rem, 1.8rem + 3vw, 4.25rem); }
.page-band p { max-width: 34em; margin-top: 20px; font-size: 1.2rem; }
.page-band p + p { margin-top: 8px; }
.button-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.prose { max-width: 44em; }
.prose h2 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); }
.prose h3 { margin-top: 2em; font-size: 1.5rem; }
.prose p,
.prose ul { margin-top: 0.8em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.3em; }
.prose + .prose { margin-top: clamp(72px, 9vw, 120px); padding-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--rule); }

/* Japanese ------------------------------------------------ */

html[lang="ja"] body,
[lang="ja"] { font-family: var(--jp-sans); letter-spacing: 0.04em; }

html[lang="ja"] body { font-size: 1rem; line-height: 1.95; }

[lang="ja"] h1,
[lang="ja"] h2,
[lang="ja"] h3,
[lang="ja"] .message__sign { font-family: var(--jp-serif); font-weight: 500; letter-spacing: 0.06em; }

[lang="ja"] h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); line-height: 1.5; }
[lang="ja"] h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.5; }
[lang="ja"] h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.6; }
[lang="ja"] .hero__sub,
[lang="ja"] .lead { font-size: 1.1rem; line-height: 2; }
[lang="ja"] .button { font-family: inherit; letter-spacing: 0.08em; }
[lang="ja"] .hero h1 { font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.9rem); line-height: 1.6; }

/* Line breaks only between phrases, never inside one.
   English: each phrase is wrapped in <span class="phrase">.
   Japanese: phrases are separated with <wbr> inside an element with class="jp-wrap". */
.phrase { display: inline-block; }
.jp-wrap { word-break: keep-all; overflow-wrap: anywhere; }

/* Responsive ---------------------------------------------- */

/* Mid widths: the three pillars become rows (title left, text right),
   so their sentences keep enough width to break only between phrases. */
@media (max-width: 1100px) {
  .pillars { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pillar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: baseline; column-gap: 48px; padding-block: 28px; }
  .pillar p { margin-top: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--ai);
    border-top: 1px solid rgba(194, 160, 106, 0.28);
  }

  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav a { display: block; padding: 14px 0; font-size: 1.125rem; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; gap: 8px 20px; }

  .hero__inner,
  .about__grid,
  .message__grid,
  .contact__grid,
  .founder-section__grid,
  .experience,
  .experience--flip { grid-template-columns: minmax(0, 1fr); }

  .window { justify-self: center; max-width: 360px; }
  .experience--flip .media { order: 0; }

  .pillars,
  .values { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .form { grid-template-columns: minmax(0, 1fr); }

  .pillar { display: block; }
  .pillar p { margin-top: 12px; }

  .hero__place { margin-top: 40px; }

  .facts th,
  .facts td { display: block; width: 100%; padding: 0; border: 0; }

  .facts th { padding-top: 16px; border-top: 1px solid var(--rule); }
  .facts td { padding: 4px 0 16px; }
  .facts tr:last-child th { border-bottom: 0; }
  .facts tr:last-child td { border-bottom: 1px solid var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .window__ring circle { animation: none; stroke-dashoffset: 0; }
  .button { transition: none; }
}
