/*
Theme Name: Peak of Sun
Theme URI: https://peakofsun.com
Author: Peak of Sun
Author URI: https://peakofsun.com
Description: A premium, solar-themed WordPress theme built to match the Peak of Sun AI Solar Calculator's design system — clean, white, with amber/orange accents. Includes Home (with embedded calculator + About section), Blog, and Contact Us with a working wp_mail contact form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: peak-of-sun
*/

/* ---------------------------------------------------------------------
   Design tokens — mirrors the calculator's Tailwind config so the whole
   site feels like one product.
--------------------------------------------------------------------- */
:root {
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --canvas: #FFFFFF;
  --panel: #FAFAF9;
  --sun-50: #FFFBEB;
  --sun-100: #FEF3C7;
  --sun-400: #FBBF24;
  --sun-500: #F59E0B;
  --sun-600: #EA580C;
  --sun-700: #C2410C;
  --good: #16A34A;
  --sun-gradient: linear-gradient(135deg, #FBBF24 0%, #F59E0B 45%, #EA580C 100%);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}
/* =========================================================
   HEADER
========================================================= */

.site-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    width: 100%;

    background: var(--canvas);

    border-bottom: 1px solid var(--line);
}


.site-header__inner {

    width: 100%;

    max-width: 1152px;

    min-height: 82px;

    margin: 0 auto;

    padding: 14px 24px;

    display: flex;

    align-items: center;

    gap: 32px;
}


/* =========================================================
   LOGO
========================================================= */

.site-logo {

    display: flex;

    align-items: center;

    flex: 0 0 auto;

    min-width: 0;

    line-height: 0;
}


.site-logo .custom-logo-link {

    display: flex;

    align-items: center;

    width: auto;

    flex-shrink: 0;
}


.site-logo .custom-logo {

    display: block;

    width: 180px;

    max-width: 100%;

    height: auto;
}


/* Fallback logo */

.site-logo__fallback {

    display: flex;

    align-items: center;

    gap: 10px;

    line-height: 1;
}


.site-logo__mark {

    width: 34px;

    height: 34px;

    border-radius: 10px;

    background: var(--sun-gradient);

    display: flex;

    align-items: center;

    justify-content: center;

    color: #fff;

    font-size: 18px;

    flex-shrink: 0;
}


.site-logo__text {

    font-family: var(--font-display);

    font-weight: 600;

    font-size: 18px;
}


/* =========================================================
   NAVIGATION
========================================================= */

.primary-nav {

    margin-left: auto;
}


.primary-nav ul {

    list-style: none;

    display: flex;

    align-items: center;

    gap: 28px;

    margin: 0;

    padding: 0;
}


.primary-nav li {

    margin: 0;

    padding: 0;
}


.primary-nav a {

    display: inline-flex;

    align-items: center;

    font-size: 14px;

    font-weight: 500;

    color: var(--muted);

    white-space: nowrap;

    transition: color 0.15s ease;
}


.primary-nav a:hover {

    color: var(--ink);
}


/* =========================================================
   HEADER CTA
========================================================= */

.header-cta {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    flex: 0 0 auto;

    padding: 10px 17px;

    border-radius: 10px;

    background: var(--sun-500);

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}


.header-cta:hover {

    transform: translateY(-1px);
}


.header-cta__arrow {

    font-size: 16px;

    line-height: 1;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-toggle {

    display: none;

    width: 42px;

    height: 42px;

    padding: 0;

    border: 1px solid var(--line);

    border-radius: 10px;

    background: #ffffff;

    cursor: pointer;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 5px;

    flex-shrink: 0;
}


.mobile-menu-toggle span {

    display: block;

    width: 18px;

    height: 2px;

    background: var(--ink);

    border-radius: 2px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 780px) {

    .site-header__inner {

        min-height: 70px;

        padding: 12px 20px;

        gap: 16px;

        flex-wrap: wrap;
    }


    /* Logo */

    .site-logo {

        flex: 1 1 auto;

        min-width: 0;
    }


    .site-logo .custom-logo {

        max-width: 170px;
    }


    /* CTA hidden on mobile */

    .header-cta {

        display: none !important;
    }


    /* Hamburger */

    .mobile-menu-toggle {

        display: inline-flex;
    }


    /* Mobile navigation */

    .primary-nav {

        display: none;

        width: 100%;

        order: 10;

        margin: 0;

        padding: 16px 0 4px;

        border-top: 1px solid var(--line);
    }


    .primary-nav.is-open {

        display: block;
    }


    .primary-nav ul {

        display: flex;

        flex-direction: column;

        align-items: flex-start;

        gap: 0;
    }


    .primary-nav li {

        width: 100%;
    }


    .primary-nav a {

        display: flex;

        width: 100%;

        padding: 11px 0;

        font-size: 15px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .site-header__inner {

        padding-left: 16px;

        padding-right: 16px;
    }


    .site-logo .custom-logo {

        max-width: 150px;
    }

}
/* ---------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--sun-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--sun-500); color: var(--sun-600); }

/* ---------------------------------------------------------------------
   Cards
--------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17,24,39,0.04), 0 8px 24px rgba(17,24,39,0.06);
}

/* ---------------------------------------------------------------------
   About Section (homepage)
--------------------------------------------------------------------- */
.about-section {
  padding: 80px 24px;
}

.about-section__grid {
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.about-section__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sun-600);
  margin-bottom: 8px;
}

.about-section img {
  border-radius: 20px;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.about-section__text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

@media (max-width: 780px) {
  .about-section__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Blog — hero banner + image card grid
--------------------------------------------------------------------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  padding: 80px 24px;
  text-align: center;
}

.blog-hero__glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--sun-gradient);
  opacity: 0.18;
  filter: blur(90px);
  pointer-events: none;
}

.blog-hero__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.blog-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sun-400);
  margin-bottom: 14px;
}

