/* =============================================
   shared.css — embroideryhub common styles
   ============================================= */

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

/* ── SHARED TOKENS ── */
:root {
  --bg: #F0EDE8;
  --bg-alt: #E8E5E0;
  --ink: #2A2523;
  --ink-muted: #6F6660;
  --ink-faint: #A69E97;
  --border: rgba(42, 37, 35, 0.09);
  --border-soft: rgba(42, 37, 35, 0.05);
  --shadow: 0 18px 40px rgba(42, 37, 35, 0.05);
  --heart: #EB6260;
  --px: 60px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  background: var(--bg);
}

body {
  font-family: "Nunito", sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-width: 360px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--px);
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 22%;
  box-shadow: 0 2px 6px rgba(42, 37, 35, 0.10);
}

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Download pill */
.nav-download {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}

.nav-download:hover {
  color: #fff !important;
  opacity: 0.85;
}

/* ── SHARED SECTION HEADER ── */
.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-header .sub {
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* ── APP PAGE: HERO ── */
.hero {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 61px);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 80px;
  max-width: 1200px;
  width: 100%;
  padding: 60px var(--px);
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
}

.hero-left h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-muted);
}

.appstore-btn {
  display: block;
  margin-top: 36px;
}

.appstore-icon {
  height: 52px;
  width: auto;
  display: block;
  transition: opacity 0.2s, transform 0.2s;
}

.appstore-icon:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.hero-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.app-screen {
  width: 100%;
  max-width: 520px;
  display: block;
}

/* ── APP PAGE: FEATURES ── */
.features-section {
  background: var(--accent);
  padding: 80px 0;
}

.features-section .section-header {
  padding: 0 var(--px);
  margin-bottom: 40px;
}

.features-section .section-header h2 {
  color: var(--bg);
}

.features-section .section-header .sub {
  color: var(--muted-dark);
}

.feat-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-clip-margin: 20px;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 28px;
  justify-content: safe center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.feat-card:first-child { margin-left: 16px; }
.feat-card:last-child  { margin-right: 16px; }

.feat-grid::-webkit-scrollbar {
  height: 4px;
}

.feat-grid::-webkit-scrollbar-track {
  background: transparent;
}

.feat-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.feat-card {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  flex-shrink: 0;
  width: 300px;
  gap: 24px;
  padding: 28px 24px 32px;
  background: var(--bg);
  border: none;
  border-radius: 24px;
  scroll-snap-align: start;
  box-shadow: 0 2px 16px rgba(42, 37, 35, 0.05);
}

.feat-card-img-wrap {
  width: 210px;
  flex-shrink: 0;
  border-radius: 22px;
  overflow: hidden;
}

.feat-card-img {
  width: 100%;
  display: block;
}

.feat-card-body {
  text-align: center;
}

.feat-card-body h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feat-card-body p {
  font-size: 0.85rem;
  line-height: 1.72;
  color: var(--ink-muted);
}

/* ── APP PAGE: HOW IT WORKS ── */
.howitworks-section {
  background: var(--bg);
  padding: 100px var(--px) 110px;
  position: relative;
  z-index: 1;
}

.video-wrap {
  max-width: 780px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  transform: translateZ(0);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  aspect-ratio: 16 / 9;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ── FOOTER ── */
footer {
  background: var(--bg);
  padding: 28px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--ink);
}

.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 0.8;
}

.social-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.footer-copy .heart {
  color: var(--heart);
}

.footer-line {
  white-space: nowrap;
}

.footer-dot {
  white-space: nowrap;
}


.footer-brand {
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-brand span {
  color: var(--heart);
}

.footer-brand:hover {
  opacity: 0.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  :root { --px: 32px; }

  .nav-links a:not(.nav-download):not(.nav-always) {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 48px;
    padding: 56px var(--px);
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }

  .app-screen {
    max-width: 480px;
  }

  .feat-card {
    width: 320px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .footer-copy {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  :root { --px: 24px; }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 48px;
    padding: 56px var(--px);
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }

  .app-screen {
    max-width: 100%;
  }

  .feat-card {
    width: 280px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .footer-copy {
    margin-top: 0;
  }

  .footer-dot {
    display: none;
  }

  .footer-copy .footer-line {
    display: block;
  }

  .nav-links a:not(.nav-download):not(.nav-always) {
    display: none;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 0.85rem;
  }

  .logo-icon {
    width: 26px;
    height: 26px;
  }
}
