/*
Theme Name: Haus Creatives
Theme URI: https://hauscreatives.com
Author: Haus Creatives
Author URI: https://hauscreatives.com
Description: Design-system theme for Haus Creatives — dark navy header, Source Code Pro headlines, Poppins body, pink accent. Use for demonstrating WordPress plugins.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: hauscreatives
Tags: custom-logo, custom-menu, full-width-template, featured-images, one-page
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  --primary-blue:       #2c3862;
  --bg-light:           #edeff3;
  --accent-pink:        #e7618b;
  --highlight-pink:     #f47aa0;
  --highlight-purple:   #423cc1;
  --text-gray:          #848c97;
  --dark-canvas:        #0d1117;
  --dark-card:          #1e2436;
  --code-cyan:          #aef1ff;
  --code-purple:        #e8a3ec;
  --code-green:         #7CFC00;
  --line-numbers:       #515a78;
  --code-bg:            rgba(48,53,71,0.3);
  --contact-purple:     #df9de3;
  --section-orange:     #ffd79c;
  --section-light-blue: #f7f9fe;
  --accent-wp:          #a78bfa;
  --accent-wp-dark:     #7c3aed;
  --accent-green:       #22c55e;
  --pro-violet:         #7b5ea7;
  --premium-gold:       #f5b942;
}

/* =========================================================
   FONT FACE
   ========================================================= */
@font-face {
  font-family: 'TeXGyreHeros';
  src: url('./assets/fonts/TeXGyreHeros-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #FCFCFC;
  color: var(--primary-blue);
  font-size: 16px;
  line-height: 30px;
  font-weight: 400;
  overflow-x: hidden;
  /* Sticky footer */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content grows to push footer down on short pages */
#main,
.site-main,
#content {
  flex: 1 0 auto;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent-pink); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: "Source Code Pro", "TeXGyreHeros", "Courier New", monospace;
  font-weight: 600;
  color: var(--primary-blue);
  margin-top: 0;
  line-height: 1.2;
}
h1 { font-size: clamp(36px, 5vw, 65px); }
h2 { font-size: clamp(28px, 4vw, 50px); }
h3 { font-size: clamp(22px, 3vw, 35px); }
h4 { font-size: clamp(18px, 2.5vw, 26px); }
h5 { font-size: 20px; }
h6 { font-size: 15px; letter-spacing: 3px; text-transform: uppercase; }

/* Section label */
.haus-label {
  font-family: "Source Code Pro", monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 16px;
  display: block;
}

/* Color helpers */
.themecolor { color: var(--accent-pink); }
.procolor   { color: var(--code-cyan); }
.cyan       { color: var(--code-cyan); }
.purple     { color: var(--code-purple); }
.green      { color: var(--code-green); }
.text-gray  { color: var(--text-gray); }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =========================================================
   HEADER
   ========================================================= */
#masthead {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-blue);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

/* Logo — 400×59px source, display at 40px tall, width auto */
.site-branding a,
.site-branding .custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}

.site-branding .custom-logo,
.site-branding .custom-logo-link img,
.site-branding img.logo-img {
  height: 40px !important;
  width: auto !important;
  max-width: none !important;   /* prevent the global max-width:100% from squishing it */
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.site-title {
  font-family: "Source Code Pro", monospace;
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1;
}
.site-title a { color: white; text-decoration: none; }

/* Nav */
.main-navigation { display: flex; align-items: center; }

.main-navigation ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
}
.main-navigation a:hover { color: var(--accent-pink); }

/* Dropdown */
.main-navigation li { position: relative; }

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1e2436;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  padding: 8px 0;
  list-style: none;
  margin: 0;
  z-index: 200;
  flex-direction: column;
  gap: 0;
}

.main-navigation li:hover > .sub-menu { display: flex; }

.main-navigation .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
.main-navigation .sub-menu a:hover { background: rgba(255,255,255,0.07); color: white; }

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 80px 0; }

/* Light bg (default) */
.section-light { background: var(--bg-light); }

/* Orange — About */
.section-orange {
  background-color: var(--section-orange);
  background-image: url('./assets/images/webmaster2-section-bg1.png');
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
}

