/* ===========================
   SARABASE.estate - Shared Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Italiana&family=Noto+Sans+JP:wght@300;400;500;600;700&family=DM+Mono:wght@300;400;500&display=swap');

/* Smooth in-page navigation (menu → section) */
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 96px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

:root {
  /* Water-blue palette — 水色 (was pink, recolored) */
  --pink-50: #F1FAFB;
  --pink-100: #E0F2F5;
  --pink-200: #C7E8EE;   /* primary soft aqua */
  --pink-300: #9BD4DE;
  --pink-400: #6BBBC9;
  --pink-500: #3E9AAB;

  /* Neutrals — clean cool white */
  --cream: #F4F9FA;
  --paper: #EEF4F5;
  --warm-white: #FCFDFD;
  --ink: #1A1A1A;
  --ink-soft: #2D2825;
  --ink-mid: #6B6259;
  --ink-low: #9A9088;
  --line: rgba(26, 26, 26, 0.08);
  --line-strong: rgba(26, 26, 26, 0.18);

  /* Fonts */
  --serif-jp: "Shippori Mincho", "Yu Mincho", "游明朝", "Hiragino Mincho ProN", serif;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --display: "Italiana", "Cormorant Garamond", serif;
  --sans-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "DM Mono", "SF Mono", Consolas, monospace;
}

.lp-root, .lp-root * {
  box-sizing: border-box;
}

.lp-root {
  font-family: var(--serif-jp);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
  letter-spacing: 0.02em;
  max-width: 1600px;
  margin-inline: auto;
  position: relative;
  box-shadow: 0 0 80px rgba(0,0,0,0.06);
}
/* Letterbox area outside the max-width container on ultra-wide screens */
body {
  background: #e7edee;
}

.lp-root img {
  display: block;
  max-width: 100%;
}

.lp-root a {
  color: inherit;
  text-decoration: none;
}

.lp-root button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Photo placeholder — subtle stripes */
.photo-ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      rgba(26,26,26,0.025) 0,
      rgba(26,26,26,0.025) 1px,
      transparent 1px,
      transparent 14px),
    linear-gradient(180deg, #ece6df 0%, #ddd4ca 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-ph.warm {
  background:
    repeating-linear-gradient(135deg,
      rgba(62,154,171,0.06) 0,
      rgba(62,154,171,0.06) 1px,
      transparent 1px,
      transparent 14px),
    linear-gradient(180deg, #e2f3f6 0%, #cbe9ef 100%);
}
.photo-ph.cool {
  background:
    repeating-linear-gradient(135deg,
      rgba(80,90,100,0.07) 0,
      rgba(80,90,100,0.07) 1px,
      transparent 1px,
      transparent 14px),
    linear-gradient(180deg, #dfe2e4 0%, #c8ccd0 100%);
}
.photo-ph.dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(0,0,0,0.15) 0,
      rgba(0,0,0,0.15) 1px,
      transparent 1px,
      transparent 14px),
    linear-gradient(180deg, #3a3530 0%, #1f1c19 100%);
}
.photo-ph__label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(26,26,26,0.5);
  text-transform: uppercase;
  background: rgba(255,255,255,0.7);
  padding: 3px 8px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.photo-ph.dark .photo-ph__label {
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.7);
}

/* Vertical text helper */
.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Thin divider */
.hairline {
  height: 1px;
  background: var(--line-strong);
  border: none;
  margin: 0;
}

/* CTA button base */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  background: var(--ink);
  color: var(--warm-white);
  font-family: var(--sans-jp);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  border-radius: 0;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--pink-500);
}
.btn-primary .arrow {
  display: inline-block;
  transition: transform 0.3s;
}
.btn-primary:hover .arrow {
  transform: translateX(4px);
}

.btn-pink {
  background: var(--pink-300);
  color: var(--ink);
}
.btn-pink:hover {
  background: var(--ink);
  color: var(--warm-white);
}

/* Section eyebrow label */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* Large display number */
.stat-num {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
}

/* Soft pink chip */
.chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--pink-100);
  color: var(--ink-soft);
  font-family: var(--sans-jp);
  font-size: 11px;
  letter-spacing: 0.1em;
  border-radius: 999px;
}

