/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  font-size: 16px; /* 1rem = 16px, per project-wide Figma token convention */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Matches the sticky header's actual rendered height (35px logo + 20px
   padding-block + 1px border = 56px). Was 4rem, which left an 8px gap
   below the header where the previous section peeked through on landing. */
#hero,
#message,
#business,
#profile {
  scroll-margin-top: 3.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   Tokens — aurum: "Quiet Luxury". Warm ivory/cream page, no accent color,
   restrained typography and thin dividers throughout.
   ========================================================================== */

:root {
  --color-bg: #faf6ee;
  --color-bg-section: #f3ede0;
  --color-text: #2a2724;
  --color-muted: #8c8574;
  --color-border: #d9d2c2;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --content-width: 64rem;
  --content-width-narrow: 40rem;
  --gutter: 1.5rem;
}

.header-inner,
.hero-content,
.message-inner,
.business,
.profile-inner,
.site-footer {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Header — centered wordmark, email icon right, no nav links (per comp)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-bg);
  border-bottom: 0.0625rem solid var(--color-border);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  padding-block: 0.625rem;
}

.logo {
  grid-column: 2;
  justify-self: center;
}

.nav-email {
  grid-column: 3;
  justify-self: end;
  display: flex;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.nav-email:hover {
  color: var(--color-muted);
}

/* mobile hamburger — fills the header's otherwise-empty left column, so the
   grid naturally lays out as hamburger / logo / email */
.nav-toggle {
  display: none;
  grid-column: 1;
  justify-self: start;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3125rem;
  width: 1.5rem;
  height: 1.5rem;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 0.0625rem;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(0.375rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-0.375rem) rotate(-45deg);
}

.mobile-nav {
  display: none;
}

@media (max-width: 74rem) {
  .nav-toggle {
    display: flex;
  }

  .mobile-nav:not([hidden]) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 0.0625rem solid var(--color-border);
  }

  .mobile-nav a {
    padding: var(--space-md) var(--gutter);
    text-align: center;
    font-size: 0.9375rem;
    letter-spacing: 0.08em;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-nav a + a {
    border-top: 0.0625rem solid var(--color-border);
  }

  .mobile-nav a:hover,
  .mobile-nav a:focus-visible {
    color: var(--color-muted);
    background: var(--color-bg-section);
  }
}

/* ==========================================================================
   Side nav — fixed vertical tabs for メッセージ / 事業 / 会社概要
   ========================================================================== */

.side-nav {
  position: fixed;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* Held back during the hero "opening" moment (see js/nav-reveal.js) so the
   full-bleed photo gets the viewer's full attention with nothing competing
   on the right edge — appears softly once scrolled past, and disappears
   quickly on the way back up. Hidden via visibility (not just opacity) so
   the links aren't tab-focusable while invisible. */
.side-nav {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.side-nav.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .side-nav,
  .side-nav.is-visible {
    transition-duration: 0s;
  }
}

.side-nav a {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.8125rem;
  letter-spacing: 0.28em;
  color: var(--color-muted);
  text-decoration: none;
  padding-block: var(--space-sm);
  border-right: 0.0625rem solid transparent;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  color: var(--color-text);
  border-right-color: var(--color-border);
}

@media (max-width: 74rem) {
  .side-nav {
    display: none;
  }
}

/* ==========================================================================
   Hero — full-bleed photo, headline + divider + subtext centered in viewport
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
  min-height: 32rem;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Scaled up slightly so the barely-perceptible scroll parallax (see
     js/hero-parallax.js) always has cover to shift into — never reveals
     an edge. */
  transform: scale(1.05) translateY(var(--parallax-y, 0px));
  will-change: transform;
}

/* permanent, subtle contrast aid so centered text stays legible over the photo */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 20, 0.32);
}

/* "mist" load effect — replays on every page load (not gated by localStorage) */
.hero-mist {
  position: absolute;
  inset: 0;
  background: rgba(250, 246, 238, 0.88);
  opacity: 1;
  pointer-events: none;
  animation: hero-mist-clear 3.5s 1.2s ease-out forwards;
}

