/* ===========================
   Clippist — Apple Design System (DESIGN.md準拠)
   Primary: #0066cc  Canvas: #ffffff  Parchment: #f5f5f7
   Ink: #1d1d1f  Tile-dark: #272729
   =========================== */

:root {
  /* Colors — from DESIGN.md */
  --color-primary:            #0066cc;
  --color-primary-focus:      #0071e3;
  --color-primary-on-dark:    #2997ff;
  --color-ink:                #1d1d1f;
  --color-ink-muted-80:       #333333;
  --color-ink-muted-48:       #7a7a7a;
  --color-body-muted:         #cccccc;
  --color-on-dark:            #ffffff;
  --color-canvas:             #ffffff;
  --color-canvas-parchment:   #f5f5f7;
  --color-surface-pearl:      #fafafc;
  --color-surface-tile-1:     #272729;
  --color-surface-tile-2:     #2a2a2c;
  --color-surface-black:      #000000;
  --color-hairline:           #e0e0e0;
  --color-divider-soft:       #f0f0f0;

  /* Typography */
  --font-display:  "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-text:     "SF Pro Text",    system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono:     ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing */
  --space-xxs: 4px;
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  17px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-xxl: 48px;
  --space-section: 80px;

  /* Radius */
  --radius-none: 0px;
  --radius-xs:   5px;
  --radius-sm:   8px;
  --radius-md:   11px;
  --radius-lg:   18px;
  --radius-pill: 9999px;

  /* Nav */
  --nav-height: 44px;
  --container-text: 980px;
  --container-wide: 1440px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-ink);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.75; }

/* ===========================
   Typography helpers
   =========================== */

/* hero-display: 56px / 600 / 1.07 / -0.28px */
.t-hero {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5vw, 3.5rem); /* 34px → 56px */
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  color: inherit;
}

/* display-lg: 40px / 600 / 1.10 */
.t-display {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.5rem); /* 32px → 40px */
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: 0;
  color: inherit;
}

/* lead: 28px / 400 / 1.14 / 0.196px */
.t-lead {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2vw, 1.75rem); /* 17px → 28px */
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.196px;
  color: inherit;
}

/* tagline: 21px / 600 / 1.19 */
.t-tagline {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: inherit;
}

/* caption: 14px / 400 / 1.43 / -0.224px */
.t-caption {
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: inherit;
}

/* fine-print: 12px / 400 / 1.0 / -0.12px */
.t-fine {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.12px;
}

/* nav-link: 12px / 400 / 1.0 / -0.12px */
.t-nav {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.12px;
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-center { text-align: center; }

/* ===========================
   Tile sections — edge-to-edge, alternating
   =========================== */
.tile {
  width: 100%;
  padding: var(--space-section) 0;
}

/* Light tile */
.tile-light {
  background: var(--color-canvas);
  color: var(--color-ink);
}

/* Parchment tile */
.tile-parchment {
  background: var(--color-canvas-parchment);
  color: var(--color-ink);
}

/* Dark tile */
.tile-dark {
  background: var(--color-surface-tile-1);
  color: var(--color-on-dark);
}

.tile-dark p,
.tile-dark .t-lead {
  color: var(--color-body-muted);
}

.tile-dark a {
  color: var(--color-primary-on-dark);
}

/* ===========================
   Global Nav — true black, 44px
   =========================== */
.global-nav {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-on-dark);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-brand:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: #fff;
  opacity: 1;
}
.nav-links a.nav-cta {
  color: var(--color-primary-on-dark);
}
.nav-links a.nav-cta:hover {
  color: #fff;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 18px;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.25s ease;
}
.nav-hamburger span:nth-child(1) { top: 0; }
.nav-hamburger span:nth-child(2) { top: 8px; }
.nav-hamburger span:nth-child(3) { top: 16px; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg); top: 8px; }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg); top: 8px; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 9998;
  padding: var(--space-md) var(--space-lg) var(--space-xl);
  flex-direction: column;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  padding: 13px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  display: block;
}
.mobile-menu a:last-child {
  border-bottom: none;
  color: var(--color-primary-on-dark);
}

/* ===========================
   Buttons
   =========================== */

/* button-primary — Action Blue pill */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}
.btn-primary:hover {
  background: var(--color-primary-focus);
  opacity: 1;
}
.btn-primary:active {
  transform: scale(0.95);
}

/* button-store-hero — larger store CTA */
.btn-store-hero {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-text);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.0;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}
.btn-store-hero:hover {
  background: var(--color-primary-focus);
  opacity: 1;
}
.btn-store-hero:active { transform: scale(0.95); }

/* ===========================
   Hero Tile
   =========================== */
