/* ============================================================
   Oboete — Marketing Site Stylesheet
   Japanese-modern editorial aesthetic: calm, premium, warm
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --ink: #1C1C1E;
  --paper: #FBF7EE;
  --cream: #FFF1CF;
  --red: #BA3C32;
  --red-soft: rgba(186, 60, 50, 0.10);
  --red-glow: rgba(186, 60, 50, 0.06);
  --purple: #8B81C3;
  --green: #6B9F78;
  --card: #FFFFFF;
  --card-shadow: 0 4px 24px rgba(28, 28, 30, 0.06);
  --card-shadow-hover: 0 8px 32px rgba(28, 28, 30, 0.10);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Zen Maru Gothic", "M PLUS Rounded 1c", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans", system-ui, sans-serif;
  --max-w: 1120px;
  --max-w-narrow: 760px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 72px;
  --space-2xl: 96px;
}

/* --- Dark mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F0EDE6;
    --paper: #141413;
    --cream: #1E1D1A;
    --card: #1E1D1A;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.30);
    --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.40);
    --red-soft: rgba(186, 60, 50, 0.18);
    --red-glow: rgba(186, 60, 50, 0.10);
  }
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

/* --- Utility --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-md); }
.container--narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--space-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Fade-in on scroll — progressive enhancement: only hide when JS is active */
.js .fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js .fade-in { opacity: 1; transform: none; transition: none; }
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(186, 60, 50, 0.25);
}
.btn--primary:hover { box-shadow: 0 6px 24px rgba(186, 60, 50, 0.35); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }

.btn--sm { padding: 10px 22px; font-size: 14px; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 238, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28, 28, 30, 0.06);
  transition: background 0.3s;
}
@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(20, 20, 19, 0.85);
    border-bottom-color: rgba(240, 237, 230, 0.08);
  }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.site-logo img { width: 36px; height: 36px; border-radius: 8px; }
.site-logo:hover { opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* Hamburger (mobile) */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { display: block; }
.nav-toggle line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; transition: transform 0.3s, opacity 0.3s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-lg);
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 200;
  }
  .nav-links a { font-size: 22px; opacity: 1; }
  .nav-links.is-open { opacity: 1; pointer-events: auto; }
  .nav-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-close svg { display: block; }
  .nav-close line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
}
@media (min-width: 721px) {
  .nav-close { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-xl) 0 var(--space-2xl);
}

/* Rising-sun circle motif */
.hero__sun {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(186, 60, 50, 0.12) 0%, rgba(186, 60, 50, 0) 70%);
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 900px) {
  .hero__sun { width: 800px; height: 800px; top: -160px; }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.hero__text { flex: 1; min-width: 0; }

.hero__wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.hero__title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero__desc {
  font-size: 18px;
  opacity: 0.72;
  max-width: 480px;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.hero__phone {
  flex: 0 0 auto;
  width: 280px;
}
.hero__phone img {
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(28, 28, 30, 0.12);
}

@media (max-width: 820px) {
  .hero .container { flex-direction: column; text-align: center; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__phone { width: 220px; }
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
  padding: var(--space-2xl) 0;
}
.section--alt {
  background: var(--cream);
}
@media (prefers-color-scheme: dark) {
  .section--alt { background: var(--cream); }
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  margin-bottom: var(--space-xs);
}

.section__title {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: var(--space-lg);
}

.section__title--center,
.section__eyebrow--center { text-align: center; }

/* Thin ensō-style divider */
.divider-enso {
  display: flex;
  justify-content: center;
  padding: var(--space-lg) 0;
}
.divider-enso svg { opacity: 0.12; }

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-md) var(--space-md);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}
.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}
.feature-card__icon svg { width: 24px; height: 24px; }

.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature-card__desc {
  font-size: 15px;
  opacity: 0.68;
  line-height: 1.65;
}

/* ============================================================
   SCREENSHOTS
   ============================================================ */
.screenshots-row {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-sm) 0 var(--space-md);
  scrollbar-width: none;
}
.screenshots-row::-webkit-scrollbar { display: none; }

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
  width: 220px;
}
.screenshot-item img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(28, 28, 30, 0.10);
  transition: transform 0.3s;
}
.screenshot-item img:hover { transform: scale(1.03); }
.screenshot-item figcaption {
  margin-top: var(--space-sm);
  font-size: 14px;
  opacity: 0.6;
  font-weight: 500;
}

@media (min-width: 1080px) {
  .screenshots-row {
    justify-content: center;
    overflow-x: visible;
  }
}

/* ============================================================
   HOW IT WORKS — STEPS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}
.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.step__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step__desc {
  font-size: 15px;
  opacity: 0.68;
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Step connector arrows (desktop) */
.step-arrow {
  display: none;
  align-self: center;
  justify-self: center;
}
@media (min-width: 800px) {
  .steps--with-arrows {
    grid-template-columns: 1fr auto 1fr auto 1fr;
  }
  .step-arrow {
    display: flex;
    align-items: center;
    color: var(--red);
    opacity: 0.35;
    font-size: 28px;
    padding-bottom: 36px;
  }
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
}
.pricing-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.pricing-card--featured {
  border: 2px solid var(--red);
}
.pricing-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 50px;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pricing-card__price {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--red);
  margin-bottom: var(--space-sm);
}
.pricing-card__price span { font-size: 16px; font-weight: 400; opacity: 0.6; }

.pricing-card__features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-md);
}
.pricing-card__features li {
  padding: 6px 0;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pricing-card__features li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: var(--green);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid rgba(28, 28, 30, 0.08);
  padding: var(--space-lg) 0;
}
@media (prefers-color-scheme: dark) {
  .site-footer { border-top-color: rgba(240, 237, 230, 0.08); }
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
}
.footer-links a { font-size: 14px; color: var(--ink); opacity: 0.55; }
.footer-links a:hover { opacity: 1; }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 13px;
  opacity: 0.4;
  margin-top: var(--space-sm);
}

/* ============================================================
   LEGAL / SUPPORT PAGES (prose layout)
   ============================================================ */
.prose {
  padding: var(--space-xl) 0 var(--space-2xl);
}
.prose h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 4px;
}
.prose .prose__sub {
  color: var(--red);
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: var(--space-lg);
}
.prose h2 {
  font-size: 20px;
  color: var(--red);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}
.prose h3 {
  font-size: 18px;
  margin-top: var(--space-md);
  margin-bottom: 4px;
}
.prose p, .prose li {
  font-size: 16px;
  margin-top: var(--space-xs);
  line-height: 1.8;
}
.prose ul { padding-left: 20px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose .support-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--card-shadow);
  margin: var(--space-md) 0;
}