@keyframes hero-mist-clear {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mist {
    animation: none;
    opacity: 0;
  }
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  text-align: center;
  color: #fdfbf6;
  padding-block: var(--space-xl);
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-divider {
  width: 3rem;
  height: 0.0625rem;
  border: 0;
  background: rgba(253, 251, 246, 0.65);
}

.hero-body {
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  font-weight: 400;
  color: rgba(253, 251, 246, 0.88);
  max-width: 30rem;
}

/* Scroll cue — the global nav only appears once scrolled past the hero
   (see js/nav-reveal.js), so this gives visitors an explicit way to reach
   メッセージ without needing to scroll unprompted first. */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  /* Lands just beneath the dining table in the hero photo, below the
     vertically-centered heading/body text. */
  top: 70%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(253, 251, 246, 0.88);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.hero-scroll-cue:hover,
.hero-scroll-cue:focus-visible {
  opacity: 0.7;
}

.hero-scroll-cue-label {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-cue-arrow {
  width: 1.75rem;
  height: 1.75rem;
}

/* ==========================================================================
   Message — centered heading + centered body, on a soft section block
   ========================================================================== */

.message {
  background: var(--color-bg-section);
  padding-block: var(--space-2xl);
}

.message-inner {
  max-width: var(--content-width-narrow);
  text-align: center;
}

.message-inner h2 {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
}

.message-inner p {
  margin-bottom: var(--space-md);
  text-align: left;
}

.message-inner p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Business — plain 2x2 text grid, no photos/icons/cards
   ========================================================================== */

.business {
  padding-block: var(--space-2xl);
}

.business h2 {
  text-align: center;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.business-item {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.business-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0.0625rem solid var(--color-border);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.business-item:hover::after,
.business-item:focus-within::after {
  opacity: 1;
}

.business-item:nth-child(1),
.business-item:nth-child(2) {
  border-bottom: 0.0625rem solid var(--color-border);
}

.business-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.business-desc {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-muted);
  text-align: left;
}

/* ==========================================================================
   Company Profile — thin outline box, fields left, map right
   ========================================================================== */

.profile {
  background: var(--color-bg-section);
  padding-block: var(--space-2xl);
}

.profile h2 {
  text-align: center;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

.profile-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  background: var(--color-bg);
  border: 0.0625rem solid var(--color-border);
  padding: var(--space-xl);
}

.profile-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-md);
  row-gap: var(--space-sm);
  align-content: start;
}

.profile-list dt {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.profile-list dd {
  font-size: 0.9375rem;
}

.profile-en {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.profile-business-list li + li {
  margin-top: 0.125rem;
}

.profile-list dd a {
  text-decoration: none;
}

.profile-list dd a:hover {
  text-decoration: underline;
}

/* Phone number: click-to-call only on touch devices; plain, non-interactive
   text everywhere else (mailto is unaffected). */
@media (hover: hover) and (pointer: fine) {
  a[href^="tel:"] {
    text-decoration: none;
    pointer-events: none;
    cursor: default;
  }
}

.map-embed {
  min-height: 16rem;
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-lg);
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Scroll reveal — very faint, slow fade + rise as each section enters view
   (see js/scroll-reveal.js). Kept the most restrained of any site in the
   polish pass: small offset, slow transition, nothing else layered on top.
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 48rem) {
  .business-grid {
    grid-template-columns: 1fr;
  }

  .business-item:nth-child(1),
  .business-item:nth-child(2),
  .business-item:nth-child(3) {
    border-bottom: 0.0625rem solid var(--color-border);
  }

  .profile-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 30rem) {
  .header-inner,
  .hero-content,
  .message-inner,
  .business,
  .profile-inner,
  .site-footer {
    padding-inline: var(--space-md);
  }

  .profile-box {
    padding: var(--space-lg);
  }
}
