/*
Theme Name: Zero at 60
Theme URI: https://saasskul.info
Author: Builder from Karachi
Author URI: https://saasskul.info
Description: A personal portfolio theme for the "From Zero at 60" build-in-public challenge. Clean, honest, grounded design with full customizer support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zero-at-60
Tags: portfolio, one-page, blog, custom-colors, custom-logo, featured-images, theme-options
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Customizer-overridable via PHP)
   ============================================================ */
:root {
  --z60-ink:          #1a1410;
  --z60-paper:        #f5f0e8;
  --z60-warm-mid:     #e8e0d0;
  --z60-accent:       #c4622d;
  --z60-accent-dark:  #9e4a1f;
  --z60-muted:        #7a6e62;
  --z60-rule:         #cfc7b8;
  --z60-white:        #fdfaf5;
  --z60-body-bg:      #f5f0e8;
  --z60-font-display: 'Playfair Display', Georgia, serif;
  --z60-font-body:    'DM Sans', system-ui, sans-serif;
  --z60-font-mono:    'DM Mono', 'Courier New', monospace;
  --z60-radius:       4px;
  --z60-max-width:    860px;
  --z60-hero-max:     1200px;
}

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

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

body {
  font-family: var(--z60-font-body);
  background: var(--z60-body-bg);
  color: var(--z60-ink);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--z60-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--z60-accent-dark); }

ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--z60-font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--z60-ink);
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.2rem; color: #3a3028; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#site-navigation {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--z60-paper);
  border-bottom: 1px solid var(--z60-rule);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 1px 12px rgba(26,20,16,0.06);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-family: var(--z60-font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--z60-accent);
  font-weight: 400;
  text-decoration: none;
}

.custom-logo {
  height: 36px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-navigation a {
  font-size: 13px;
  font-weight: 500;
  color: var(--z60-muted);
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--z60-accent);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--z60-ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.site-content {
  padding-top: 60px;
}

.container {
  max-width: var(--z60-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: var(--z60-hero-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.z60-section {
  max-width: var(--z60-max-width);
  margin: 0 auto;
  padding: 6rem 2rem;
  border-top: 1px solid var(--z60-rule);
}

.section-label {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--z60-accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--z60-accent);
}

.section-intro {
  font-size: 16px;
  color: var(--z60-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  line-height: 1.75;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: 1fr 420px;
  max-width: var(--z60-hero-max);
  margin: 0 auto;
  align-items: center;
}

.hero-text {
  padding: 5rem 4rem 5rem 2rem;
}

.hero-eyebrow {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--z60-accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--z60-accent);
}

.hero-headline {
  font-family: var(--z60-font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--z60-ink);
  margin-bottom: 1.5rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--z60-accent);
}

.hero-sub {
  font-size: 16px;
  color: var(--z60-muted);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-trust {
  font-family: var(--z60-font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--z60-muted);
  border-left: 3px solid var(--z60-accent);
  padding-left: 1rem;
  margin-bottom: 2.5rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--z60-accent);
  color: var(--z60-white) !important;
  padding: 0.85rem 1.75rem;
  border-radius: var(--z60-radius);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--z60-accent-dark);
  transform: translateY(-1px);
  color: var(--z60-white) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--z60-ink) !important;
  padding: 0.85rem 1.75rem;
  border-radius: var(--z60-radius);
  border: 1.5px solid var(--z60-rule);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--z60-accent);
  color: var(--z60-accent) !important;
}

.hero-image-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  position: relative;
  overflow: hidden;
  padding-top: 3rem;
}

.hero-image-wrap::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  background: var(--z60-warm-mid);
  border-radius: 50% 50% 0 0;
}

