/* ─────────────────────────────────────────────
   Add Inc. — Brand site
   ───────────────────────────────────────────── */
:root {
  --paper:   #FAF8F4;
  --paper-2: #F1ECE3;
  --ink:     #1A1814;
  --ink-2:   #2E2A24;
  --mid:     #6E6A63;
  --mid-2:   #9A958C;
  --hair:    #E5E1D9;
  --hair-2:  #D7D1C5;
  --accent:  #6B1A66;
  --accent-2:#A23B98;

  --container: 1240px;
  --pad-x: clamp(24px, 5vw, 80px);
  --rhythm: clamp(48px, 7vw, 88px);

  --serif:  "Shippori Mincho B1", "Hiragino Mincho ProN", "游明朝", "YuMincho", serif;
  --display:"Cormorant Garamond", "Shippori Mincho B1", serif;
  --sans:   "Noto Sans JP", "Hiragino Kaku Gothic ProN", "游ゴシック", "YuGothic", sans-serif;
  --latin:  "Inter", "Helvetica Neue", Arial, sans-serif;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─────────────────────────────────────────────
   Topbar
   ───────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center;
  padding: 24px calc(var(--pad-x) * 0.5) 12px;
  background: #ffffff;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  transition: background .4s ease, box-shadow .4s ease, padding .35s cubic-bezier(.4,0,.2,1), border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: #ffffff;
  border-bottom-color: var(--hair);
  padding: 12px calc(var(--pad-x) * 0.5);
}
.brand { display: flex; align-items: center; gap: 18px; }
.brand .logo {
  width: 56px; height: 56px; object-fit: contain;
  transition: width .35s ease, height .35s ease;
}
.topbar.is-stuck .brand .logo { width: 42px; height: 42px; }
.brand .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  transition: font-size .35s ease;
}
.topbar.is-stuck .brand .name { font-size: 24px; }
.brand .name .small { font-size: 11px; letter-spacing: 0.22em; color: var(--mid); display: block; margin-top: 4px; font-family: var(--latin); font-weight: 500; }

.nav {
  margin-left: auto;
  align-self: stretch;
  display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 44px);
}
.nav a {
  font-family: var(--latin);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--ink);
  position: relative;
  padding: 10px 2px 12px;
  transition: color .3s ease, transform .3s ease, font-weight .2s;
}
.nav a:not(.contact-pill)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -13px;
  height: 4px;
  background: var(--accent);
  transition: right .35s cubic-bezier(.2,.7,.2,1);
}
.nav a:not(.contact-pill):hover,
.nav a:not(.contact-pill).is-active {
  color: var(--accent);
  font-weight: 700;
}
.nav a:not(.contact-pill):hover::after,
.nav a:not(.contact-pill).is-active::after { right: 0; }
.nav .contact-pill {
  margin-left: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  letter-spacing: 0.22em;
  transition: opacity .3s ease;
}
.nav .contact-pill svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 1.4;
}
.nav .contact-pill:hover { opacity: 0.55; }
.nav .contact-pill::before,
.nav .contact-pill::after { display: none; }

/* ─────────────────────────────────────────────
   Section scaffolding
   ───────────────────────────────────────────── */
.section { padding: var(--rhythm) var(--pad-x); position: relative; overflow: hidden; }
.section .container { position: relative; z-index: 2; }
.section--alt { background: var(--paper-2); }
.container { max-width: var(--container); margin: 0 auto; }

.section-label {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: clamp(8px, 1.4vw, 14px);
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--mid);
}
.section-label .num {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0;
}
.section-label .bar {
  flex: 1; height: 1px; background: var(--hair-2);
  margin-left: 8px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.4;
  letter-spacing: 0.06em;
}
.section-title .em { color: inherit; }
.section-title .latin {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.5em;
  color: var(--mid);
  letter-spacing: 0.06em;
  margin-top: 8px;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
footer {
  background: #fff;
  padding: clamp(60px, 8vw, 96px) var(--pad-x) 32px;
  color: var(--ink-2);
  border-top: 1px solid var(--hair);
}
.foot {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hair-2);
}
.foot__left {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  flex: 1;
  min-width: 0;
}
.foot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.foot__brand .logo { width: 64px; height: 64px; object-fit: contain; }
.foot__brand .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.foot__brand .name .small {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--mid);
  display: block;
  margin-top: 5px;
  font-family: var(--latin);
  font-weight: 500;
}
.foot__desc {
  font-size: 11.5px;
  color: var(--mid);
  line-height: 1.8;
  flex: 1;
  min-width: 0;
}
.foot__col { flex-shrink: 0; }
.foot__col ul {
  list-style: none;
  display: flex; flex-direction: row; flex-wrap: nowrap;
  gap: clamp(10px, 1.3vw, 18px);
  align-items: center;
  justify-content: flex-end;
}
.foot__col li {
  font-family: var(--latin);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.foot__col li a { transition: color .3s; }
.foot__col a:hover { color: var(--accent); }

.foot__bottom {
  max-width: var(--container);
  margin: 28px auto 0;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--latin); font-size: 10.5px; letter-spacing: 0.22em;
  color: var(--mid);
}

