/* Cabana Inc. — shared styles */

:root {
  --paper: #ebeae5;      /* 紙: cool off-white */
  --paper-raised: #f5f4f0;
  --sumi: #262523;       /* 墨 */
  --usuzumi: #6c6a65;    /* 淡墨 */
  --rule: #d2d0c9;       /* 罫 */
  --kin: #c98a2b;        /* 金: accent (lines, underlines) */
  --kin-deep: #9a6418;   /* 金(濃): accent where contrast is needed */
  --hero-ink: #f3efe4;
  --divider: #46443f;    /* ダークグレー: section rules */

  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --measure: 36em;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--sumi);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 0;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--sumi);
  text-decoration-color: var(--kin);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}
a:hover { color: var(--kin-deep); }
:focus-visible { outline: 2px solid var(--kin-deep); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--sumi); color: var(--paper); padding: 8px 16px; z-index: 10;
}
.skip:focus { left: 16px; top: 16px; }

/* ---------- header ---------- */

.site-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  padding: 28px var(--gutter);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.125rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--sumi); text-decoration: none;
}
.wordmark small {
  display: inline-block; margin-left: 0.8em;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 400;
  color: var(--usuzumi); letter-spacing: 0.1em;
}
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  margin: 0; padding: 0; list-style: none;
  font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.1em;
}
.site-nav a { color: var(--sumi); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--sumi); text-decoration: underline; text-decoration-color: var(--kin); }
.site-nav .lang { color: var(--usuzumi); }

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

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(84vh, 800px);
  padding: 64px var(--gutter);
  padding-right: calc(var(--gutter) + 10vw); /* sit the text in the dark field, left of centre */
  background: #1d1c1a url("/assets/img/hero.jpg") center / cover no-repeat;
  color: var(--hero-ink);
}
.hero-tagline {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 4.6vw, 4rem);
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.55);
}
.hero-tagline > span { display: block; }
.hero-tagline > span + span { margin-top: 1.4em; } /* second column sits lower, like a hanging scroll */

.hero-tagline .ch {
  display: inline;
  opacity: 0;
  animation: ink 1.1s ease-out forwards;
}
@keyframes ink {
  from { opacity: 0; filter: blur(3px); }
  to   { opacity: 1; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-tagline .ch { animation: none; opacity: 1; }
}

/* intro directly under the hero */
main > section.intro { background: none; }
.intro-lead {
  margin: 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 2.2;
  letter-spacing: 0.08em;
}

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

main > section {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
  gap: 24px var(--gutter);
  padding: 88px var(--gutter);
  /* section divider: 3pt rule, gold for the left fifth, dark grey for the rest */
  background:
    linear-gradient(to right, var(--kin) 0 20%, var(--divider) 20% 100%)
    left top / 100% 4px no-repeat;
}
.section-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.6;
}
.section-title span {
  display: block; margin-top: 0.3em;
  font-family: var(--sans); font-weight: 400; font-size: 0.75rem;
  letter-spacing: 0.12em; color: var(--usuzumi);
}
.section-body { max-width: var(--measure); }
.section-body p { margin: 0 0 1.4em; }
.section-body p:last-child { margin-bottom: 0; }

/* vision & mission */
.vision {
  margin: 0 0 56px;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.1em;
}
.mission-heading {
  margin: 0 0 12px;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.12em; color: var(--usuzumi);
}
.mission { margin: 0; padding: 0; list-style: none; }
.mission li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.mission li:first-child { border-top: 1px solid var(--rule); }

