/* ============================================================
   Python365.ai — Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── TOKENS ── */
:root {
  --bg:            #f8f7f4;
  --surface:       #ffffff;
  --surface-2:     #f1f0ec;
  --text:          #1a1a18;
  --text-muted:    #6b6b65;
  --text-light:    #9b9b93;
  --accent:        #2563eb;
  --accent-light:  #eff4ff;
  --accent-hover:  #1d4ed8;
  --py-yellow:     #f7d44c;
  --py-blue:       #3776ab;
  --border:        #e5e4df;
  --border-strong: #d0cfc9;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover:  0 4px 12px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.08);
  --nav-h:         64px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.nav {
  background: rgba(248,247,244,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__logo-mark {
  width: 36px; height: 36px;
  background: var(--py-blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--py-yellow);
  flex-shrink: 0;
}
.nav__logo-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
}
.nav__logo-text span { color: var(--py-blue); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}
.nav__links a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
  white-space: nowrap;
}
.nav__links a:hover,
.nav__links a.active { color: var(--text); }
.nav__links .nav__cta {
  background: var(--text);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background .2s;
}
.nav__links .nav__cta:hover { background: var(--py-blue); color: #fff; }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  padding: .5rem 0 1rem;
}
.nav__mobile a {
  padding: .65rem 0;
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile.open { display: flex; }

/* ── SECTION WRAPPER ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 2rem;
}
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

/* ── SECTION HEADER ── */
.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 1rem;
}
.section__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--py-blue);
  margin-bottom: 6px;
}
.section__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.section__subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 300;
}
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap .18s;
}
.view-all:hover { gap: 10px; }

/* ── HORIZONTAL SCROLL ROW ── */
.scroll-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ── CARD BASE ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: all .22s ease;
  position: relative;
  cursor: pointer;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--py-yellow), var(--py-blue));
  transform: scaleX(0);
  transition: transform .22s ease;
  transform-origin: left;
}
.card:hover::after { transform: scaleX(1); }

/* Video / Article card */
.card--media { width: 300px; }
.card--media .card__thumb {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: var(--surface-2);
}
.card__thumb-placeholder {
  width: 100%;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--surface-2);
}
.card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  width: fit-content;
  background: var(--accent-light);
  color: var(--accent);
}
.card__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.card__excerpt {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card__date {
  font-size: .75rem;
  color: var(--text-light);
}
.card__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap .18s;
}
.card__btn:hover { gap: 8px; }

/* Post card (text only) */
.card--post { width: 280px; }
.card--post .card__body { height: 100%; min-height: 160px; }

/* Quick Bytes card */
.card--reel { width: 200px; }
.card--reel .card__thumb {
  height: 280px;
  object-fit: cover;
  background: var(--surface-2);
  position: relative;
}
.card--reel .card__thumb-placeholder {
  height: 280px;
  flex-direction: column;
  gap: 8px;
  font-size: 2rem;
}
.platform-badge {
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.badge--youtube  { background: #ff0000; }
.badge--instagram{ background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.badge--tiktok   { background: #010101; }
.badge--facebook { background: #1877f2; }

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card {
  width: 300px;
  height: 320px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  width: 100%;
}
.empty-state strong {
  display: block;
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 6px;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 2rem;
}

/* ── NEWSLETTER ── */
.newsletter {
  background: var(--text);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: 'Py';
  position: absolute;
  right: -30px; top: -40px;
  font-family: 'DM Serif Display', serif;
  font-size: 18rem;
  color: rgba(255,255,255,.03);
  pointer-events: none;
  line-height: 1;
}
.newsletter__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}
.newsletter__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--py-yellow);
  margin-bottom: 10px;
}
.newsletter h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}
.newsletter p {
  font-size: .95rem;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  font-weight: 300;
  max-width: 480px;
}
.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 300px;
}
.newsletter__form input {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: .9rem;
  color: #fff;
  outline: none;
  transition: border-color .2s;
}
.newsletter__form input::placeholder { color: rgba(255,255,255,.35); }
.newsletter__form input:focus { border-color: var(--py-yellow); }
.newsletter__form button {
  background: var(--py-yellow);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
}
.newsletter__form button:hover { background: #f0c92b; transform: translateY(-1px); }
.newsletter__form button:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.newsletter__li-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0a66c2;
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .18s;
  width: 100%;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.newsletter__li-btn:hover { background: #095aa7; transform: translateY(-1px); }
.newsletter__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.3);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.newsletter__divider::before,
.newsletter__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.12);
}
.newsletter__note {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  text-align: center;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 2rem;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: .82rem;
  color: var(--text-light);
}
.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: .82rem;
  color: var(--text-light);
  transition: color .2s;
}
.footer__links a:hover { color: var(--text); }

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .55s ease forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.fade-up:nth-child(1) { animation-delay: .05s; }
.fade-up:nth-child(2) { animation-delay: .10s; }
.fade-up:nth-child(3) { animation-delay: .15s; }
.fade-up:nth-child(4) { animation-delay: .20s; }
.fade-up:nth-child(5) { animation-delay: .25s; }
.fade-up:nth-child(6) { animation-delay: .30s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .newsletter__form { min-width: unset; }
}
@media (max-width: 600px) {
  .section { padding: 48px 1.25rem; }
  .footer__inner { flex-direction: column; text-align: center; }
  .section__header { flex-direction: column; align-items: flex-start; }
}
