/* ==========================================================================
   ALTO theme — 共通: トークン / リセット / ヘッダー / フッター / 共有部品
   ========================================================================== */

:root {
  --color-bg: #08080a;
  --color-text: #efeae1;
  --color-accent: #e8b057;

  --color-text-78: rgba(239, 234, 225, .78);
  --color-text-76: rgba(239, 234, 225, .76);
  --color-text-70: rgba(239, 234, 225, .7);
  --color-text-68: rgba(239, 234, 225, .68);
  --color-text-62: rgba(239, 234, 225, .62);
  --color-text-60: rgba(239, 234, 225, .6);
  --color-text-58: rgba(239, 234, 225, .58);
  --color-text-55: rgba(239, 234, 225, .55);
  --color-text-50: rgba(239, 234, 225, .5);

  --line-section: rgba(239, 234, 225, .08);
  --line-row: rgba(239, 234, 225, .12);
  --line-footer: rgba(239, 234, 225, .1);

  --glow-strong: rgba(232, 176, 87, .22);
  --glow-soft: rgba(232, 176, 87, .16);
  --btn-border: rgba(232, 176, 87, .5);

  --font-serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;

  --container: 1080px;
  --gutter: 40px;
  --header-pad-y: 22px;
  --section-pad: clamp(96px, 4rem + 8vw, 180px);
  --section-pad-md: clamp(88px, 3.5rem + 7.5vw, 160px);

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --duration-reveal: 1.1s;
}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
    --header-pad-y: 18px;
  }
}

/* --- Reset / base ------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color .3s ease, opacity .3s ease;
}

a:hover { color: var(--color-accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 12px;
  letter-spacing: .12em;
  transform: translateY(-200%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: none; color: var(--color-bg); }

@keyframes altoRise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes altoGlow {
  0%, 100% { opacity: .35; }
  50% { opacity: .7; }
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-pad-y) var(--gutter);
}

/* backdrop-filter を header 自身に当てると、子孫の position: fixed（モバイルナビ）の基準が
   header になってしまうため、背景とぼかしは疑似要素に持たせる */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 8, 10, .85), rgba(8, 8, 10, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header__logo {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
}

.site-header__logo-img { height: 22px; width: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  letter-spacing: .18em;
}

/* 現在地のページに対応する項目だけ金色にする */
.site-nav__link--current { color: var(--color-accent); }
.site-nav__link--current:hover { opacity: .75; }

.nav-toggle { display: none; }

@media (max-width: 800px) {
  .nav-toggle {
    position: relative;
    z-index: 60;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .nav-toggle__bar {
    display: block;
    width: 24px;
    height: 1px;
    margin: 0 auto;
    background: var(--color-text);
    transition: transform .35s var(--ease-out);
  }

  html.nav-open .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
  html.nav-open .nav-toggle__bar:last-child { transform: translateY(-4px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, .96);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
  }

  html.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  html.nav-open { overflow: hidden; }

  .site-nav__list {
    flex-direction: column;
    gap: 28px;
    font-size: 14px;
    letter-spacing: .3em;
    text-align: center;
  }

  .site-nav__link {
    display: block;
    padding: 6px 12px;
    opacity: 0;
    transform: translateY(12px);
    transition: transform .6s var(--ease-out), opacity .5s ease, color .3s ease;
  }

  html.nav-open .site-nav__link { opacity: 1; transform: none; }
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 56px var(--gutter);
  border-top: 1px solid var(--line-footer);
}

.site-footer__col { display: flex; flex-direction: column; gap: 14px; }
.site-footer__col--left { align-items: flex-start; }
.site-footer__col--right { align-items: flex-end; }
.site-footer__logo { height: 20px; width: auto; }

.site-footer__address {
  font-size: 12px;
  line-height: 1.9;
  color: var(--color-text-60);
}

.site-footer__links {
  display: flex;
  gap: 28px;
  font-size: 12px;
  letter-spacing: .18em;
}

.site-footer__copy {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--color-text-50);
}

@media (max-width: 640px) {
  .site-footer { flex-direction: column; align-items: flex-start; padding-block: 48px; }
  .site-footer__col--right { align-items: flex-start; }
}

/* --- Shared components --------------------------------------------------- */

.section-label { display: flex; flex-direction: column; gap: 12px; }
.section-label--row { flex-direction: row; align-items: baseline; gap: 24px; }

.section-label__name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--color-accent);
}

.section-label__index {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--color-text-58);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 46px;
  border: 1px solid var(--btn-border);
  color: var(--color-accent);
  font-size: 13px;
  letter-spacing: .18em;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.btn--small { gap: 12px; padding: 14px 28px; font-size: 12px; }

.btn__arrow {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent);
  font-size: 12px;
  letter-spacing: .18em;
}

.arrow-link:hover { opacity: .75; }

/* --- Scroll reveal（JS が html.reveal-ready を付けたときだけ有効） ------- */

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-reveal) var(--ease-out), transform 1.2s var(--ease-out);
  will-change: opacity, transform;
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

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

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__text,
  .hero__glow,
  .page-hero__text { animation: none !important; }
}