/* ─────────────────────────────────────────────
   CTA band (全ページ共通)
   ───────────────────────────────────────────── */
.contact-band {
  padding: clamp(10px, 1.6vw, 18px) var(--pad-x);
  background: var(--accent);
  color: var(--paper);
  text-align: center;
}
.contact-band::before { display: none; }
.contact-band__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.18em;
  color: var(--paper);
  margin: 0;
}
.contact-band__mail {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 20px);
  letter-spacing: 0.06em;
  color: var(--paper);
  white-space: nowrap;
  border: 0;
  padding: 0;
  transition: opacity .3s;
}
.contact-band__mail:hover { opacity: 0.78; color: var(--paper); }
.contact-band__mail svg { width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }

/* ────────────────────────────────────────
   Media dummy badge (画像中央に「ダミー」)
   ──────────────────────────────────────── */
.media-dummy {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,.96);
  padding: 12px 22px;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-transform: uppercase;
  font-weight: 500;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────
   View-more text link (bottom-right of each section)
   ───────────────────────────────────────────── */
.view-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: clamp(16px, 2.5vw, 32px);
  padding: 14px 29px;
  font-family: var(--latin);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  justify-content: center;
  transition: color .3s, background .3s, border-color .3s;
}
.view-more:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.view-more .en {
  font-family: var(--latin); font-size: 12px;
  letter-spacing: 0.18em; color: inherit;
  display: inline-flex; align-items: center; gap: 8px;
}
.view-more:hover .en { color: #fff; }
.view-more svg { width: 30px; height: 8px; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.view-more:hover svg { transform: translateX(6px); }
.view-more-wrap { display: flex; justify-content: flex-end; }

/* ─────────────────────────────────────────────
   Hamburger menu (mobile)
   ───────────────────────────────────────────── */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
  width: 38px; height: 38px;
  position: relative;
  cursor: pointer;
  margin-left: auto;
  align-self: center;
  z-index: 90;
}
.menu-toggle span {
  position: absolute;
  left: 6px; right: 6px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .35s cubic-bezier(.6,.2,.2,1), top .25s ease, opacity .25s ease;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 18px; }
.menu-toggle span:nth-child(3) { top: 24px; }
body.nav-open .menu-toggle span:nth-child(1) { top: 18px; transform: rotate(45deg); }
body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

/* ─────────────────────────────────────────────
   Reveal-on-scroll
   ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* ─────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --pad-x: clamp(12px, 3.5vw, 24px); }
  .topbar { border-bottom-color: var(--hair); background: #ffffff; padding-top: 10px; padding-bottom: 10px; }
  .topbar.is-stuck { padding-top: 10px; padding-bottom: 10px; }
  .brand .logo, .topbar.is-stuck .brand .logo { width: 42px; height: 42px; }
  .brand .name, .topbar.is-stuck .brand .name { font-size: 24px; }
  .menu-toggle { display: block; z-index: 110; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 100vw);
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 96px 32px 32px;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 40px rgba(20,18,16,0.08);
    z-index: 100;
    align-self: auto;
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav a:not(.contact-pill) {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--hair);
    font-size: 13px;
    letter-spacing: 0.24em;
  }
  .nav a:not(.contact-pill)::after { display: none; }
  .nav .contact-pill {
    margin: 28px auto 0;
    justify-content: center;
    padding: 14px 28px;
    width: 100%;
    max-width: 240px;
  }
  body.nav-open::after {
    content: "";
    position: fixed; inset: 0;
    background: rgba(20,18,16,0.5);
    z-index: 80;
    animation: navBackdrop .3s ease forwards;
  }
  @keyframes navBackdrop { from { opacity: 0; } to { opacity: 1; } }
  body.is-resizing .nav { transition: none !important; }
  .foot { flex-direction: column; align-items: stretch; gap: 24px; padding-bottom: 28px; }
  .foot__left { flex-direction: column; align-items: flex-start; gap: clamp(12px, 2vw, 20px); }
  .foot__desc br { display: none; }
  .foot__col ul { justify-content: space-between; flex-wrap: nowrap; gap: clamp(4px, 1vw, 12px); width: 100%; }
  .foot__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .foot__col li { font-size: clamp(8px, 1.6vw, 12px); letter-spacing: 0.18em; }
  .section-title { word-break: keep-all; overflow-wrap: anywhere; }
  .view-more { min-width: auto; }
  .view-more-wrap { width: 100%; justify-content: flex-end; }
}

/* ─────────────────────────────────────────────
   Back to top
   ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  right: clamp(20px, 3vw, 36px);
  bottom: clamp(20px, 3vw, 36px);
  z-index: 110;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1), visibility 0s linear .5s, opacity .3s ease;
  box-shadow: 0 8px 24px rgba(107,26,102,.25);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1), visibility 0s linear, opacity .3s ease;
}
.back-to-top:hover { background: rgba(255, 255, 255, 0.75); color: var(--accent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.back-to-top svg { width: 16px; height: 16px; }
.back-to-top .en {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.2em;
  font-weight: 500;
  margin-top: 1px;
}
