/* =============================================================================
   ZENSHIN — Marketing Site
   =============================================================================
   Sections:
   1.  Variables
   2.  Reset & base
   3.  Typography helpers
   4.  Layout utilities
   5.  Buttons
   6.  App Store badge
   7.  Phone device frame
   8.  Navigation
   9.  Hero
   10. Features intro
   11. Feature sections
   12. Privacy band
   13. CTA
   14. Footer
   15. Privacy page
   16. Scroll-reveal animations
   17. Responsive — tablet (≥768px)
   18. Responsive — desktop (≥1024px)
   ============================================================================= */


/* ─── 1. Variables ─────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --bg:          #FAF7F2;
  --bg-alt:      #F0EBE1;
  --green:       #2B3A34;
  --green-deep:  #1D2820;
  --amber:       #C4842E;
  --amber-hover: #AE7329;
  --text:        #2B2520;
  --text-2:      #6B5E57;
  --text-3:      #9A8E87;
  --border:      rgba(43, 37, 32, 0.09);

  /* Spacing */
  --nav-h:        64px;
  --max-w:        1100px;
  --pad-x:        clamp(1.25rem, 5vw, 3.5rem);
  --section-v:    clamp(4.5rem, 9vw, 8rem);

  /* Misc */
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t:           0.3s var(--ease);
}


/* ─── 2. Reset & base ──────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

ul { list-style: none; }

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

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}


/* ─── 3. Typography helpers ────────────────────────────────────────────────── */

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

p { max-width: 56ch; }

.eyebrow {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.02em;
  line-height: 1;
}

.section-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.section-tag-light { color: rgba(250, 247, 242, 0.55); }


/* ─── 4. Layout ────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: calc(var(--max-w) + var(--pad-x) * 2);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}


/* ─── 5. Buttons ───────────────────────────────────────────────────────────── */

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.125rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.btn-nav:hover {
  background: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(43, 37, 32, 0.22);
}

.btn-mobile-cta {
  display: block;
  padding: 0.875rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}


/* ─── 6. App Store badge ───────────────────────────────────────────────────── */

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 13px;
  transition: transform var(--t), box-shadow var(--t);
}
.app-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(43, 37, 32, 0.22);
}

.app-badge-apple {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.app-badge-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.app-badge-pre {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.75;
}
.app-badge-main {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-badge-large { padding: 13px 26px; }
.app-badge-large .app-badge-apple { width: 28px; height: 28px; }
.app-badge-large .app-badge-main  { font-size: 1.25rem; }


/* ─── 7. Phone device frame ────────────────────────────────────────────────── */

.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(256px, 100%);
  aspect-ratio: 390 / 844;

  /* Dark bezel */
  background: linear-gradient(160deg, #222018 0%, #161310 100%);
  border-radius: 44px;

  /* Layered shadow for depth */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 1px rgba(0,0,0,0.45),
    0 20px 60px rgba(0,0,0,0.22),
    0 40px 100px rgba(0,0,0,0.14);

  overflow: hidden;
  transition: transform 0.65s var(--ease);
}
.phone:hover { transform: translateY(-8px) rotate(0.8deg); }

/* Dynamic Island pill */
.phone::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 7px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
}

.phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: inherit;
}

/* Hero phone — slightly larger */
.phone-wrap-hero .phone { width: min(288px, 88%); }


/* ─── 8. Navigation ────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 247, 242, 0.68);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}

.nav.scrolled {
  background: rgba(250, 247, 242, 0.92);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  height: 100%;
  max-width: calc(var(--max-w) + var(--pad-x) * 2);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Wordmark */
.nav-wordmark {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
}
.nav-kanji {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
}
.nav-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

/* Desktop links */
.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t);
}
.nav-links a:hover { color: var(--text); }

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--t);
}
.nav-toggle:hover { background: rgba(43,37,32,0.07); }
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 99;
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem var(--pad-x) 1.5rem;

  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.32s var(--ease),
    opacity   0.28s ease,
    visibility 0.32s;
}
.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-mobile li a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color var(--t);
}
.nav-mobile li:last-child a { border-bottom: none; }


/* ─── 9. Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3rem, 6vw, 4rem);
}

.hero-text {
  max-width: 580px;
  text-align: center;
}

.hero-headline {
  font-size: clamp(2.75rem, 8.5vw, 5.5rem);
  margin: 1.125rem 0 1.25rem;
  color: var(--text);
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 auto 2.25rem;
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}

.hero-visual { width: 100%; }


/* ─── 10. Features intro ───────────────────────────────────────────────────── */

.features-intro {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}

