/* ========================================================================
   Echelon Capital Group — Stylesheet
   ======================================================================== */

/* -----------------------------------------------------------------------
   Section 1: Custom Properties
   ----------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-navy: #1A3328;
  --color-navy-dark: #0F2119;
  --color-green: #357A3B;
  --color-brass: #8C6F40;
  --color-bg: #F7F8F6;
  --color-white: #FFFFFF;
  --color-border: #D6DCD7;
  --color-text: #2C2C2C;
  --color-text-secondary: #5A5A5A;
  --color-text-muted: #717171;
  --color-error: #B91C1C;
  --color-success: #2E7D3B;
  --color-landscaping: #4A8B5A;
  --color-contracting: #4A4A4A;
  --color-painting: #A0664B;
  --color-logo-green: #3A7B40;
  --gradient-hero: linear-gradient(160deg, #1A3328 0%, #0F2119 100%);

  /* Spacing */
  --nav-height: 4.5rem;
  --section-py: 6rem;
  --section-heading-gap: 3rem;
  --container-max: 75rem;
  --container-px: 1.5rem;
  --content-max: 44rem;
  --grid-gap: 2rem;
  --card-padding: 2rem;
  --form-max: 36rem;
  --form-gap: 1.5rem;
  --footer-py: 1.5rem;
}

/* -----------------------------------------------------------------------
   Section 2: Reset
   ----------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1.063rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
}

input,
select,
textarea {
  font: inherit;
}

/* -----------------------------------------------------------------------
   Section 3: Typography
   ----------------------------------------------------------------------- */
h1,
h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 {
  font-size: 3.25rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   Section 4: Container
   ----------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* -----------------------------------------------------------------------
   Section 5: Navigation
   ----------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 300ms ease-out;
}

.nav--scrolled {
  box-shadow: 0 1px 4px rgba(26, 51, 40, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  transition: opacity 150ms ease-out;
}

.nav__logo:hover {
  opacity: 0.7;
}

.nav__logo:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

.nav__logo-img {
  height: 3rem;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-green);
  border-bottom-color: var(--color-green);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-navy);
  border-radius: 1px;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.nav__hamburger--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Panel */
.nav__panel {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  bottom: 0;
  width: 280px;
  z-index: 99;
  background-color: var(--color-white);
  border-left: 1px solid var(--color-border);
  transform: translateX(100%);
  transition: transform 300ms ease-out;
  padding: 2rem 1.5rem;
}

.nav__panel--open {
  transform: translateX(0);
}

.nav__panel .nav__links {
  flex-direction: column;
  gap: 1.5rem;
}

.nav__panel .nav__link {
  font-size: 1rem;
}

/* Scrim Overlay */
.nav__scrim {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 98;
  background-color: rgba(26, 51, 40, 0.20);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}

.nav__scrim--visible {
  opacity: 1;
  pointer-events: auto;
}

/* -----------------------------------------------------------------------
   Section 6: Hero
   ----------------------------------------------------------------------- */
.hero {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: calc(var(--nav-height) + 3rem) var(--container-px) 3rem;
  text-align: center;
}

.hero__content {
  max-width: var(--content-max);
}