/* Dark blue — Services/Plugins */
.section-dark {
  background-color: var(--primary-blue);
  background-image: url('./assets/images/webmaster2-section-bg2.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: white;
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6,
.section-dark p,
.section-dark li,
.section-dark .haus-label { color: white; }

/* Dark canvas — code / plugin pages */
.section-canvas {
  background: var(--dark-canvas);
  color: white;
}
.section-canvas h1,
.section-canvas h2,
.section-canvas h3,
.section-canvas h4,
.section-canvas p,
.section-canvas .haus-label { color: white; }

/* Contact */
.section-contact {
  background-color: #292c36;
  background-image: url('./assets/images/webmaster2-section-bg5.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: white;
}
.section-contact h1,
.section-contact h2,
.section-contact h3,
.section-contact p,
.section-contact .haus-label { color: white; }

/* Light blue — Testimonials */
.section-lightblue { background: var(--section-light-blue); }

/* CTA gradient band */
.section-cta {
  background: linear-gradient(135deg, var(--highlight-pink), var(--highlight-purple));
  color: white;
  text-align: center;
  padding: 80px 20px;
}
.section-cta h2,
.section-cta h3,
.section-cta p { color: white; }

/* =========================================================
   GRID LAYOUTS
   ========================================================= */
.haus-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.haus-grid-2.media-first { grid-template-columns: 2fr 3fr; }
.haus-grid-2.reverse     { direction: rtl; }
.haus-grid-2.reverse > * { direction: ltr; }

.haus-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.haus-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn,
.button-theme,
.wp-block-button__link {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: "Source Code Pro", monospace;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1.4;
}

/* Primary — pink */
.btn-primary,
.button-theme {
  background: var(--accent-pink);
  color: white !important;
}
.btn-primary:hover,
.button-theme:hover { opacity: 0.88; }

/* WP purple */
.btn-wp {
  background: var(--accent-wp);
  color: white !important;
}
.btn-wp:hover { opacity: 0.88; }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--code-cyan) !important;
  border: 1px solid var(--code-cyan);
}
.btn-outline:hover { background: var(--code-cyan); color: var(--dark-canvas) !important; }

/* Pro gradient */
.btn-pro {
  background: linear-gradient(135deg, var(--pro-violet), var(--accent-pink));
  color: white !important;
}
.btn-pro:hover { opacity: 0.88; }

/* Green */
.btn-green {
  background: var(--accent-green);
  color: white !important;
}
.btn-green:hover { opacity: 0.88; }

/* Dark */
.btn-dark {
  background: var(--primary-blue);
  color: white !important;
}
.btn-dark:hover { opacity: 0.88; }

/* =========================================================
   BADGES & PILLS
   ========================================================= */
.haus-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: "Source Code Pro", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.haus-badge-hero {
  display: inline-block;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.4);
  color: var(--accent-wp);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Source Code Pro", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.haus-pro-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--pro-violet), var(--accent-pink));
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: "Source Code Pro", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* =========================================================
   CARDS
   ========================================================= */
.haus-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.haus-card-dark {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 32px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.haus-card-dark:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* Plugin card */
.plugin-card {
  background: rgba(13,17,23,0.6);
  border: 1px solid rgba(174,241,255,0.1);
  border-radius: 14px;
  padding: 28px;
  transition: transform 0.25s, border-color 0.25s;
}
.plugin-card:hover {
  transform: translateY(-3px);
  border-color: rgba(174,241,255,0.25);
}
.plugin-card h3,
.plugin-card h4 { color: white; }
.plugin-card p   { color: rgba(255,255,255,0.65); font-size: 15px; }

/* Testimonial */
.testimonial {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  position: relative;
}
.testimonial::before {
  content: '/*';
  position: absolute;
  top: 12px; left: 18px;
  font-family: "Source Code Pro", monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-gray);
}
.testimonial::after {
  content: '*/';
  position: absolute;
  bottom: 12px; right: 18px;
  font-family: "Source Code Pro", monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-gray);
}

/* =========================================================
   HERO — CODE SLIDER
   ========================================================= */