.blog-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}

.blog-hero__title span {
  background: var(--sun-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 640px) {
  .blog-hero { padding: 56px 24px; }
  .blog-hero__title { font-size: 30px; }
}

.blog-grid {
  max-width: 1152px;
  margin: -40px auto 0;
  padding: 0 24px 80px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17,24,39,0.04), 0 8px 24px rgba(17,24,39,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: block;
}
.blog-card:hover {
  box-shadow: 0 2px 4px rgba(17,24,39,0.06), 0 16px 32px rgba(17,24,39,0.10);
  transform: translateY(-2px);
}

.blog-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--panel);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card__media-fallback {
  width: 100%;
  height: 100%;
  background: var(--sun-gradient);
  opacity: 0.15;
}

.blog-card__badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: var(--sun-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: capitalize;
}

.blog-card__body { padding: 20px; }

.blog-card__title {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.blog-card:hover .blog-card__title { color: var(--sun-600); }

.blog-card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.blog-card__dot { margin: 0 6px; }

/* Single post */
.single-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.single-post__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
.single-post__back:hover { color: var(--ink); }

.single-post__thumb {
  border-radius: 20px;
  margin-bottom: 32px;
  width: 100%;
  object-fit: cover;
}

.single-post__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.single-post__content { font-size: 16px; line-height: 1.8; }
.single-post__content p { margin: 0 0 20px; }
.single-post__content img { border-radius: 16px; margin: 24px 0; }
.single-post__content a { color: var(--sun-600); text-decoration: underline; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.pagination .current { background: var(--sun-50); border-color: var(--sun-500); color: var(--sun-700); }

/* ---------------------------------------------------------------------
   Services (CPT archive)
--------------------------------------------------------------------- */
.services-grid {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service-card { padding: 28px; }
.service-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--sun-50);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}
.service-card__title { font-size: 18px; margin-bottom: 8px; }
.service-card__excerpt { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------------------------------------------------------------------
   Contact page
--------------------------------------------------------------------- */
.contact-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.contact-info__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--sun-50);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info__label { font-size: 12px; color: var(--muted); }
.contact-info__value { font-size: 14px; font-weight: 500; }

.contact-form-card { padding: 32px; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--sun-500);
  box-shadow: 0 0 0 3px var(--sun-100);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-honeypot { position: absolute; left: -9999px; }

.form-notice {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}
.form-notice--success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.form-notice--error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }

@media (max-width: 780px) {
  .contact-section { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Generic page
--------------------------------------------------------------------- */
.page-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.page-content h1 { font-size: 32px; margin-bottom: 24px; }

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #D1D5DB;
  padding: 56px 24px 32px;
  margin-top: 40px;
}

.site-footer__grid {
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.site-footer h4 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #D1D5DB; font-size: 14px; }
.site-footer a:hover { color: var(--sun-400); }

.site-footer__socials { display: flex; gap: 12px; margin-top: 16px; }
.site-footer__socials a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.site-footer__socials a:hover { background: var(--sun-600); }

.site-footer__bottom {
  max-width: 1152px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: #9CA3AF;
}

@media (max-width: 780px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------------------------------------------------------------------
   Calculator mount point spacing
--------------------------------------------------------------------- */
/* ---------------------------------------------------------------------
   Homepage sections: Services preview, Products preview
--------------------------------------------------------------------- */
.home-section {
  padding: 80px 24px;
  border-bottom: 1px solid var(--line);
}

.home-section__header {
  max-width: 1152px;
  margin: 0 auto 32px;
  text-align: center;
}
.home-section__header h2 { font-size: 28px; }

.home-section__cta {
  width: 100% !important;
  text-align: center !important;
  margin-top: 32px !important;
}

.home-section__cta .btn {
  display: inline-flex !important;
}
.service-card__thumb {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  aspect-ratio: 4 / 3;
}
.service-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------
   Contact CTA (homepage)
--------------------------------------------------------------------- */
.contact-cta {
  background: var(--ink);
  padding: 80px 24px;
  text-align: center;
}
.contact-cta__inner { max-width: 560px; margin: 0 auto; }
.contact-cta__inner h2 { color: #fff; font-size: 28px; margin-bottom: 12px; }
.contact-cta__text { color: #9CA3AF; margin-bottom: 20px; }
.contact-cta__info { color: #D1D5DB; font-size: 14px; margin-bottom: 24px; }
.contact-cta__dot { margin: 0 8px; }

#peakofsun-calculator-root { min-height: 40px; }

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo .custom-logo {
    display: block;
    max-width: 180px;
    height: auto;
}
