/* ============================================
   Notesweep — Product Page Styles
   Design: Apple-inspired, Inter, clean
   ============================================ */

/* --- Self-hosted Inter Font --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.ttf') format('truetype');
}

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

:root {
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-text: #1D1D1F;
  --color-text-secondary: #636366;
  --color-accent: #007AFF;
  --color-accent-hover: #0066DD;
  --color-accent-subtle: #E8F0FE;
  --color-success: #30D158;
  --color-warm: #F5F0EB;
  --color-divider: #D2D2D7;

  --content-width: 720px;
  --wide-width: 960px;
  --max-width: 1120px;
  --section-padding: clamp(4rem, 8vw, 8rem);

  --shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-medium: 0 24px 48px rgba(0,0,0,0.12);
  --shadow-screenshot: 0 24px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);

  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --radius-screenshot: 10px;

  --font-display: 'Inter', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1A1A1E;
    --color-surface: #2A2A2E;
    --color-text: #F5F5F7;
    --color-text-secondary: #A1A1A6;
    --color-accent: #0A84FF;
    --color-accent-hover: #409CFF;
    --color-accent-subtle: #1C3A5C;
    --color-warm: #252520;
    --color-divider: #38383A;
    --shadow-screenshot: 0 24px 48px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  }
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-small {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.container--narrow {
  max-width: var(--content-width);
}

.container--wide {
  max-width: var(--wide-width);
}

section {
  padding: var(--section-padding) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-divider);
  transition: background 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(26, 26, 30, 0.8);
  }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

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

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

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 980px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.nav__cta:hover {
  background: var(--color-accent-hover);
  color: #fff !important;
}

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

.nav__lang {
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav__lang:hover {
  opacity: 1;
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

@media (max-width: 600px) {
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: block;
  }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--color-divider);
  }
}

/* --- Hero --- */
.hero {
  padding-top: calc(52px + clamp(4rem, 10vw, 8rem));
  padding-bottom: 0;
  text-align: center;
}

.hero__content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.btn-appstore {
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-appstore:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.btn-appstore svg {
  height: 48px;
  width: auto;
}

.hero__screenshot {
  max-width: var(--wide-width);
  margin: 0 auto;
  perspective: 1200px;
}

.hero__screenshot img,
.hero__screenshot .screenshot-placeholder {
  border-radius: var(--radius-screenshot);
  box-shadow: var(--shadow-screenshot);
  transform: rotateY(-2deg) rotateX(1deg);
  transition: transform 0.4s ease;
}

.hero__screenshot:hover img,
.hero__screenshot:hover .screenshot-placeholder {
  transform: rotateY(0) rotateX(0);
}

/* Screenshot placeholder (until real screenshots exist) */
.screenshot-placeholder {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-screenshot);
  overflow: hidden;
}

.screenshot-placeholder__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
}

.screenshot-placeholder__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.screenshot-placeholder__dot--red { background: #FF5F57; }
.screenshot-placeholder__dot--yellow { background: #FFBD2E; }
.screenshot-placeholder__dot--green { background: #28C840; }

.screenshot-placeholder__body {
  display: grid;
  grid-template-columns: 200px 1fr 260px;
  min-height: 420px;
}

.screenshot-placeholder__sidebar {
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.screenshot-placeholder__main {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.screenshot-placeholder__inspector {
  padding: 1.5rem 1rem;
  border-left: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skel {
  background: var(--color-divider);
  border-radius: 4px;
  opacity: 0.5;
}

.skel--text { height: 12px; }
.skel--text-short { height: 12px; width: 60%; }
.skel--block { height: 40px; }
.skel--block-tall { height: 80px; }
.skel--circle { width: 32px; height: 32px; border-radius: 50%; }
.skel--accent { background: var(--color-accent); opacity: 0.3; }

@media (max-width: 768px) {
  .screenshot-placeholder__body {
    grid-template-columns: 1fr;
  }
  .screenshot-placeholder__sidebar,
  .screenshot-placeholder__inspector {
    display: none;
  }
}

/* --- Trust Bar --- */
.trust {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--color-warm);
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--wide-width);
  margin: 0 auto;
}

.trust__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.trust__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.trust__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust__text h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.trust__text p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .trust__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Features --- */
.feature {
  padding: var(--section-padding) 0;
}

.feature:nth-child(even) {
  background: var(--color-warm);
}

.feature__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.feature:nth-child(even) .feature__inner {
  direction: rtl;
}

.feature:nth-child(even) .feature__inner > * {
  direction: ltr;
}

.feature__content {
  max-width: 480px;
}

.feature__content .label {
  margin-bottom: 0.75rem;
  display: block;
}

.feature__content h2 {
  margin-bottom: 1rem;
}

.feature__content p {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.feature__content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature__content li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.feature__content li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  margin-top: 3px;
}

.feature__visual {
  display: flex;
  justify-content: center;
}

.feature__visual .screenshot-placeholder {
  width: 100%;
  max-width: 480px;
}

.feature__visual .screenshot-placeholder__body {
  min-height: 300px;
  grid-template-columns: 1fr;
}

@media (max-width: 768px) {
  .feature__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature:nth-child(even) .feature__inner {
    direction: ltr;
  }

  .feature__visual {
    order: -1;
  }
}

/* --- How It Works --- */
.steps {
  text-align: center;
}

.steps h2 {
  margin-bottom: 1rem;
}

.steps > .container > p {
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 3.5rem;
}

.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  position: relative;
}

.steps__grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: var(--color-divider);
}

.step {
  position: relative;
  z-index: 1;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .steps__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .steps__grid::before {
    display: none;
  }
}

/* --- System Requirements --- */
.specs {
  background: var(--color-warm);
}

.specs__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.specs__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.specs__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.specs__list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.specs__colors {
  text-align: center;
}

.specs__colors p {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.color-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot--indigo { background: #5856D6; }
.color-dot--blue { background: #007AFF; }
.color-dot--teal { background: #5AC8FA; }
.color-dot--green { background: #34C759; }
.color-dot--orange { background: #FF9500; }
.color-dot--pink { background: #FF2D55; }

@media (max-width: 768px) {
  .specs__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- CTA --- */
.cta {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: radial-gradient(ellipse at 50% 100%, var(--color-accent-subtle) 0%, transparent 70%);
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.cta__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta__by {
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.cta__by a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-divider);
  text-underline-offset: 3px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-divider);
  padding: 2rem 0;
}

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

.footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

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

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__screenshot img,
  .hero__screenshot .screenshot-placeholder {
    transform: none;
  }
  .hero__screenshot:hover img,
  .hero__screenshot:hover .screenshot-placeholder {
    transform: none;
  }
}

/* --- Legal Pages --- */
.legal {
  padding-top: calc(52px + 3rem);
  padding-bottom: 4rem;
}

.legal h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  max-width: 640px;
}

.legal a {
  color: var(--color-accent);
}

.legal ul {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
