/* =========================================================================
   Garden Lady Concepts — site styles
   -------------------------------------------------------------------------
   Layout and components. Uses ONLY the variables defined in brand.css —
   to change a color, font, or spacing value, edit brand.css, not this file.

   Contents:
     1. Base / reset
     2. Layout helpers (container, section, split)
     3. Typography helpers (eyebrow, lead)
     4. Buttons
     5. Header & nav
     6. Hero
     7. Services
     8. Service-area band
     9. Contact
    10. Footer
    11. Accessibility helpers
   ========================================================================= */


/* 1. Base / reset ======================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Leave room for the sticky header when jumping to #sections */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0 0 var(--space-4);
  color: var(--color-heading);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-accent-hover);
}

figure {
  margin: 0;
}

ul[role="list"] {
  margin: 0;
  padding: 0;
  list-style: none;
}


/* 2. Layout helpers ====================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-padding);
}

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

/* Two columns (image + text) on wide screens, stacked on phones */
.split {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 5fr 6fr;
  }
}

.split__media img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}


/* 3. Typography helpers ================================================== */

/* Small all-caps label above a heading */
.eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-cedar);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.eyebrow--light {
  color: var(--color-moss-light);
}

.lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}


/* 4. Buttons ============================================================= */

.button {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.button:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-white);
}

.button--small {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

/* Outline button for use on top of photos */
.button--ghost {
  border-color: var(--color-text-on-dark);
  background: transparent;
  color: var(--color-text-on-dark);
}

.button--ghost:hover {
  border-color: var(--color-text-on-dark);
  background: var(--color-text-on-dark);
  color: var(--color-forest);
}


/* 5. Header & nav ======================================================== */

.preview-banner {
  padding: var(--space-2) var(--gutter);
  background: var(--color-forest-deep);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-bg-alt);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

/* Text logo. Swap for an <img> once a logo file exists. */
.wordmark {
  margin: 0;
  color: var(--color-forest);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  text-decoration: none;
}

.wordmark span {
  color: var(--color-cedar);
  font-weight: var(--weight-regular);
}

.wordmark:hover {
  color: var(--color-forest);
}

.wordmark--light,
.wordmark--light span {
  color: var(--color-text-on-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav ul {
  display: none; /* hidden on phones: the page is one scroll, and the button stays */
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.site-nav ul a:hover {
  color: var(--color-accent);
}

@media (min-width: 48rem) {
  .site-nav ul {
    display: flex;
  }
}


/* 6. Hero ================================================================ */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 46rem);
  overflow: hidden;
  color: var(--color-text-on-dark);
}

/* Photo fills the hero behind the text */
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

/* Dark gradient so white text stays readable on the bright photo */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--color-forest-deep) 0%,
    var(--color-image-overlay) 65%,
    rgb(38 48 42 / 0.3) 100%  /* light tint at the top so text stays readable on phones */
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-8);
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.35); /* extra legibility over bright spots */
}

.hero__content .button {
  text-shadow: none;
}

.hero__title {
  max-width: 14ch;
  color: var(--color-text-on-dark);
}

.hero__lead {
  max-width: 36rem;
  font-size: var(--text-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero__location {
  margin: var(--space-5) 0 0;
  color: var(--color-moss-light);
  font-weight: var(--weight-semibold);
}


/* 7. Services ============================================================ */

.services__intro {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  margin-bottom: var(--space-7);
}

.services__accent {
  display: none; /* decorative; shown on wider screens only */
  width: 100%;
  max-width: 16rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
  justify-self: end;
}

@media (min-width: 48rem) {
  .services__intro {
    grid-template-columns: 2fr 1fr;
  }

  .services__accent {
    display: block;
  }
}

/* Service cards: 1 column on phones, 2 on tablets, 4 across on desktop.
   If you change the number of cards, adjust the desktop column count. */
.cards {
  display: grid;
  gap: var(--space-5);
}

/* minmax(0, 1fr) keeps columns equal even when a long word won't fit */
@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 68rem) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  padding: var(--space-6);
  border-top: 4px solid var(--color-moss);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: var(--text-lg);
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}


/* 8. Service-area band =================================================== */

.band {
  position: relative;
  padding-block: var(--section-padding);
  overflow: hidden;
  color: var(--color-text-on-dark);
  text-align: center;
}

.band__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-image-overlay);
}

.band__content {
  position: relative;
  z-index: 1;
  max-width: var(--container-narrow);
}

.band h2 {
  color: var(--color-text-on-dark);
}

.band p:last-child {
  margin-bottom: 0;
  font-size: var(--text-lg);
}


/* 9. Contact ============================================================= */

.contact {
  text-align: center;
}

.contact .button {
  margin-top: var(--space-4);
}

.contact__email {
  margin: var(--space-5) 0 0;
  color: var(--color-text-muted);
}


/* 10. Footer ============================================================= */

.site-footer {
  padding-block: var(--space-7);
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-footer p {
  margin: 0;
}

/* Social links (commented out in index.html until accounts exist) */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.social-links a {
  color: var(--color-text-on-dark);
}

.social-links a:hover {
  color: var(--color-moss-light);
}


/* 11. Accessibility helpers ============================================== */

/* "Skip to content" link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-forest);
  color: var(--color-text-on-dark);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Clear focus ring for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Respect the "reduce motion" system setting */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
