/* ========================================
   Zelbr — zelbr.com
   Direction B: Ink & paper
   Monochrome + vermillion accent (#D45B3E)
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #111111;
  --bg-dark-light: #1A1A1A;
  --bg-light: #FAFAF8;
  --bg-surface: #F0EFEC;
  --border: #E0E0DE;
  --text-primary: #111111;
  --text-secondary: #777777;
  --text-on-dark: #FAFAF8;
  --text-on-dark-sub: rgba(250, 250, 248, 0.6);
  --accent: #D45B3E;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-light);
}

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(250, 250, 248, 0.06);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-on-dark);
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  color: var(--text-on-dark);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 3.5px;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-on-dark-sub);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-on-dark);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-on-dark);
  position: absolute;
  left: 6px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle span:first-child { top: 12px; }
.nav-toggle span:last-child { top: 19px; }

.nav-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-light) 100%);
  color: var(--text-on-dark);
  padding: 180px 24px 120px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-on-dark-sub);
  border: 1px solid rgba(250, 250, 248, 0.12);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 40px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-on-dark-sub);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Sections (shared) --- */
.section {
  padding: 120px 24px;
}

.section--light {
  background: var(--bg-light);
}

.section--surface {
  background: var(--bg-surface);
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

/* --- Products --- */
.product-card {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-top: 40px;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.product-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
}

.product-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 440px;
}

.product-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.pill {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-primary);
  white-space: nowrap;
}

.product-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.product-cta:hover {
  border-color: var(--text-secondary);
  background: var(--bg-surface);
}

.product-cta--disabled {
  color: var(--text-secondary);
  border-color: var(--border);
  cursor: default;
  opacity: 0.6;
}

.product-cta--disabled:hover {
  border-color: var(--border);
  background: transparent;
}

.cta-icon {
  width: 18px;
  height: 18px;
}

/* ========================================
   Device Mockup — F-6g
   ======================================== */

.product-device {
  flex-shrink: 0;
}

.device-mock {
  position: relative;
  width: 260px;
  max-width: 100%;
  /* ベゼルを少し厚くして曲面の表面積を確保 */
  padding: 12px;
  border-radius: 40px;
  /* メタリックグラデーション（微調整） */
  background: linear-gradient(
    165deg,
    #404040 0%,
    #333333 15%,
    #2a2a2a 45%,
    #232323 75%,
    #1c1c1c 100%
  );
  box-shadow:
    /* 外側の影（浮遊感） */
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.35),
    /* 外縁キャッチライト — より強く */
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 2px 0 0 rgba(255, 255, 255, 0.10),
    /* 外縁 → 内側へのフォールオフ — blur を広げて曲面感を強調 */
    inset 0 8px 12px rgba(0, 0, 0, 0.25),
    inset 4px 0 8px rgba(0, 0, 0, 0.10),
    /* 下辺・右辺ダークエッジ */
    inset 0 -2px 0 rgba(0, 0, 0, 0.40),
    inset -2px 0 0 rgba(0, 0, 0, 0.15);
  transform: perspective(900px) rotateY(-2.5deg);
  transition: transform 0.4s ease;
  margin: 0 auto;
}

.device-mock:hover {
  transform: perspective(900px) rotateY(0deg);
}

/* ベゼル内側のハイライトリング（曲面の頂点を表現） */
.device-mock::after {
  content: '';
  position: absolute;
  /* padding(12px) の内側ぎりぎり */
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 29px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

/* Side buttons */
.device-mock__btn-power {
  position: absolute;
  right: -3px;
  top: 100px;
  width: 3px;
  height: 36px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(
    165deg,
    #484848 0%,
    #3a3a3a 40%,
    #2e2e2e 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.4);
}

.device-mock__btn-vol-up {
  position: absolute;
  left: -3px;
  top: 85px;
  width: 3px;
  height: 24px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(
    165deg,
    #484848 0%,
    #3a3a3a 40%,
    #2e2e2e 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 -1px 2px rgba(0, 0, 0, 0.3);
}

.device-mock__btn-vol-down {
  position: absolute;
  left: -3px;
  top: 118px;
  width: 3px;
  height: 24px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(
    165deg,
    #484848 0%,
    #3a3a3a 40%,
    #2e2e2e 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 -1px 2px rgba(0, 0, 0, 0.3);
}

/* Screen container */
.device-mock__screen {
  position: relative;
  border-radius: 29px;
  overflow: hidden;
  background: #000;
  /* スクリーンの沈み込み — より深く */
  border: 1.5px solid rgba(0, 0, 0, 0.7);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

/* Dynamic Island */
.device-mock__island {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 14px;
  background: #000;
  border-radius: 10px;
  z-index: 2;
  /* ガラスとの境界感 */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Screenshot image */
.device-mock__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Screen reflection overlay */
.device-mock__reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 15%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.03) 85%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
  border-radius: 27px;
}

/* --- About --- */
.about-text {
  max-width: 600px;
}

.about-text p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-text p + p {
  margin-top: 16px;
}

/* --- Contact --- */
.contact-desc {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 440px;
}

.contact-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--text-on-dark);
}

.btn--primary:hover {
  background: #333;
}

.btn--secondary {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn--secondary:hover {
  border-color: var(--text-secondary);
  background: var(--bg-surface);
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 60px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer-logo-mark {
  width: 28px;
  height: 28px;
  color: var(--text-on-dark-sub);
  margin: 0 auto 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-on-dark-sub);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-on-dark);
}

.footer-dot {
  color: var(--text-on-dark-sub);
  font-size: 13px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.4);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* Hero entrance */
.hero-badge {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-sub {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease 0.6s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: rgba(17, 17, 17, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 20px;
    color: var(--text-on-dark);
  }

  .hero {
    padding: 140px 24px 80px;
    min-height: auto;
  }

  .section {
    padding: 80px 24px;
  }

  .product-card {
    flex-direction: column-reverse;
    gap: 48px;
    align-items: flex-start;
  }

  .device-mock {
    width: 220px;
    padding: 10px;
    border-radius: 34px;
    transform: none;
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.5),
      0 4px 12px rgba(0, 0, 0, 0.3),
      inset 0 2px 0 rgba(255, 255, 255, 0.20),
      inset 1px 0 0 rgba(255, 255, 255, 0.08),
      inset 0 6px 10px rgba(0, 0, 0, 0.20),
      inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  }

  .device-mock:hover {
    transform: none;
  }

  .device-mock::after {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 25px;
  }

  .device-mock__screen {
    border-radius: 25px;
  }

  .device-mock__reflection {
    border-radius: 25px;
  }

  .device-mock__island {
    width: 40px;
    height: 12px;
    top: 6px;
  }

  .device-mock__btn-power,
  .device-mock__btn-vol-up,
  .device-mock__btn-vol-down {
    display: none;
  }

  .product-title {
    font-size: 28px;
  }

  .contact-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-sub {
    font-size: 16px;
  }

  .product-desc,
  .about-text p,
  .contact-desc {
    font-size: 15px;
  }

  .product-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .product-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
  }

  .device-mock {
    width: 180px;
    padding: 8px;
    border-radius: 28px;
  }

  .device-mock::after {
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 21px;
  }

  .device-mock__screen {
    border-radius: 21px;
  }

  .device-mock__reflection {
    border-radius: 21px;
  }

  .device-mock__island {
    width: 32px;
    height: 10px;
    top: 5px;
  }
}