.haus-hero {
  min-height: 92vh;
  background: #292c36;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.haus-hero-inner { max-width: 1080px; width: 100%; padding: 0 20px; }

.code-slide {
  display: none;
  animation: fadeIn 0.8s ease;
}
.code-slide.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.code-line {
  font-family: "Source Code Pro", monospace;
  font-size: clamp(22px, 3.5vw, 48px);
  line-height: 1.6;
  font-weight: 600;
  position: relative;
  padding-left: 70px;
  margin: 18px 0;
}
.code-line .line-num {
  position: absolute;
  left: 0;
  width: 52px;
  text-align: right;
  padding-right: 16px;
  color: var(--line-numbers);
  font-size: 0.75em;
  top: 50%;
  transform: translateY(-50%);
}
.code-line .code-row-bg {
  position: absolute;
  inset: 0;
  background: var(--code-bg);
  z-index: -1;
  border-radius: 2px;
}

.code-hire-box {
  background: #4d2d40;
  color: white;
  padding: 18px 36px;
  border-radius: 8px;
  font-family: "Source Code Pro", monospace;
  font-size: clamp(16px, 2vw, 22px);
  text-align: center;
  margin: 32px 0;
}

/* Typing cursor */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: rgba(255,255,255,0.7);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================
   IMAGES
   ========================================================= */
.haus-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.haus-img-dark {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* =========================================================
   FOOTER
   ========================================================= */
#colophon {
  background: var(--primary-blue);
  color: white;
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .custom-logo,
.footer-brand .custom-logo-link img,
.footer-brand img.logo-img {
  height: 32px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
  margin-bottom: 16px;
  display: block;
}

.footer-brand p { color: rgba(255,255,255,0.55); font-size: 15px; }

.footer-nav-title {
  font-family: "Source Code Pro", monospace;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}

.footer-nav-list {
  list-style: none;
  margin: 0; padding: 0;
}
.footer-nav-list li + li { margin-top: 8px; }
.footer-nav-list a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.footer-nav-list a:hover { color: white; }

.footer-email {
  font-family: "Source Code Pro", monospace;
  font-size: 18px;
  margin-top: 20px;
  line-height: 1.4;
}
.footer-email .e-local { color: white; }
.footer-email .e-at    { color: var(--contact-purple); }
.footer-email .e-name  { color: var(--code-cyan); }
.footer-email .e-dot   { color: var(--contact-purple); }
.footer-email .e-tld   { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent-pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  color: white;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover   { background: var(--highlight-pink); color: white; }

/* =========================================================
   WP BUTTON BLOCK — contextual brand colors
   Styled by parent section so no custom className needed on the block,
   keeping buttons fully editable in the block editor.
   ========================================================= */

/* Default: pink */
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
  background-color: var(--accent-pink) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-family: "Source Code Pro", monospace !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 14px 28px !important;
  text-decoration: none !important;
  border: none !important;
  transition: opacity 0.2s !important;
}
.wp-block-button__link:hover { opacity: 0.88 !important; }

/* Inside dark-canvas / plugin sections → WP purple */
.section-canvas .wp-block-button__link,
.section-dark   .wp-block-button__link {
  background-color: var(--accent-wp) !important;
}

/* Inside CTA gradient band → white */
.section-cta .wp-block-button__link {
  background-color: #fff !important;
  color: var(--highlight-purple) !important;
}

/* Inside contact section → cyan outline */
.section-contact .wp-block-button__link {
  background-color: transparent !important;
  color: var(--code-cyan) !important;
  border: 1px solid var(--code-cyan) !important;
}

/* =========================================================
   FULL-WIDTH BLOCK LAYOUT
   Allows Group blocks set to "Full width" to break edge-to-edge
   while normal blocks stay constrained to the content width.
   ========================================================= */

/* Page content — no container, blocks control their own width */
.site-main .entry-content {
  padding: 0;
  margin: 0;
}

/* Default block constraint (text blocks, headings etc.) */
.entry-content > *:not(.alignfull):not(.alignwide) {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Full-width groups break edge-to-edge */
.entry-content > .alignfull,
.entry-content > .wp-block-group.alignfull {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100%;
}

/* Wide alignment */
.entry-content > .alignwide,
.entry-content > .wp-block-group.alignwide {
  max-width: 1280px;
}

/* Constrained layout inside full-width groups (WP block layout) */
.wp-block-group.alignfull > .wp-block-group__inner-container,
.wp-block-group.alignfull.is-layout-constrained > * {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* =========================================================
   STANDARD WP CONTENT
   ========================================================= */
.site-content { padding: 60px 0; background: var(--bg-light); }

.entry-header { margin-bottom: 32px; }

.entry-title   { font-size: clamp(22px, 3vw, 36px); color: var(--primary-blue); margin-bottom: 8px; }
.entry-title a { color: var(--primary-blue); text-decoration: none; }
.entry-title a:hover { color: var(--accent-pink); }

.entry-meta {
  font-family: "Source Code Pro", monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 16px;
}

.entry-card {
  background: white;
  border-radius: 12px;
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.entry-card .entry-title { font-size: 22px; }
.entry-card .post-thumbnail { margin-bottom: 20px; }
.entry-card .post-thumbnail img { width: 100%; border-radius: 8px; height: 220px; object-fit: cover; }

.read-more {
  display: inline-block;
  margin-top: 12px;
  font-family: "Source Code Pro", monospace;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--accent-pink);
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* Pagination */
.posts-navigation,
.pagination { margin: 40px 0; }

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers,
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--primary-blue);
  color: white;
  border-radius: 6px;
  font-family: "Source Code Pro", monospace;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}
.page-numbers:hover,
.nav-links a:hover,
.page-numbers.current { background: var(--accent-pink); color: white; }

/* 404 */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .big-404 {
  font-family: "Source Code Pro", monospace;
  font-size: clamp(60px, 15vw, 140px);
  font-weight: 700;
  color: var(--accent-pink);
  line-height: 1;
  margin-bottom: 16px;
}

/* Gutenberg compatibility */
.wp-block-image img  { border-radius: 8px; }
.wp-block-quote      { border-left: 3px solid var(--accent-pink); padding-left: 20px; }
.wp-block-code       { background: var(--dark-card); color: var(--code-cyan); border-radius: 8px; font-family: "Source Code Pro", monospace; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .menu-toggle { display: block !important; }

  .main-navigation { width: 100%; order: 3; }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--primary-blue);
    padding: 12px 20px 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  }
  .main-navigation ul.open { display: flex; }
  .main-navigation ul li   { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }

  .main-navigation .sub-menu {
    display: flex !important;
    position: static;
    background: none;
    box-shadow: none;
    padding: 4px 0 0 16px;
    min-width: 0;
  }

  .haus-grid-2,
  .haus-grid-2.media-first,
  .haus-grid-3,
  .haus-grid-4  { grid-template-columns: 1fr; }
  .haus-grid-2.reverse { direction: ltr; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .code-line { padding-left: 44px; }
  .code-line .line-num { width: 36px; padding-right: 8px; }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .haus-hero { min-height: 80vh; }
}
