/* ============================================================
   Nana Digital — Global design tokens (spec §1)
   ============================================================ */
:root {
  /* Colors */
  --color-bg: #FFFFFF;
  --color-bg-warm: #FAF9F5;
  --color-ink: #000000;
  --color-hairline: #D6D6D6;

  /* Type */
  --font-latin: "Roboto", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-jp: "Noto Sans JP", "Roboto", -apple-system, sans-serif;

  /* Spacing */
  --container-max: 1280px;
  --container-pad: 24px;
  --section-pad: 80px;

  /* Motion */
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1024px) {
  :root { --container-pad: 64px; }
}
@media (min-width: 1440px) {
  :root { --container-pad: 80px; }
}
@media (min-width: 768px) {
  :root { --section-pad: 160px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html[lang="ja"] body { font-family: var(--font-jp); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-latin);
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, .img-placeholder { max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

section {
  padding-block: var(--section-pad);
}

/* Image placeholder — stand-in until real assets are dropped in (spec §11) */
.img-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(45deg, #EDEDED, #EDEDED 10px, #E4E4E4 10px, #E4E4E4 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

/* ============================================================
   Reveal on scroll — ghost -> resolved (spec §5.2)
   ============================================================ */
.reveal {
  opacity: 0.15;
  transform: translateY(20px);
  transition:
    opacity 700ms var(--ease-reveal),
    transform 700ms var(--ease-reveal),
    border-color 700ms var(--ease-reveal);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-group > * { transition-delay: calc(var(--reveal-index, 0) * 90ms); }

/* ============================================================
   Section label component (§1.5) — always bilingual, not affected
   by the language toggle
   ============================================================ */
.section-label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.section-label__en {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-label__ja {
  font-family: var(--font-jp);
  font-size: 0.8rem;
  font-weight: 400;
  color: #999;
}

/* ============================================================
   Framed text component (§1.5 / §3)
   ============================================================ */
.framed-text {
  border: 1px solid var(--color-ink);
  background: var(--color-bg-warm);
  padding: 16px 14px;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  line-height: 1.15;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .framed-text { padding: 24px 20px; }
}
.framed-text.reveal {
  opacity: 0.15;
  border-color: transparent;
  background: transparent;
  transform: translateY(16px);
}
.framed-text.reveal.is-visible {
  opacity: 1;
  border-color: var(--color-ink);
  background: var(--color-bg-warm);
  transform: translateY(0);
}
.hero__taglines .framed-text.reveal {
  transform: translateX(-150px);
}
.hero__taglines .framed-text.reveal.is-visible {
  transform: translateX(0);
}
.hero__taglines .framed-text:nth-child(1) { transition-delay: 0ms; }
.hero__taglines .framed-text:nth-child(2) { transition-delay: 220ms; }
.hero__taglines .framed-text:nth-child(3) { transition-delay: 440ms; }

/* ============================================================
   Pill toggle — language switcher (§1.5 / §2.3)
   ============================================================ */
.pill-toggle {
  display: inline-flex;
  align-items: stretch;
  background: var(--color-bg);
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  height: 48px;
}
.pill-toggle button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0 24px;
  cursor: pointer;
  color: #999;
  font-weight: 500;
}
.pill-toggle button + button {
  border-left: 1px solid var(--color-hairline);
}
.pill-toggle button.is-active {
  font-weight: 700;
  color: var(--color-ink);
}

/* ============================================================
   Curved divider (§1.5 / §4)
   ============================================================ */
.curved-divider {
  position: relative;
  overflow: hidden;
  height: 70vh;
  min-height: 420px;
}
.curved-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% 25%;
  display: block;
}
.curved-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.curved-divider::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: -10%;
  width: 120%;
  height: 140px;
  background: var(--color-bg);
  border-radius: 50% 50% 0 0;
}
@media (min-width: 768px) {
  .curved-divider { height: 85vh; }
  .curved-divider::after { height: 200px; }
  .curved-divider img { object-position: 70% 25%; }
}

/* ============================================================
   Header (§2)
   ============================================================ */
#site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: 136px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 30px;
  background: transparent;
  transition: background 400ms var(--ease-reveal);
}
@media (min-width: 768px) {
  #site-header { height: 168px; padding-bottom: 36px; }
}
#site-header.is-solid {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-hairline);
}
#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo__mark {
  width: auto;
  height: 44px;
  object-fit: contain;
  display: block;
}
@media (min-width: 768px) {
  .logo__mark { height: 56px; }
}
.footer__logo { height: 40px; }
.logo__word {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant: small-caps;
}

