/* ============================================
   App Showcase – Standalone Styles
   Completely independent from the blog theme
   ============================================ */

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

:root {
  --color-bg: #faf7f5;
  --color-surface: #f3ece7;
  --color-surface-2: #e8dfd9;
  --color-border: #e8dfd9;
  --color-text: #3d3532;
  --color-text-muted: #8c7e76;
  --color-primary: #c8564e;
  --color-primary-light: #b44a43;
  --color-accent: #d4956a;
  --color-accent-2: #c8564e;
  --color-success: #6a9e7e;
  --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Animated Background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(200, 86, 78, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 86, 78, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 86, 78, 0.5), transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.bg-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 149, 106, 0.4), transparent 70%);
  bottom: 20%;
  left: -200px;
  animation-delay: -7s;
}

.bg-orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200, 86, 78, 0.3), transparent 70%);
  top: 60%;
  right: -100px;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 40px) scale(0.95); }
  75% { transform: translate(30px, 20px) scale(1.02); }
}

/* ---------- Navigation ---------- */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(250, 247, 245, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 223, 217, 0.6);
}

.app-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.2s;
}

.app-nav__logo:hover {
  opacity: 0.8;
}

.app-nav__logo-icon {
  font-size: 0.8rem;
}

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.app-nav__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.app-nav__links a:hover {
  color: var(--color-text);
}

.app-nav__cta {
  background: var(--color-primary);
  color: #ffffff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}

.app-nav__cta:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(106, 158, 126, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(106, 158, 126, 0); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero__title-line {
  display: block;
}

.hero__title-accent {
  display: block;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero__stats {
  display: flex;
  gap: 3rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--color-text), var(--color-text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn__icon {
  width: 20px;
  height: 20px;
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(200, 86, 78, 0.25);
}

.btn--primary:hover {
  background: var(--color-primary-light);
  box-shadow: 0 8px 30px rgba(200, 86, 78, 0.35);
  transform: translateY(-2px);
}

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

.btn--secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

.btn--pc {
  background: var(--color-text);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(61, 53, 50, 0.2);
}

.btn--pc:hover {
  background: var(--color-text-muted);
  box-shadow: 0 8px 30px rgba(61, 53, 50, 0.3);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 14px;
}

.build-downloads {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

.build-downloads__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.build-downloads__version {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.build-downloads__folder {
  color: var(--color-primary);
  text-decoration: underline;
}

.build-downloads__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.build-downloads__note {
  margin: 1rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 8rem 2rem;
}

.section__container {
  max-width: 1100px;
  margin: 0 auto;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
}

/* ---------- Features ---------- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.feature-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(200, 86, 78, 0.08);
}

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: inline-block;
  animation: none;
}

.feature-card:hover .feature-card__icon {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.feature-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---------- Technology ---------- */
.tech__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tech-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease;
}

.tech-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tech-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 20px 60px rgba(212, 149, 106, 0.1);
}

.tech-card__number {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(200, 86, 78, 0.2), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.tech-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.tech-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.tech-card__bar {
  width: 100%;
  height: 4px;
  background: var(--color-surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.tech-card__bar-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 1.5s ease-out 0.3s;
}

.tech-card.is-visible .tech-card__bar-fill {
  width: var(--fill-width);
}

.tech-card__metric {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ---------- Screenshots (Phone Mockups) ---------- */
.screenshots__showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
  padding: 2rem 0;
}

.phone-mockup {
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.phone-mockup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.phone-mockup--center {
  transform: translateY(40px) scale(1);
}

.phone-mockup--center.is-visible {
  transform: translateY(-20px) scale(1.08);
}

.phone-mockup__frame {
  width: 260px;
  height: 520px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 36px;
  padding: 12px;
  position: relative;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

.phone-mockup--center .phone-mockup__frame {
  border-color: var(--color-primary);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.1),
    0 0 60px rgba(200, 86, 78, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

.phone-mockup__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: var(--color-bg);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.phone-mockup__screen--1 {
  background: linear-gradient(180deg, #faf7f5 0%, #f3ece7 100%);
}

.phone-mockup__screen--2 {
  background: linear-gradient(180deg, #f3ece7 0%, #efe6df 100%);
}

.phone-mockup__screen--3 {
  background: linear-gradient(180deg, #faf7f5 0%, #f3ece7 100%);
}

/* ---------- Mock UI inside phones ---------- */
.mock-ui {
  padding: 2.5rem 1rem 1rem;
  font-size: 0.7rem;
}

.mock-ui__header {
  margin-bottom: 1rem;
}

.mock-ui__greeting {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mock-ui__name {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.mock-ui__card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(232, 223, 217, 0.6);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}

.mock-ui__card--accent {
  background: linear-gradient(135deg, rgba(200, 86, 78, 0.1), rgba(212, 149, 106, 0.08));
  border-color: rgba(200, 86, 78, 0.2);
}

.mock-ui__card-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mock-ui__card-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 0.2rem 0;
}

.mock-ui__card-bar {
  height: 4px;
  background: rgba(61, 53, 50, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.mock-ui__card-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 4px;
}

.mock-ui__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mock-ui__mini-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(232, 223, 217, 0.5);
  border-radius: 10px;
  padding: 0.6rem;
  text-align: center;
}

.mock-ui__mini-icon {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.mock-ui__mini-value {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.mock-ui__mini-label {
  font-size: 0.55rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mock-ui__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mock-ui__list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.mock-ui__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mock-ui__dot--green { background: #6a9e7e; }
.mock-ui__dot--blue { background: #7ba8c4; }
.mock-ui__dot--purple { background: #c8564e; }

.mock-ui__chart {
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 0.5rem;
}

.mock-ui__chart-svg {
  width: 100%;
  height: auto;
}

.mock-ui__settings {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mock-ui__setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-size: 0.65rem;
}

.mock-ui__toggle {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--color-surface-2);
  position: relative;
  transition: background 0.2s;
}

.mock-ui__toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-text-muted);
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}

.mock-ui__toggle--on {
  background: var(--color-primary);
}

.mock-ui__toggle--on::after {
  transform: translateX(14px);
  background: #ffffff;
}

/* ---------- CTA Section ---------- */
.cta {
  text-align: center;
  padding: 10rem 2rem;
}

.cta__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 86, 78, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.cta__desc {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.cta__note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}

/* ---------- Footer ---------- */
.app-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 2rem;
}

.app-footer__container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-footer__links {
  display: flex;
  gap: 1.5rem;
}

.app-footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.app-footer__links a:hover {
  color: var(--color-text);
}

.app-footer__copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features__grid,
  .tech__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots__showcase {
    flex-direction: column;
    align-items: center;
  }

  .phone-mockup--center.is-visible {
    transform: translateY(0) scale(1.05);
  }
}

@media (max-width: 640px) {
  .app-nav {
    padding: 0.75rem 1rem;
  }

  .app-nav__links {
    gap: 1rem;
  }

  .app-nav__links a:not(.app-nav__cta) {
    display: none;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }

  .hero__stats {
    gap: 2rem;
  }

  .features__grid,
  .tech__grid {
    grid-template-columns: 1fr;
  }

  .phone-mockup__frame {
    width: 220px;
    height: 440px;
  }

  .app-footer__container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 5rem 1.5rem;
  }
}