.hero-portrait {
  position: relative;
  z-index: 2;
  width: 340px;
  max-height: 540px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 8px 32px rgba(26,20,16,0.18));
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.about-card {
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  border-radius: var(--z60-radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.about-card:hover {
  border-color: var(--z60-accent);
}

.about-card-label {
  font-family: var(--z60-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--z60-accent);
  margin-bottom: 0.5rem;
}

.about-card p {
  font-size: 15px;
  color: var(--z60-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   CHALLENGE SECTION
   ============================================================ */
.challenge-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.fact-card {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  border-radius: var(--z60-radius);
}

.fact-number {
  font-family: var(--z60-font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--z60-accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.fact-label {
  font-size: 12px;
  color: var(--z60-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--z60-font-mono);
}

.rules-block {
  background: var(--z60-ink);
  color: var(--z60-paper);
  border-radius: var(--z60-radius);
  padding: 2.25rem;
  margin: 2rem 0;
}

.rules-block h3 {
  font-family: var(--z60-font-display);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  color: var(--z60-paper);
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rules-list li {
  font-size: 14px;
  color: #c8bfb0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.rules-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--z60-accent);
}

.phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.phase-card {
  border: 1.5px solid var(--z60-rule);
  border-radius: var(--z60-radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.phase-card:hover {
  border-color: var(--z60-accent);
}

.phase-card::before {
  content: attr(data-num);
  position: absolute;
  top: -12px;
  right: 10px;
  font-family: var(--z60-font-display);
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--z60-warm-mid);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.phase-label {
  font-family: var(--z60-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--z60-accent);
  margin-bottom: 0.5rem;
}

.phase-goal {
  font-size: 15px;
  color: var(--z60-ink);
  font-weight: 500;
  margin: 0;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.service-card {
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  border-radius: var(--z60-radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--z60-accent);
  transform: translateY(-2px);
}

.service-card.span-full {
  grid-column: 1 / -1;
}

.service-num {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  color: var(--z60-accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 14px;
  color: var(--z60-muted);
  margin: 0;
  line-height: 1.7;
}

.service-disclaimer {
  font-size: 12px;
  font-style: italic;
  color: var(--z60-accent);
  margin-top: 0.75rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--z60-rule);
}

.optional-block {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background: var(--z60-warm-mid);
  border-radius: var(--z60-radius);
}

.optional-block h3 {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--z60-muted);
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  color: var(--z60-ink);
  font-size: 13px;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-weight: 400;
  transition: border-color 0.2s;
}

.tag:hover {
  border-color: var(--z60-accent);
}

/* ============================================================
   JOURNEY LOG SECTION
   ============================================================ */
.journey-log {
  margin-top: 2.5rem;
}

.log-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--z60-rule);
  transition: opacity 0.2s;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-date {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  color: var(--z60-muted);
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
  line-height: 1.5;
}

.log-status {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-family: var(--z60-font-mono);
  margin-bottom: 0.6rem;
}

.status-live       { background: #e8f5e9; color: #2e7d32; }
.status-upcoming   { background: #fff3e0; color: #bf6a00; }
.status-done       { background: #e3f2fd; color: #1565c0; }

.log-title {
  font-weight: 500;
  color: var(--z60-ink);
  font-size: 15px;
  margin-bottom: 0.25rem;
}

.log-desc {
  font-size: 14px;
  color: var(--z60-muted);
  line-height: 1.65;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.contact-card {
  padding: 1.75rem;
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  border-radius: var(--z60-radius);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s, transform 0.2s;
}

.contact-card:hover {
  border-color: var(--z60-accent);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.contact-label {
  font-family: var(--z60-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--z60-accent);
}

.contact-value {
  font-size: 15px;
  color: var(--z60-ink);
  font-weight: 500;
}

.contact-note {
  font-size: 13px;
  color: var(--z60-muted);
}

.honest-note {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--z60-accent);
  background: var(--z60-white);
  border-radius: 0 var(--z60-radius) var(--z60-radius) 0;
}

.honest-note p {
  font-family: var(--z60-font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--z60-muted);
  margin: 0;
  line-height: 1.7;
}

/* ============================================================
   BLOG / POSTS
   ============================================================ */
.blog-header {
  padding: 4rem 2rem 3rem;
  max-width: var(--z60-max-width);
  margin: 0 auto;
}

.posts-grid {
  max-width: var(--z60-max-width);
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  gap: 2rem;
}

.post-card {
  background: var(--z60-white);
  border: 1px solid var(--z60-rule);
  border-radius: var(--z60-radius);
  padding: 2rem;
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--z60-accent);
}

.post-meta {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  color: var(--z60-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.post-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.post-card h2 a {
  color: var(--z60-ink);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--z60-accent);
}

.post-excerpt {
  font-size: 15px;
  color: var(--z60-muted);
  margin-bottom: 1.25rem;
}

.read-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--z60-accent);
  letter-spacing: 0.04em;
}

/* Single post */
.single-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.single-post .post-meta { margin-bottom: 1rem; }
.single-post h1 { margin-bottom: 2rem; }
.single-post .entry-content p { font-size: 16px; line-height: 1.85; }
.single-post .entry-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.single-post .entry-content h3 { margin: 2rem 0 0.75rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--z60-ink);
  color: #c8bfb0;
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: var(--z60-hero-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .site-title {
  color: var(--z60-paper);
  font-size: 13px;
}

.footer-tagline {
  font-size: 14px;
  color: #8c7e72;
  margin-top: 0.75rem;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--z60-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--z60-accent);
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 14px;
  color: #8c7e72;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--z60-paper);
}

.footer-bottom {
  max-width: var(--z60-hero-max);
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  color: #6a5e52;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--z60-font-mono);
  font-size: 11px;
  color: #6a5e52;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--z60-accent); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-text > * {
  animation: fadeUp 0.7s ease both;
}

.hero-eyebrow   { animation-delay: 0.05s; }
.hero-headline  { animation-delay: 0.2s; }
.hero-sub       { animation-delay: 0.35s; }
.hero-trust     { animation-delay: 0.45s; }
.btn-group      { animation-delay: 0.55s; }

.hero-image-wrap {
  animation: fadeUp 0.9s 0.2s ease both;
}

/* Scroll reveal — JS class driven */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   CUSTOMIZER COLOR OVERRIDES (output via wp_head)
   ============================================================ */
/* These classes are generated by inc/customizer.php */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-image-wrap { display: none; }
  .hero-text { padding: 4rem 2rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .about-grid,
  .challenge-facts,
  .phases-grid,
  .services-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .service-card.span-full { grid-column: 1; }

  .menu-toggle { display: flex; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--z60-paper);
    border-bottom: 1px solid var(--z60-rule);
    padding: 1.5rem 2rem;
  }

  .main-navigation.toggled { display: block; }

  .main-navigation ul {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .z60-section { padding: 4rem 1.5rem; }

  .log-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* ============================================================
   WORDPRESS ALIGNMENT HELPERS
   ============================================================ */
.alignleft  { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-family: var(--z60-font-mono);
  font-size: 12px;
  color: var(--z60-muted);
  text-align: center;
  padding-top: 0.5rem;
}

/* Gutenberg blocks */
.wp-block-image { margin: 2rem 0; }
.wp-block-quote {
  border-left: 3px solid var(--z60-accent);
  padding-left: 1.25rem;
  font-family: var(--z60-font-display);
  font-style: italic;
  color: var(--z60-muted);
  margin: 2rem 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--z60-accent);
  color: white;
}