.header__pill {
  height: 36px;
}
.header__pill button {
  padding: 0 14px;
  font-size: 0.8rem;
}
@media (min-width: 768px) {
  .header__pill {
    height: 48px;
  }
  .header__pill button {
    padding: 0 24px;
    font-size: 0.9rem;
  }
}

/* Compact the header on mobile so logo + pill + menu all fit on one row */
@media (max-width: 767px) {
  #site-header .logo__word { display: none; }
}

.menu-btn {
  width: 24px;
  height: 18px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-btn span {
  position: absolute;
  right: 0;
  height: 2px;
  background: var(--color-ink);
  transition: transform 300ms var(--ease-reveal), opacity 300ms;
}
.menu-btn span:nth-child(1) { top: 0; width: 60%; }
.menu-btn span:nth-child(2) { top: 8px; width: 100%; }
.menu-btn span:nth-child(3) { top: 16px; width: 40%; }

/* ============================================================
   Nav overlay (§2.4)
   ============================================================ */
#nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg-warm);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  overflow-y: auto;
}
#nav-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-overlay__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  padding-top: 88px;
}
@media (min-width: 768px) {
  .nav-overlay__inner { padding: 40px 64px; padding-top: 120px; }
}

.nav-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: var(--color-ink);
  border: none;
  cursor: pointer;
  color: var(--color-bg);
  font-family: inherit;
  font-size: 1.5rem;
  clip-path: polygon(20% 0%, 100% 10%, 90% 90%, 10% 100%, 0% 30%);
  border-radius: 40% 50% 45% 55%;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .nav-close { width: 80px; height: 80px; top: 28px; right: 28px; }
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}
.nav-links li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
}
#nav-overlay.is-open .nav-links li {
  opacity: 1;
  transform: translateY(0);
}
.nav-links a {
  display: inline-block;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
}
.nav-links a::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  margin-bottom: 10px;
}
.nav-links a:hover { text-decoration: underline; }

.nav-overlay__footer {
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px solid var(--color-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-overlay__footer .logo__word { font-size: 1rem; }
.nav-overlay__location { color: #666; font-size: 0.9rem; }

/* ============================================================
   Hero (§3)
   ============================================================ */
#hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.marquee {
  position: absolute;
  top: -3vw;
  left: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}
.marquee__copy {
  font-weight: 900;
  font-size: clamp(4rem, 16vw, 11rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--color-ink);
  padding-right: 0.4em;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__taglines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
  max-width: 620px;
}
@media (min-width: 768px) {
  .hero__taglines { gap: 16px; }
}

.hero__cta {
  margin-top: 28px;
  display: inline-block;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-left: auto;
  position: relative;
}
.hero__cta-wrap { display: flex; justify-content: flex-end; margin-top: 8px; }
.hero__cta {
  background-image: linear-gradient(var(--color-ink), var(--color-ink));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 200ms ease;
}
.hero__cta:hover { background-size: 100% 1px; }

/* ============================================================
   About (§4)
   ============================================================ */
#about { padding-top: 0; }
.about__statement {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 60px;
}
@media (min-width: 768px) {
  .about__statement {
    grid-template-columns: 30% 1fr;
    gap: 32px;
    padding-top: 100px;
  }
}
.about__heading {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
}
.about__body p {
  margin: 0 0 20px;
  max-width: 68ch;
}
.about__body p:last-child { margin-bottom: 0; }

/* ============================================================
   Works (§5)
   ============================================================ */
#work { background: var(--color-bg); }
.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 60px;
}

.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
.project + .project { margin-top: 100px; }
@media (min-width: 768px) {
  .project { grid-template-columns: 1fr 1fr; gap: 48px; }
  .project + .project { margin-top: 140px; }
  .project--reverse .project__media { order: 2; }
  .project--reverse .project__text { order: 1; }
}

.project__index {
  font-size: 0.9rem;
  font-weight: 500;
  color: #999;
  margin-bottom: 8px;
  display: block;
}
.project__name {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  margin: 0 0 12px;
}
.project__desc {
  color: #666;
  margin: 0;
}
.project__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-warm);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.project__media img,
.project__media .img-placeholder {
  transition: transform 600ms ease;
}
.project__media:hover img,
.project__media:hover .img-placeholder {
  transform: scale(1.03);
}
.project__view {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--color-bg);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}
.project__media:hover .project__view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Content help (photo/video add-on pitch)
   ============================================================ */