.features-headline {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin: 0 auto;
  max-width: 18ch;
  color: var(--text);
}


/* ─── 11. Feature sections ─────────────────────────────────────────────────── */

.feature {
  padding: var(--section-v) 0;
}

.feature-alt { background: var(--bg-alt); }

/* Mobile: stacked, text always first */
.feature-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  align-items: center;
}

.feature-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.875rem;
}

.feature-headline {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  color: var(--text);
  margin-bottom: 1.25rem;
}

.feature-body {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text-2);
  max-width: 46ch;
  margin-bottom: 0.625rem;
}
.feature-body:last-child { margin-bottom: 0; }


/* ─── 12. Privacy band ─────────────────────────────────────────────────────── */

.privacy-band {
  background: var(--green);
  padding: var(--section-v) 0;
  color: #F5F0E8;
}

.privacy-band-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 4.5rem);
}

.privacy-band-headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: #F5F0E8;
}

.pillars {
  display: grid;
  gap: 2.5rem;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  color: rgba(245, 240, 232, 0.85);
  flex-shrink: 0;
}

.pillar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #F5F0E8;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.pillar-body {
  font-size: 0.9375rem;
  line-height: 1.68;
  color: rgba(245, 240, 232, 0.62);
  max-width: 38ch;
}


/* ─── 13. CTA ──────────────────────────────────────────────────────────────── */

.cta {
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(4rem, 8vw, 7rem);
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
}

.cta-headline {
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  color: var(--text);
  max-width: none;
}

.cta-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 44ch;
}

.cta-badge { margin-top: 0.375rem; }

.requires-note {
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}


/* ─── 14. Footer ───────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.125rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer-kanji {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--amber);
}
.footer-wordmark {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color var(--t);
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-3);
  max-width: 58ch;
  line-height: 1.55;
  text-align: center;
}


/* ─── 15. Privacy page ─────────────────────────────────────────────────────── */

.privacy-page {
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 6rem;
}

.privacy-page .container { max-width: calc(680px + var(--pad-x) * 2); }

.privacy-page h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.privacy-meta {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 3rem;
  max-width: none;
}

.privacy-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
}

.privacy-content p,
.privacy-content li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 0.875rem;
}

.privacy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.875rem;
}

.privacy-placeholder {
  background: var(--bg-alt);
  border: 1.5px dashed rgba(43, 37, 32, 0.18);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
  color: var(--text-3);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.6;
}

.privacy-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--amber);
  margin-bottom: 2.5rem;
  transition: gap var(--t);
}
.privacy-back:hover { gap: 0.75rem; }


/* ─── 16. Scroll-reveal ────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.7s var(--ease),
    transform 0.7s var(--ease);
}

[data-reveal][data-delay="1"] { transition-delay: 0.10s; }
[data-reveal][data-delay="2"] { transition-delay: 0.20s; }
[data-reveal][data-delay="3"] { transition-delay: 0.30s; }
[data-reveal][data-delay="4"] { transition-delay: 0.42s; }

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  .phone { transition: none; }
  .phone:hover { transform: none; }
}


/* ─── 17. Responsive — tablet ≥768px ──────────────────────────────────────── */

@media (min-width: 768px) {

  /* Nav */
  .nav-links  { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none; }

  /* Hero */
  .hero-inner {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 2rem;
  }
  .hero-text { flex: 1 1 54%; text-align: left; }
  .hero-sub  { margin-left: 0; margin-right: 0; }
  .hero-cta  { align-items: flex-start; }
  .hero-visual { flex: 0 0 42%; }

  /* Features */
  .feature-inner {
    flex-direction: row;
    align-items: center;
    gap: clamp(3rem, 6vw, 5.5rem);
  }
  .feature-inner-rev { flex-direction: row-reverse; }
  .feature-text   { flex: 1 1 50%; }
  .feature-visual { flex: 0 0 42%; }

  /* Privacy pillars */
  .pillars { grid-template-columns: repeat(3, 1fr); gap: 3rem; }

  /* Footer */
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    text-align: left;
    gap: 0.75rem 2rem;
  }
  .footer-brand       { grid-column: 1; }
  .footer-links       { grid-column: 2; justify-self: center; }
  .footer-copy        { grid-column: 3; justify-self: end; }
  .footer-disclaimer  { grid-column: 1 / -1; text-align: center; }
}


/* ─── 18. Responsive — desktop ≥1024px ────────────────────────────────────── */

@media (min-width: 1024px) {
  .phone-wrap-hero .phone { width: 310px; }

  .feature-visual .phone { width: min(272px, 100%); }
}