.hero__title {
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.hero__cta {
  display: inline-block;
  background-color: var(--color-green);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 2.25rem;
  border-radius: 6px;
  border: 2px solid var(--color-green);
  transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

.hero__cta:hover {
  background-color: #2E6A33;
  border-color: #2E6A33;
}

.hero__cta:active {
  background-color: #265C2B;
  border-color: #265C2B;
  transform: scale(0.98);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------
   Section 7: Sections (shared) + Company Cards
   ----------------------------------------------------------------------- */
.section {
  padding: var(--section-py) 0;
}

.section--alt {
  background-color: var(--color-bg);
}

.section--white {
  background-color: var(--color-white);
}

.section__header {
  text-align: center;
  margin-bottom: var(--section-heading-gap);
}

.section__intro {
  max-width: var(--content-max);
  margin: 0 auto var(--section-heading-gap);
  text-align: center;
  color: var(--color-text-secondary);
}

/* Companies Grid */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

/* Card Base */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--card-padding);
  box-shadow:
    0 1px 3px rgba(26, 51, 40, 0.06),
    0 1px 2px rgba(26, 51, 40, 0.04);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(26, 51, 40, 0.08),
    0 2px 4px rgba(26, 51, 40, 0.04);
}

/* Card Top Borders */
.card--landscaping {
  border-top: 3px solid var(--color-landscaping);
}

.card--contracting {
  border-top: 3px solid var(--color-contracting);
}

.card--painting {
  border-top: 3px solid var(--color-painting);
}

/* Coming-Soon / Future Card */
.card--future {
  border: 1.5px dashed var(--color-border);
  background-color: var(--color-bg);
  cursor: default;
}

.card--future:hover {
  transform: none;
  box-shadow:
    0 1px 3px rgba(26, 51, 40, 0.06),
    0 1px 2px rgba(26, 51, 40, 0.04);
}

.card--future h3 {
  opacity: 0.7;
}

.card--future p {
  opacity: 0.5;
}

/* Card Icon */
.card svg {
  width: 28px;
  height: 28px;
  margin-bottom: 1rem;
}

.card:not(.card--future) svg {
  padding: 14px;
  width: 56px;
  height: 56px;
  background-color: var(--color-bg);
  border-radius: 12px;
}

.card--landscaping svg {
  color: var(--color-landscaping);
}

.card--contracting svg {
  color: var(--color-contracting);
}

.card--painting svg {
  color: var(--color-painting);
}

.card--future svg {
  width: 56px;
  height: 56px;
  padding: 14px;
  background-color: transparent;
  border: 1.5px dashed var(--color-border);
  border-radius: 12px;
  opacity: 0.4;
  color: var(--color-text-muted);
}

/* Card Content */
.card h3 {
  font-size: 1.188rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.938rem;
  color: var(--color-text-secondary);
}

.card__meta {
  font-size: 0.813rem !important;
  color: var(--color-text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card a {
  display: inline-block;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--color-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
  transition: color 150ms ease-out;
}

.card a span {
  display: inline-block;
  transition: transform 150ms ease-out;
}

.card a:hover span {
  transform: translateX(3px);
}

.card a:hover {
  color: #2E6A33;
}

/* -----------------------------------------------------------------------
   Section 8: About
   ----------------------------------------------------------------------- */
.about__content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.about__content p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* -----------------------------------------------------------------------
   Section 9: Contact + Form
   ----------------------------------------------------------------------- */
.contact__info {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact__detail {
  font-size: 0.938rem;
  color: var(--color-text-secondary);
}

.contact__detail a {
  color: var(--color-green);
  transition: color 150ms ease-out;
}

.contact__detail a:hover {
  color: #2E6A33;
}

/* Contact Form */
.contact-form {
  max-width: var(--form-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--form-gap);
}

.contact-form > div {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.contact-form label {
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-form input,
.contact-form select {
  height: 44px;
  padding: 0 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.contact-form textarea {
  height: auto;
  min-height: 140px;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--color-white);
  color: var(--color-text);
  resize: vertical;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

/* Select custom chevron */
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A5A5A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

/* Focus States */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(53, 122, 59, 0.15);
}

/* Error States */
.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
  border-color: var(--color-error);
}

.contact-form input.error:focus,
.contact-form select.error:focus,
.contact-form textarea.error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

/* Form Error Text */
.form-error {
  font-size: 0.813rem;
  color: var(--color-error);
  display: block;
  min-height: 0;
  overflow: hidden;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
  transform: translateY(-4px);
  opacity: 0;
}

.form-error--visible {
  transform: translateY(0);
  opacity: 1;
}

/* Submit Button */
.form-submit {
  width: 100%;
  height: 48px;
  background-color: var(--color-green);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.form-submit:hover {
  background-color: #2E6A33;
}

.form-submit:active {
  background-color: #265C2B;
  transform: scale(0.98);
}

.form-submit:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-submit:disabled:hover {
  background-color: var(--color-green);
}

/* -----------------------------------------------------------------------
   Section 10: Toast
   ----------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background-color: var(--color-white);
  border: 1px solid #C2E8C6;
  border-left: 4px solid var(--color-success);
  border-radius: 6px;
  box-shadow:
    0 4px 12px rgba(26, 51, 40, 0.10),
    0 2px 4px rgba(26, 51, 40, 0.06);
  padding: 0.875rem 1.5rem;
  font-size: 0.938rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out, transform 300ms ease-out;
  z-index: 200;
  white-space: nowrap;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* -----------------------------------------------------------------------
   Section 11: Footer
   ----------------------------------------------------------------------- */
.footer {
  background-color: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--footer-py) 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__copy,
.footer__links,
.footer__note {
  font-size: 0.813rem;
}

.footer__links a {
  opacity: 0.65;
  transition: opacity 150ms ease-out, color 150ms ease-out;
}

.footer__links a:hover {
  opacity: 1;
  color: var(--color-white);
}

.footer__logo-img {
  height: 2.25rem;
  width: auto;
  display: block;
  opacity: 0.5;
  filter: brightness(0) invert(1);
  transition: opacity 150ms ease-out;
}

.footer__note {
  width: 100%;
  text-align: center;
  opacity: 0.45;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* -----------------------------------------------------------------------
   Section 12: Responsive Breakpoints
   ----------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  /* Nav */
  .nav__inner > .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 55vh;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.063rem;
  }

  /* Grid */
  .companies-grid {
    grid-template-columns: 1fr;
  }

  /* Sections */
  .section {
    padding: 4rem 0;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Cards */
  .card {
    padding: 1.5rem;
  }

  /* Logo */
  .nav__logo-img {
    height: 2rem;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__logo-img {
    height: 1.75rem;
  }

  /* Container */
  .container {
    padding: 0 1.25rem;
  }
}

/* Small Mobile — Toast */
@media (max-width: 480px) {
  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(1rem);
    white-space: normal;
  }

  .toast--visible {
    transform: translateX(0) translateY(0);
  }
}

/* -----------------------------------------------------------------------
   Section 13: Reduced Motion
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