#content-help { border-top: 1px solid var(--color-hairline); }
.content-help__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .content-help__grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.content-help__statement .section-heading {
  margin-bottom: 24px;
}
.content-help__statement .framed-text {
  white-space: normal;
  display: inline-block;
}
.content-help__body p {
  margin: 0 0 20px;
  max-width: 52ch;
}
.content-help__body p:last-child { margin-bottom: 0; }
.content-help__closing {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* ============================================================
   Approach (§6)
   ============================================================ */
#approach { background: var(--color-bg-warm); }
.approach__tick {
  width: 1px;
  height: 32px;
  background: var(--color-ink);
  margin-bottom: 20px;
}
.approach__banner {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 48px;
}
.approach__banner-space {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px 16px 0 var(--container-pad);
}
.approach__banner-space .section-label { margin-bottom: 0; }
.approach__photo {
  position: relative;
  flex: 0 0 62%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .approach__photo { flex-basis: 55%; }
}
.approach__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.approach__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.approach__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 768px) {
  .approach__grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}
.approach__step-index {
  font-size: 0.9rem;
  font-weight: 500;
  color: #999;
  display: block;
  margin-bottom: 16px;
}
.approach__step-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.approach__step-lede {
  font-weight: 700;
  margin: 0 0 12px;
}
.approach__step-body { margin: 0; color: #444; }

/* ============================================================
   Contact (§7)
   ============================================================ */
#contact {
  text-align: center;
}
.contact__heading {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto 32px;
}
.contact__email {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.contact__visit {
  margin-top: 80px;
}
.contact__brand {
  margin: 0 0 24px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant: small-caps;
}
.contact__divider {
  max-width: 480px;
  margin: 0 auto 40px;
  border-top: 1px solid var(--color-hairline);
}
.contact__address {
  display: block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 300;
  color: #666;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.contact__map {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  margin: 24px auto 0;
  border: 1px solid var(--color-hairline);
  overflow: hidden;
}
.contact__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.contact__cta {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  margin-top: 40px;
  display: inline-block;
  background: var(--color-ink);
  color: var(--color-bg);
  border: 1px solid var(--color-ink);
  padding: 16px 32px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 250ms ease, color 250ms ease;
}
.contact__cta:hover {
  background: var(--color-bg);
  color: var(--color-ink);
}

/* ============================================================
   Pricing page
   ============================================================ */
#pricing-hero {
  padding-top: 180px;
  padding-bottom: 40px;
}
@media (min-width: 768px) {
  #pricing-hero { padding-top: 220px; }
}
.pricing-promo {
  display: inline-block;
  margin-top: 28px;
  border: 1px solid var(--color-ink);
  padding: 14px 24px;
  font-weight: 700;
  font-size: 0.95rem;
}
#pricing-plans, #website-care {
  padding-top: 40px;
}
.website-care__intro {
  max-width: 60ch;
  margin: 0 0 48px;
  color: #666;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

.pricing-card {
  border: 1px solid var(--color-ink);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
}
.pricing-card--featured {
  border-width: 2px;
}
.pricing-card__badge {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 14px;
}
.pricing-card__name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.pricing-card__price {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.1;
}
.pricing-card__desc {
  color: #666;
  margin: 0 0 24px;
}
.pricing-card__includes {
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.pricing-card__features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-card__features li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.pricing-card__features li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #999;
}
.pricing-card__note {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-hairline);
  font-weight: 500;
  font-size: 0.9rem;
}

.pricing-closing {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-hairline);
  font-weight: 500;
  text-align: center;
}

/* ============================================================
   Footer (§8)
   ============================================================ */
footer {
  border-top: 1px solid var(--color-hairline);
  padding-block: 48px;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__left { display: flex; flex-direction: column; gap: 6px; }
.footer__location { color: #666; font-size: 0.9rem; }

.social-icons {
  display: flex;
  gap: 12px;
}
.social-icons a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-icons svg { width: 18px; height: 18px; fill: var(--color-ink); }

.footer__right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: #666;
}

.footer__legal {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #999;
}
.footer__legal a { text-decoration: underline; }