/* products */
.products { display: grid; gap: 0; max-width: 46em; }
.product {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.product:first-of-type { padding-top: 8px; }
.product:last-of-type { border-bottom: 0; padding-bottom: 0; }
.product-icon {
  width: 88px; height: 88px;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(38, 37, 35, 0.12);
  grid-row: span 3;
}
.product-name {
  margin: 0;
  font-size: 1.625rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.4;
}
.product-name small {
  margin-left: 0.8em;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 400;
  color: var(--usuzumi); letter-spacing: 0.1em;
}
.product-catch { margin: 0; font-weight: 600; }
.product-desc { margin: 0; color: var(--usuzumi); }
.product-link {
  grid-column: 2;
  justify-self: start;
  margin-top: 12px;
  font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.08em;
}

/* text links block */
.plain-links { margin: 1.6em 0 0; padding: 0; list-style: none; font-family: var(--sans); font-size: 0.875rem; }
.plain-links li + li { margin-top: 6px; }

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

.site-footer {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
  gap: 24px var(--gutter);
  padding: 56px var(--gutter) 40px;
  background: var(--sumi);
  border-top: 2px solid var(--kin);
  color: #c9c7c0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.9;
}
.site-footer a { color: #e6e4de; text-decoration: none; }
.site-footer a:hover { color: #d9a050; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #d9a050; }
.footer-name { margin: 0; font-family: var(--serif); font-size: 1rem; color: #f2f1ec; letter-spacing: 0.08em; }
.footer-links {
  display: flex; flex-wrap: wrap;
  gap: 8px 32px; margin: 0; padding: 0; list-style: none;
}
.copyright { grid-column: 1 / -1; margin: 40px 0 0; color: #8f8d87; font-size: 0.75rem; }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .site-header { padding-top: 20px; padding-bottom: 20px; }
  .site-nav ul { gap: 4px 20px; }

  .hero {
    min-height: 76vh;
    padding-right: var(--gutter);
    background-image: url("/assets/img/hero-sm.jpg");
    background-position: 42% center;
  }
  .hero-tagline { font-size: clamp(2.25rem, 10vw, 2.75rem); }

  main > section, .site-footer { grid-template-columns: 1fr; }
  main > section { padding-top: 64px; padding-bottom: 64px; }

  .product { grid-template-columns: 64px 1fr; gap: 6px 20px; }
  .product-icon { width: 64px; height: 64px; border-radius: 15px; grid-row: span 1; }
  .product-catch, .product-desc, .product-link { grid-column: 1 / -1; }
  .product-name { align-self: center; font-size: 1.375rem; }
  .product-name small { display: block; margin-left: 0; }
}

/* ---------- sub pages ---------- */

.page-head {
  padding: 72px var(--gutter) 56px;
  background:
    linear-gradient(to right, var(--kin) 0 20%, var(--divider) 20% 100%)
    left bottom / 100% 4px no-repeat;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.page-head .page-sub {
  margin: 10px 0 0;
  font-family: var(--sans); font-size: 0.875rem; color: var(--usuzumi); letter-spacing: 0.1em;
}

/* app page header */
.app-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 32px;
}
.app-head .product-icon { width: 112px; height: 112px; border-radius: 25px; grid-row: span 2; }
.app-head .store-button { grid-column: 2; justify-self: start; margin-top: 14px; }

.store-button {
  display: inline-block;
  padding: 12px 26px;
  background: var(--sumi);
  color: var(--paper);
  font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 3px solid var(--kin);
}
.store-button:hover { background: #3a3835; color: #fff; }
.store-block { margin: 2.4em 0; }

/* long-form documents (policies, app guides) */
.doc {
  padding: 64px var(--gutter) 104px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
  gap: 24px var(--gutter);
}
.doc-body { grid-column: 2; max-width: 40em; }
.doc-body > :first-child { margin-top: 0; }
.doc-body p { margin: 0 0 1.2em; }
.doc-body h2 {
  margin: 2.8em 0 0.9em;
  padding-top: 1.1em;
  border-top: 1px solid var(--rule);
  font-size: 1.25rem; font-weight: 600; letter-spacing: 0.08em; line-height: 1.6;
}
.doc-body h3 {
  margin: 2em 0 0.6em;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.6;
}
.doc-body ul, .doc-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.doc-body li { margin-bottom: 0.4em; }
.doc-body li > ul, .doc-body li > ol { margin: 0.4em 0 0; }
.doc-body li::marker { color: var(--kin-deep); }
.doc-body :target { scroll-margin-top: 24px; }

/* company profile */
.profile { margin: 2.4em 0 0; border-top: 1px solid var(--rule); }
.profile div {
  display: grid; grid-template-columns: 9em 1fr; gap: 0 24px;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.profile dt { font-family: var(--sans); font-size: 0.875rem; color: var(--usuzumi); letter-spacing: 0.08em; padding-top: 0.15em; }
.profile dd { margin: 0; }
.profile ul { margin: 0; padding-left: 1.2em; }
.profile li::marker { color: var(--kin-deep); }

/* contact */
.form-frame {
  width: 100%;
  height: 1000px;
  border: 0;
  background: var(--paper-raised);
}
.form-note { font-family: var(--sans); font-size: 0.875rem; color: var(--usuzumi); }

@media (max-width: 760px) {
  .page-head { padding-top: 48px; padding-bottom: 40px; }
  .doc { grid-template-columns: 1fr; padding-top: 40px; }
  .doc-body { grid-column: 1; }
  .app-head { grid-template-columns: 72px 1fr; gap: 6px 18px; }
  .app-head .product-icon { width: 72px; height: 72px; border-radius: 16px; grid-row: span 1; }
  .app-head .store-button { grid-column: 1 / -1; }
  .profile div { grid-template-columns: 1fr; gap: 4px; }
}

/* English hero: horizontal setting */
.hero-tagline.horizontal {
  writing-mode: horizontal-tb;
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.hero-tagline.horizontal > span + span { margin-top: 0.1em; margin-left: 1.2em; }
.doc-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* App Store badge (Apple artwork: keep as supplied, height >= 40px) */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 48px; width: auto; }
.app-head .store-badge { grid-column: 2; justify-self: start; margin-top: 16px; }
.store-banner { margin: 2.4em 0 1em; }
.store-banner img { width: 100%; height: auto; border-radius: 6px; }
@media (max-width: 760px) { .app-head .store-badge { grid-column: 1 / -1; } }

/* App page header: icon, name, category and badge stacked on the centre line */
.app-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.app-head .product-icon { width: 112px; height: 112px; border-radius: 25px; margin-bottom: 20px; }
.app-head .page-sub { margin-top: 4px; }
.app-head .store-badge { margin-top: 22px; }
@media (max-width: 760px) {
  .app-head .product-icon { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 16px; }
}
