/*
Theme Name: AmberPin Blog
Theme URI: https://amberpinmedia.com
Author: AmberPin Media
Author URI: https://amberpinmedia.com
Description: Custom blog theme for blog.amberpinmedia.com, matching the amberpinmedia.com brand system (Neue Haas Display, violet/yellow/dark palette, card components, fade-in animations). Classic PHP theme, Gutenberg block editor for content.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Unlicensed - private use only
Text Domain: amberpin-blog
*/

@font-face {
  font-family: 'NeueHaasDisplay';
  src: url('assets/fonts/NeueHaasDisplay-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NeueHaasDisplay';
  src: url('assets/fonts/NeueHaasDisplay-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'NeueHaasDisplay';
  src: url('assets/fonts/NeueHaasDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NeueHaasDisplay';
  src: url('assets/fonts/NeueHaasDisplay-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --violet: #4C3392;
  --yellow: #F6EC42;
  --soft-violet: #BCB4FF;
  --light-violet: #D4D2FF;
  --dark: #1B0E3F;
  --white: #FFFFFF;
  --bg: #EDEAF7;
  --r: 24px;
  --font: 'NeueHaasDisplay', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--dark); overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 60px;
  background: rgba(237,234,247,0.93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(76,51,146,0.1);
}
.nav-logo { text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { display: block; width: auto; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 300; color: var(--dark); text-decoration: none; padding: 8px 16px; border-radius: 40px; transition: background 0.2s; }
.nav-links a:hover { background: rgba(76,51,146,0.08); }
.nav-links a.active { font-weight: 700; }
.nav-cta { background: var(--violet) !important; color: var(--white) !important; font-weight: 700 !important; }
.nav-cta:hover { background: var(--dark) !important; }

.page { padding: 80px 14px 14px; max-width: 1260px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }

.card { border-radius: var(--r); overflow: hidden; position: relative; transition: transform 0.22s ease, box-shadow 0.22s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(27,14,63,0.14); }
.flat { border-radius: var(--r); overflow: hidden; }

.btn { display: inline-flex; align-items: center; font-family: var(--font); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 15px 32px; border-radius: 40px; transition: transform 0.15s, background 0.2s; white-space: nowrap; border: none; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-yellow { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: #FFE500; }
.btn-outline { background: transparent; color: var(--soft-violet); border: 1.5px solid rgba(188,180,255,0.35); }
.btn-outline:hover { border-color: var(--soft-violet); }
.btn-violet { background: var(--violet); color: var(--white); }
.btn-violet:hover { background: var(--dark); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--violet); }

/* ── SECTION HEADER (reused: blog intro, archive intro) ── */
.c-svc-header {
  grid-column: span 12;
  background: var(--white);
  padding: 64px 80px 52px;
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px;
  border-radius: var(--r) var(--r) 0 0;
}
.sec-h2 { font-size: clamp(30px, 3.8vw, 54px); font-weight: 700; line-height: 1.0; letter-spacing: -0.03em; color: var(--dark); }
.sec-intro { font-size: 17px; font-weight: 300; line-height: 1.65; color: var(--dark); opacity: 0.62; max-width: 480px; }

/* ── 10. FINAL CTA ── */
.c-final {
  grid-column: span 12;
  background: var(--violet); padding: 80px 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; border-radius: var(--r);
}
.final-h { font-size: clamp(38px, 5vw, 76px); font-weight: 700; line-height: 0.93; letter-spacing: -0.04em; color: var(--white); }
.final-h .yl { color: var(--yellow); }
.final-right { display: flex; flex-direction: column; gap: 20px; }
.final-sub { font-size: 18px; font-weight: 300; color: var(--light-violet); line-height: 1.6; opacity: 0.85; }
.final-micro { font-size: 12px; color: var(--soft-violet); opacity: 0.5; }

footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 28px 6px 20px; }
.footer-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 13px; font-weight: 300; color: var(--dark); opacity: 0.4; text-decoration: none; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 0.75; }
.footer-copy { font-size: 11px; color: var(--dark); opacity: 0.28; }

.fi { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fi.visible { opacity: 1; transform: none; }

/* ══════════ BLOG ARCHIVE / CARD GRID ══════════ */
.blog-card {
  grid-column: span 4;
  background: var(--white);
  display: flex; flex-direction: column;
  text-decoration: none;
  border-top: 1px solid rgba(76,51,146,0.07);
}
.blog-card-img { width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--light-violet); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.blog-card-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--violet); opacity: 0.55; margin-bottom: 10px; display: block; }
.blog-card-title { font-size: clamp(17px, 1.8vw, 21px); font-weight: 700; color: var(--dark); letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 10px; }
.blog-card-excerpt { font-size: 14px; font-weight: 300; line-height: 1.65; color: var(--dark); opacity: 0.6; flex: 1; }
.blog-card-date { font-size: 12px; font-weight: 300; color: var(--dark); opacity: 0.4; margin-top: 18px; }
.blog-grid-row-fix .blog-card:last-child { border-radius: 0 0 var(--r) var(--r); }

.pagination-wrap { grid-column: span 12; display: flex; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.pagination-wrap a, .pagination-wrap span { font-size: 13px; font-weight: 700; color: var(--violet); background: var(--white); border-radius: 40px; padding: 10px 20px; text-decoration: none; }
.pagination-wrap .current { background: var(--violet); color: var(--white); }
.pagination-wrap a:hover { background: var(--light-violet); }

.blog-empty { grid-column: span 12; background: var(--white); padding: 64px 80px; text-align: center; border-radius: 0 0 var(--r) var(--r); }
.blog-empty p { font-size: 16px; font-weight: 300; color: var(--dark); opacity: 0.6; }

/* ══════════ SINGLE POST ══════════ */
.post-header {
  grid-column: span 12;
  background: var(--dark);
  padding: 64px 80px;
  border-radius: var(--r);
}
.post-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--yellow); opacity: 0.8; margin-bottom: 20px; display: block; }
.post-title { font-size: clamp(32px, 4.4vw, 60px); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; color: var(--white); max-width: 900px; }
.post-meta { font-size: 14px; font-weight: 300; color: var(--soft-violet); opacity: 0.7; margin-top: 24px; }
.post-meta span { margin-right: 18px; }

.post-featured-img { grid-column: span 12; border-radius: var(--r); overflow: hidden; background: var(--light-violet); }
.post-featured-img img { width: 100%; max-height: 520px; object-fit: cover; display: block; }

.post-body-wrap { grid-column: span 12; background: var(--white); padding: 64px 80px; border-radius: var(--r); }
.post-content { max-width: 760px; margin: 0 auto; font-size: 17px; font-weight: 300; line-height: 1.72; color: var(--dark); }
.post-content h2 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 44px 0 18px; color: var(--dark); }
.post-content h3 { font-size: clamp(19px, 2vw, 24px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin: 36px 0 14px; color: var(--dark); }
.post-content p { margin-bottom: 22px; }
.post-content ul, .post-content ol { margin: 0 0 22px 22px; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--violet); text-decoration: underline; text-decoration-color: rgba(76,51,146,0.35); }
.post-content a:hover { text-decoration-color: var(--violet); }
.post-content strong { font-weight: 700; }
.post-content blockquote { border-left: 3px solid var(--yellow); padding: 4px 0 4px 24px; margin: 32px 0; font-weight: 700; font-size: 19px; color: var(--violet); }
.post-content img { border-radius: 16px; margin: 8px 0 22px; }
.post-content figcaption { font-size: 13px; opacity: 0.5; margin-top: -12px; margin-bottom: 22px; }

/* Author box - about.html quote-card style */
.author-box {
  grid-column: span 12;
  background: var(--light-violet);
  border-radius: var(--r);
  display: grid; grid-template-columns: 140px 1fr; gap: 32px;
  align-items: center;
  padding: 32px 40px;
}
.author-box-photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; background: var(--soft-violet); }
.author-box-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.author-box-label { font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--violet); opacity: 0.6; margin-bottom: 8px; display: block; }
.author-box-name { font-size: 19px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.author-box-bio { font-size: 15px; font-weight: 300; line-height: 1.6; color: var(--dark); opacity: 0.72; }
.author-box-link { font-size: 12px; font-weight: 700; color: var(--violet); text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid rgba(76,51,146,0.35); padding-bottom: 2px; display: inline-block; margin-top: 12px; }

/* ══════════ 404 ══════════ */
.c-404 {
  grid-column: span 12;
  background: var(--dark);
  padding: 120px 80px;
  border-radius: var(--r);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.c-404 h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 700; color: var(--yellow); letter-spacing: -0.03em; }
.c-404 p { font-size: 17px; font-weight: 300; color: var(--light-violet); max-width: 480px; }

/* ══════════ RESPONSIVE ══════════ */

@media (max-width: 1100px) {
  .page { padding: 76px 12px 12px; }
  .grid { gap: 8px; }
  .c-svc-header { padding: 52px 48px 44px; gap: 48px; }
  .c-final { padding: 60px 48px; gap: 48px; }
  .post-header, .post-body-wrap { padding: 48px 48px; }
}

@media (max-width: 900px) {
  nav { padding: 0 20px; height: 56px; }
  .nav-logo img { height: 34px; }
  .nav-links { gap: 0; }
  .nav-links a { font-size: 13px; padding: 7px 11px; }
  .nav-links li:nth-child(3),
  .nav-links li:nth-child(4) { display: none; }

  .page { padding: 70px 10px 10px; }

  .c-svc-header {
    grid-template-columns: 1fr;
    display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 44px 36px 36px;
  }
  .sec-h2 { font-size: clamp(26px, 5.2vw, 40px); }

  .blog-card { grid-column: span 12 !important; border-radius: 0; }
  .blog-grid-row-fix .blog-card:last-child { border-radius: 0 0 var(--r) var(--r); }

  .c-final { grid-template-columns: 1fr; gap: 32px; padding: 56px 36px; }
  .final-h { font-size: clamp(34px, 7vw, 52px); }
  .final-sub { font-size: 16px; }

  .post-header, .post-body-wrap { padding: 40px 36px; }
  .post-content { font-size: 16px; }
  .author-box { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .author-box-photo { width: 100px; height: 100px; }

  footer { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 4px 16px; }
}

@media (max-width: 600px) {
  :root { --r: 18px; }
  nav { padding: 0 14px; height: 52px; }
  .nav-logo img { height: 28px; }
  .nav-links li:nth-child(1),
  .nav-links li:nth-child(2) { display: none; }
  .nav-cta { font-size: 12px !important; padding: 8px 16px !important; }

  .page { padding: 62px 8px 8px; gap: 8px; }
  .grid { gap: 8px; }
  .btn { font-size: 12px; padding: 13px 22px; letter-spacing: 0.05em; }

  .c-svc-header { padding: 34px 22px 28px; }
  .sec-h2 { font-size: clamp(23px, 6.4vw, 30px); }
  .sec-intro { font-size: 15px; }

  .blog-card-body { padding: 22px 22px 26px; }

  .c-final { padding: 40px 22px; gap: 26px; }
  .final-h { font-size: clamp(28px, 8vw, 38px); }
  .final-sub { font-size: 15px; }
  .final-right .btn { align-self: stretch; justify-content: center; }
  .final-micro { font-size: 11px; }

  .post-header, .post-body-wrap { padding: 30px 22px; }
  .post-title { font-size: clamp(26px, 8vw, 36px); }
  .post-content { font-size: 15px; }
  .post-content blockquote { font-size: 17px; }

  .c-404 { padding: 70px 22px; }

  footer { gap: 16px; }
  footer img { height: 32px !important; }
  .footer-links { gap: 14px; }
  .footer-links a { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .fi { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}