.hero-tile {
  background: var(--color-canvas);
  color: var(--color-ink);
  padding: calc(var(--space-section) + 16px) 0 var(--space-section);
  text-align: center;
  overflow: hidden;
}

.hero-tile h1 {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  color: var(--color-ink);
  max-width: 800px;
  margin: 0 auto var(--space-md);
}

.hero-tile .hero-lead {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: 0.196px;
  color: var(--color-ink-muted-48);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
}

.hero-screenshot {
  margin: 48px auto 0;
  max-width: 880px;
  padding: 0 var(--space-lg);
}

.hero-screenshot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  /* The ONE system drop-shadow — product resting on a surface */
  box-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
}

/* ===========================
   Section headings inside tiles
   =========================== */
.tile h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: 0;
  color: inherit;
  margin-bottom: var(--space-md);
}

.tile .section-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.196px;
  color: var(--color-ink-muted-48);
  max-width: 560px;
  margin: 0 auto;
}

.tile-dark .section-tagline {
  color: var(--color-body-muted);
}

/* ===========================
   Product screenshot in section
   =========================== */
.section-screenshot {
  margin: var(--space-xxl) auto 0;
  max-width: 880px;
}
.section-screenshot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
}

/* ===========================
   Features Grid — store-utility-card style
   =========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: var(--space-xxl);
}

.feature-card {
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: left;
  transition: box-shadow 0.2s ease;
}

.tile-parchment .feature-card {
  background: var(--color-canvas);
}

.feature-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.feature-card h3 {
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  color: var(--color-ink);
  margin-bottom: var(--space-xs);
}

.feature-card p {
  font-size: 0.9375rem;
  line-height: 1.47;
  color: var(--color-ink-muted-48);
  margin: 0;
}

/* ===========================
   Migration Steps
   =========================== */
.migration-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 540px;
  margin: var(--space-xxl) auto 0;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
}

.tile-dark .step-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}

.tile-parchment .step-item,
.tile-light .step-item {
  background: var(--color-canvas);
  border-color: var(--color-hairline);
}

.step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: inherit;
}

/* ===========================
   FAQ
   =========================== */
.faq-list {
  max-width: 640px;
  margin: var(--space-xxl) auto 0;
  text-align: left;
}

.faq-item {
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
  padding: var(--space-lg) 0;
}

.tile-light .faq-item,
.tile-parchment .faq-item {
  border-bottom-color: var(--color-hairline);
}

.faq-item:first-child {
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
}
.tile-light .faq-item:first-child,
.tile-parchment .faq-item:first-child {
  border-top-color: var(--color-hairline);
}

.faq-question {
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  color: inherit;
  margin-bottom: var(--space-xs);
}

.faq-answer {
  font-size: 1rem;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-ink-muted-48);
  margin: 0;
}

.tile-dark .faq-answer {
  color: var(--color-body-muted);
}

/* ===========================
   Final CTA tile
   =========================== */
.final-cta-tile {
  padding: calc(var(--space-section) + var(--space-xxl)) 0;
  text-align: center;
}

.final-cta-tile h2 {
  margin-bottom: var(--space-md);
}

.final-cta-tile p {
  margin-bottom: var(--space-xl);
  color: var(--color-ink-muted-48);
}

/* ===========================
   Footer — canvas-parchment
   =========================== */
footer {
  background: var(--color-canvas-parchment);
  padding: var(--space-xxl) 0 var(--space-xl);
  border-top: 0.5px solid var(--color-hairline);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer-links a {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.12px;
  color: var(--color-ink-muted-80);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--color-ink);
  opacity: 1;
}

.footer-copyright {
  text-align: center;
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.12px;
  color: var(--color-ink-muted-48);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tile h1    { animation: fadeInUp 0.7s ease-out both; }
.hero-tile .hero-lead { animation: fadeInUp 0.7s ease-out 0.1s both; }
.hero-tile .btn-store-hero { animation: fadeInUp 0.7s ease-out 0.2s both; }
.hero-screenshot { animation: fadeInUp 0.9s ease-out 0.35s both; }

/* ===========================
   Responsive
   =========================== */

/* 1068px: small desktop */
@media (max-width: 1068px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 834px: tablet landscape → hamburger */
@media (max-width: 834px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .mobile-menu { display: flex; }

  .tile { padding: 60px 0; }
  .final-cta-tile { padding: 80px 0; }

  .hero-tile {
    padding-top: 56px;
    padding-bottom: 60px;
  }
}

/* 640px: phone */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .tile { padding: 52px 0; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-screenshot,
  .section-screenshot {
    padding: 0;
  }

  .migration-steps { max-width: 100%; }

  .container { padding: 0 var(--space-md); }
}

/* 419px: small phone */
@media (max-width: 419px) {
  .container { padding: 0 var(--space-sm); }
}