/* Animated underline nav link (flows left→right on hover) */
.nav-link {
  position: relative;
  padding-bottom: 6px;
  transition: opacity 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after {
  transform: scaleX(1);
}

/* Decorative dot */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink-300);
  display: inline-block;
}

/* ============= Scroll reveal ============= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
  /* will-change removed — it held a GPU layer on every element permanently and added load. */
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-soft {
  transform: translateY(20px);
}
.reveal-blur {
  filter: blur(8px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1), filter 1.1s ease;
}
.reveal-blur.is-in {
  filter: none;
}

/* When viewing inside the design canvas, disable animations (start visible) */
.no-anim .reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* Respect reduced-motion AND act as a global safety brake against runaway repaints */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ============= Marquee (horizontal flowing strip) ============= */
.marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.marquee__track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee-left 70s linear infinite;
  transform: translateZ(0);            /* promote to its own GPU layer once */
  backface-visibility: hidden;
}
.marquee--right .marquee__track {
  animation-name: marquee-right;
}
.marquee--slow .marquee__track {
  animation-duration: 100s;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__item {
  flex: 0 0 auto;
  height: 200px;
  width: 280px;
}
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ============= Side rail (fixed SNS) ============= */
.side-rail {
  position: fixed;
  right: max(24px, calc((100vw - 1600px) / 2 + 24px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 24px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
  transition: opacity 0.4s ease;
}
.side-rail__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
}
.side-rail__icon:hover {
  background: var(--ink);
  color: var(--warm-white);
  transform: scale(1.08);
}
.side-rail__icon svg {
  width: 18px;
  height: 18px;
}
.side-rail__divider {
  width: 1px;
  height: 28px;
  background: var(--line-strong);
}
.side-rail__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-mid);
  padding: 4px 0;
}

/* Tooltip on side rail hover */
.side-rail__icon::after {
  content: attr(data-label);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translate(-12px, -50%);
  background: var(--ink);
  color: var(--warm-white);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.side-rail__icon:hover::after {
  opacity: 1;
  transform: translate(-4px, -50%);
}

/* ============= Responsive ============= */
@media (max-width: 1024px) {
  .side-rail {
    right: 8px;
    gap: 10px;
    padding: 12px 8px;
  }
  .side-rail__icon { width: 28px; height: 28px; }
  .side-rail__icon svg { width: 14px; height: 14px; }
  .side-rail__label { font-size: 7px; letter-spacing: 0.12em; }
  .side-rail__divider { height: 18px; }
  .marquee__track { gap: 12px; }
}
@media (max-width: 640px) {
  .side-rail {
    right: 4px;
    gap: 10px;
    padding: 13px 7px;
  }
  .side-rail__icon { width: 28px; height: 28px; }
  .side-rail__icon svg { width: 14px; height: 14px; }
  .side-rail__label { font-size: 8px; letter-spacing: 0.12em; }
  .side-rail__divider { height: 16px; }
  .marquee__track { gap: 10px; }
}

/* ============= Hero copy block fade-in ============= */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-copy-block {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 0.8, 0.4, 1) both;
  animation-delay: 0.3s;
}

.hero-fade-1 {
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 0.8, 0.4, 1) both;
  animation-delay: 0.45s;
}

.hero-fade-2 {
  animation: heroFadeUp 1s cubic-bezier(0.22, 0.8, 0.4, 1) both;
  animation-delay: 0.65s;
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy-block,
  .hero-fade-1,
  .hero-fade-2 { animation: none; }
}

/* ============= Hero image ============= */
/* Crossfade slideshow — flicker-free.
   Every slide stays fully opaque; we stack them by z-index and only fade the
   TOP (incoming) one in. The slide beneath is always solid, so nothing ever
   shows through to the background. */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.4s ease-in-out;
  will-change: opacity;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transform-origin: center center;
}
/* the slide currently shown sits on top, fully opaque */
.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}
/* keep the previously-shown slide opaque underneath during the fade */
.hero-slide.is-prev {
  opacity: 1;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
