/*
Theme Name: Canopy Ridge Technologies
Theme URI: https://github.com/jmorningstar_maple/canopy-ridge-website
Author: MapleTronics Computers, Inc.
Description: Custom WordPress theme for Canopy Ridge Technologies.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: canopy-ridge
*/

:root {
  --primary-forest-green: #12382f;
  --slate-gray: #4f5d5d;
  --warm-cream: #f5efe3;
  --bronze-accent: #a97843;
  --charcoal-text: #202624;
  --white: #ffffff;
  --mist: #eef2ee;
  --border: #d8ded6;
  --focus: #c48a48;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal-text);
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.screen-reader-text,
.canopy-hidden-field {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner,
.footer-inner,
.section-inner,
.hero-content {
  margin: 0 auto;
  max-width: 1180px;
  width: min(100% - 40px, 1180px);
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  min-height: 86px;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-placeholder {
  align-items: center;
  background: var(--warm-cream);
  border: 1px solid var(--bronze-accent);
  color: var(--primary-forest-green);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  line-height: 1.1;
  padding: 0 10px;
  text-align: center;
  text-transform: uppercase;
  width: 112px;
}

.custom-logo {
  display: block;
  height: auto;
  max-height: 52px;
  max-width: 180px;
  width: auto;
}

.brand-name {
  color: var(--primary-forest-green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}

.desktop-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 18px;
  justify-content: flex-end;
}

.desktop-nav a,
.footer-nav a {
  color: var(--slate-gray);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.desktop-nav a:hover,
.footer-nav a:hover {
  color: var(--primary-forest-green);
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  background: var(--primary-forest-green);
  color: var(--white);
}

.button-primary:hover {
  background: #0e2d26;
}

.button-secondary {
  background: transparent;
  border-color: var(--bronze-accent);
  color: var(--primary-forest-green);
}

.button-secondary:hover {
  background: var(--warm-cream);
}

.button-light {
  background: var(--white);
  color: var(--primary-forest-green);
}

.button-light:hover {
  background: var(--warm-cream);
}

.hero .button-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: #d6a96b;
  color: var(--white);
}

.hero .button-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.mobile-nav {
  display: none;
  margin-left: auto;
}

.mobile-nav summary {
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
  padding: 10px 14px;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(17, 44, 37, 0.14);
  display: grid;
  gap: 12px;
  min-width: 280px;
  padding: 18px;
  position: absolute;
  right: 20px;
  top: 72px;
}

.mobile-nav nav a {
  color: var(--slate-gray);
  text-decoration: none;
}

.hero {
  background:
    linear-gradient(90deg, rgba(18, 56, 47, 0.92), rgba(18, 56, 47, 0.72)),
    linear-gradient(135deg, #12382f 0%, #596d63 52%, #a97843 100%);
  color: var(--white);
  min-height: 640px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  background:
    linear-gradient(160deg, transparent 0 52%, rgba(245, 239, 227, 0.22) 52.2% 54%, transparent 54.2%),
    linear-gradient(145deg, transparent 0 58%, rgba(169, 120, 67, 0.35) 58.2% 60%, transparent 60.2%);
  bottom: 0;
  content: "";
  height: 45%;
  left: 0;
  position: absolute;
  right: 0;
}

.hero-visual {
  border: 1px solid rgba(245, 239, 227, 0.5);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  max-width: 420px;
  padding: 12px 14px;
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  text-transform: uppercase;
  top: 120px;
  width: calc(100% - 48px);
}

.hero-content {
  padding: 130px 0 120px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 820px;
}

.hero-body {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  line-height: 1.75;
  margin: 26px 0 0;
  max-width: 710px;
}

.eyebrow {
  color: var(--bronze-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e5bf8a;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.section {
  padding: 88px 0;
}

.section-light {
  background: var(--white);
}

.section-cream {
  background: var(--warm-cream);
}

.section-green {
  background: var(--primary-forest-green);
  color: var(--white);
}

.section-inner.narrow {
  max-width: 840px;
}

h1,
h2,
h3 {
  color: var(--primary-forest-green);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

.hero h1,
.section-green h2,
.section-green h3 {
  color: var(--white);
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.35rem);
}

h3 {
  font-size: 1.35rem;
}

.section p {
  color: var(--slate-gray);
  font-size: 1.08rem;
  margin: 22px 0 0;
  max-width: 820px;
}

.card-grid {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.portfolio-card,
.form-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}

.info-card {
  min-height: 230px;
}

.info-card p,
.portfolio-card p {
  font-size: 1rem;
}

.portfolio-teaser {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.cta-band {
  background: var(--primary-forest-green);
  color: var(--white);
}

.cta-inner {
  align-items: center;
  display: flex;
  gap: 32px;
  justify-content: space-between;
}

.cta-band h2,
.cta-band p,
.section-green p {
  color: var(--white);
}

.cta-band p,
.section-green p {
  color: rgba(255, 255, 255, 0.84);
}

.fit-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}

.fit-list li {
  background: var(--warm-cream);
  border-left: 4px solid var(--bronze-accent);
  border-radius: 8px;
  color: var(--charcoal-text);
  font-weight: 650;
  padding: 18px 20px;
}

.portfolio-card {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 180px 1fr;
  margin-top: 34px;
}

.company-logo-placeholder {
  align-items: center;
  background: var(--warm-cream);
  border: 1px dashed var(--bronze-accent);
  color: var(--primary-forest-green);
  display: flex;
  font-size: 0.8rem;
  font-weight: 800;
  justify-content: center;
  min-height: 140px;
  padding: 18px;
  text-align: center;
  text-transform: uppercase;
}

.company-label {
  color: var(--bronze-accent);
  font-weight: 800;
  margin: 8px 0 0;
  text-transform: uppercase;
}

.form-panel {
  margin-top: 34px;
}

.inquiry-form {
  display: grid;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

label {
  color: var(--primary-forest-green);
  font-weight: 750;
}

input,
select,
textarea {
  border: 1px solid #bfc8c0;
  border-radius: 6px;
  color: var(--charcoal-text);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

[aria-invalid="true"] {
  border-color: #9d3328;
}

.form-error {
  color: #9d3328;
  font-size: 0.92rem;
  margin: 0;
}

.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-status p {
  background: #e6f1ea;
  border: 1px solid #a9cbb6;
  border-radius: 8px;
  color: #183b2d;
  margin: 0;
  padding: 14px 16px;
}

.privacy-note {
  color: var(--slate-gray);
  font-weight: 700;
  margin-top: 22px;
}

.site-footer {
  background: #1d2825;
  color: var(--white);
}

.footer-inner {
  display: grid;
  gap: 36px;
  grid-template-columns: 1.35fr 1fr 1.1fr;
  padding: 58px 0;
}

.footer-brand p,
.footer-cta p {
  color: rgba(255, 255, 255, 0.76);
  margin: 18px 0 0;
}

.brand-footer .brand-name {
  color: var(--white);
}

.footer-nav {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.76);
}

.site-footer .button-secondary {
  border-color: #d6a96b;
  color: var(--white);
}

.site-footer .button-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin: 0 auto;
  max-width: 1180px;
  padding: 18px 0 24px;
  width: min(100% - 40px, 1180px);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.page-content {
  max-width: 780px;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .header-button {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .header-inner {
    min-height: 76px;
  }
}

@media (max-width: 860px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding: 106px 0 170px;
  }

  .hero-visual {
    bottom: 28px;
    max-width: none;
    right: 20px;
    top: auto;
  }

  .section {
    padding: 68px 0;
  }

  .grid-two,
  .grid-three,
  .grid-four,
  .fit-list,
  .form-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    grid-template-columns: 1fr;
  }

  .portfolio-teaser,
  .cta-inner {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .hero-content,
  .footer-bottom {
    width: min(100% - 28px, 1180px);
  }

  .brand-name {
    display: none;
  }

  .brand-placeholder {
    width: 104px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .button {
    width: 100%;
  }

  .mobile-nav nav {
    left: 14px;
    min-width: 0;
    right: 14px;
  }
}
