/* ==========================================================================
   Flourish Foster Closet — base stylesheet
   Palette and type sampled from the client mockup (see README.md).
   ========================================================================== */

:root {
  /* Brand colors */
  --sage:        #627669;   /* buttons, mission panel, footer */
  --sage-dark:   #51645a;   /* hover state */
  --sage-text:   #5b6c62;   /* script headings, logo */
  --pink:        #da9391;   /* buttons */
  --pink-dark:   #cf807e;   /* hover state */
  --pink-text:   #d4908f;   /* accent headline text */

  /* Neutrals */
  --ink:         #5f6761;   /* body copy */
  --ink-soft:    #7a7f79;   /* captions, descriptions */
  --ink-strong:  #4c524d;   /* icon strokes, feature titles */
  --paper:       #fefcfb;   /* page background */
  --cream:       #f8f7f4;   /* hero fill */
  --blush:       #fcf4f2;   /* services band */
  --sand:        #f1ede5;   /* footer bottom bar */

  /* Tints for icon circles */
  --tint-sage:   #dfe5da;
  --tint-pink:   #f5dad9;

  /* Lines */
  --rule:        #e8ddd9;
  --rule-sage:   #c9d2cb;

  /* Type */
  --font-body:   "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Oooh Baby", "Brush Script MT", cursive;

  /* Layout */
  --container:   1160px;
  --gutter:      clamp(20px, 4vw, 40px);
  --radius-pill: 999px;
  --header-h:    136px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;        /* 17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--sage); color: #fff; border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
}
.icon--sm { width: 1em; height: 1em; }
.icon--pink { color: var(--pink); display: inline-block; vertical-align: -0.25em; }

/* Script display face */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .8em 1.7em;
  border-radius: var(--radius-pill);
  font-size: .9375rem; font-weight: 500; line-height: 1.2;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 1.15em; height: 1.15em; }

.btn--sage  { background: var(--sage); color: #fff; }
.btn--sage:hover { background: var(--sage-dark); }

.btn--pink  { background: var(--pink); color: #fff; }
.btn--pink:hover { background: var(--pink-dark); }

.btn--light { background: #fff; color: var(--sage); }
.btn--light:hover { background: var(--blush); }

.btn--sm { padding: .65em 1.4em; font-size: .875rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  color: var(--ink);
  transition: background-color .2s ease;
}
.icon-btn:hover { background: var(--blush); }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: relative; z-index: 20;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.site-header__inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: var(--header-h);
}

.site-logo { flex: none; }
.site-logo img { width: 290px; height: auto; }

.site-nav {
  display: flex; align-items: center; justify-content: flex-end; gap: 2.25rem;
  flex: 1 1 auto;
}
.site-nav__list {
  display: flex; align-items: center; gap: 1.9rem;
  font-size: .9375rem; color: var(--ink);
}
.site-nav__list > li { position: relative; }
.site-nav__list > li > a,
.site-nav__dropdown-toggle {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .35rem 0;
  position: relative;
  transition: color .2s ease;
}
.site-nav__list > li > a:hover,
.site-nav__dropdown-toggle:hover { color: var(--sage-text); }

.site-nav__list a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--sage);
}

.site-nav__dropdown-toggle .icon { color: var(--ink-soft); transition: transform .2s ease; }
.site-nav__dropdown-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.dropdown {
  position: absolute; left: 50%; top: calc(100% + .6rem);
  transform: translateX(-50%);
  min-width: 11rem;
  padding: .5rem 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(60, 70, 64, .14);
  opacity: 0; visibility: hidden; translate: 0 6px;
  transition: opacity .18s ease, translate .18s ease, visibility .18s;
}
.dropdown::before {
  content: ""; position: absolute; left: 50%; top: -6px;
  width: 12px; height: 12px; background: #fff;
  transform: translateX(-50%) rotate(45deg);
}
.has-dropdown.is-open .dropdown,
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; translate: 0 0; }

.dropdown a {
  display: block; padding: .55rem 1.25rem; font-size: .9rem;
}
.dropdown a:hover { background: var(--blush); color: var(--sage-text); }

.site-nav__actions { display: flex; align-items: center; gap: .9rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem; height: 2.75rem;
  align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink);
}
.nav-toggle .icon { width: 1.6rem; height: 1.6rem; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--cream);
  overflow: hidden;
  min-height: 440px;
  display: flex; align-items: center;
}
.hero__media {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    var(--cream) 0%, var(--cream) 34%,
    rgba(248,247,244,.88) 44%,
    rgba(248,247,244,0) 60%);
}
.hero__inner { position: relative; padding-block: 3.5rem; }
.hero__content { max-width: 27rem; }

.hero__title {
  font-size: clamp(2.75rem, 5.2vw, 3.9rem);
  color: var(--sage-text);
  margin-bottom: 1.4rem;
  white-space: nowrap;
}
.hero__title-line { display: block; }
.hero__title-line--indent { padding-left: .75em; }
.hero__title-accent { color: var(--pink-text); padding-left: 1.7em; }

.hero__lead {
  max-width: 23.5rem;
  margin-bottom: 1.6rem;
  font-size: 1rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Feature grids (services band + how you can help)
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1rem;
  text-align: center;
}
.feature-grid--divided .feature + .feature { border-left: 1px solid var(--rule); }

.feature { padding-inline: 1rem; }
.feature__link { display: block; }

.feature__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  margin-bottom: 1.1rem;
  color: var(--ink-strong);
  transition: transform .25s ease;
}
.feature__icon .icon { width: 2.2rem; height: 2.2rem; }
.feature__icon--sage { background: var(--tint-sage); }
.feature__icon--pink { background: var(--tint-pink); }
.feature__link:hover .feature__icon { transform: translateY(-3px); }

.feature__title {
  font-size: .9375rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-strong);
  margin-bottom: .55rem;
}
.feature__text {
  font-size: .9375rem; line-height: 1.55;
  color: var(--ink-soft);
  max-width: 17rem; margin-inline: auto;
}

.services { background: var(--blush); padding-block: 3rem; }

/* --------------------------------------------------------------------------
   Mission
   -------------------------------------------------------------------------- */
.mission {
  display: grid;
  grid-template-columns: 41fr 59fr;
  min-height: 300px;
}
.mission__media img { width: 100%; height: 100%; object-fit: cover; }

.mission__panel {
  background: var(--sage); color: #fff;
  display: flex; align-items: center;
  padding: 3.5rem clamp(1.5rem, 6vw, 5.5rem);
}
.mission__content { max-width: 34rem; }
.mission__title {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  margin-bottom: 1rem;
}
.mission__content p { margin-bottom: 1.6rem; font-size: 1.0625rem; line-height: 1.6; }

/* --------------------------------------------------------------------------
   How you can help
   -------------------------------------------------------------------------- */
.help { padding-block: 3.5rem 4rem; }

.section-title {
  display: flex; align-items: center; gap: 1.75rem;
  color: var(--sage-text);
  font-size: clamp(2.3rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title::before,
.section-title::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--rule-sage);
}
.section-title span { padding-inline: .25rem; }

.help .feature__icon { width: 4rem; height: 4rem; }
.help .feature__icon .icon { width: 1.8rem; height: 1.8rem; }
.help .feature__title { font-size: .875rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--sage); color: #fff; --icon-contrast: var(--sage); }

.site-footer__inner {
  display: flex; align-items: center; gap: 2.5rem;
  padding-block: 1.6rem;
}
.site-footer__logo { flex: none; }
.site-footer__logo img { width: 160px; height: auto; }

.social { display: flex; gap: 1.1rem; }
.social a {
  display: inline-flex; color: #fff;
  transition: opacity .2s ease, transform .2s ease;
}
.social .icon { width: 1.65rem; height: 1.65rem; }
.social a:hover { opacity: .85; transform: translateY(-1px); }

.site-footer__location {
  display: flex; align-items: center; gap: .75rem;
  margin-left: auto;
  padding-right: 2.5rem;
  border-right: 1px solid rgba(255,255,255,.3);
  font-size: .875rem; line-height: 1.5;
}
.site-footer__location .icon { width: 1.4rem; height: 1.4rem; }
.site-footer__location strong { display: block; font-weight: 500; }
.site-footer__location span { opacity: .9; }

.newsletter { flex: none; }
.newsletter__label {
  display: block; font-size: .875rem; font-weight: 500; margin-bottom: .45rem;
}
.newsletter__row { display: flex; gap: .6rem; }
.newsletter input {
  width: 13rem; padding: .62rem .95rem;
  border: 0; border-radius: 6px;
  background: #f8f8f6; color: var(--ink);
  font-size: .875rem;
}
.newsletter input::placeholder { color: #9aa09b; }

.site-footer__bottom {
  background: var(--sand); color: #a9aba3;
  font-size: .8125rem;
}
.site-footer__bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: .8rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .site-nav__list { gap: 1.3rem; }
  .site-nav { gap: 1.5rem; }
  .site-logo img { width: 250px; }
}

@media (max-width: 960px) {
  :root { --header-h: 96px; }

  .site-header__inner { flex-wrap: wrap; gap: 0; }
  .site-logo img { width: 220px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    flex-direction: column; align-items: stretch; gap: 1rem;
    width: 100%;
    padding: .5rem 0 1.5rem;
    border-top: 1px solid var(--rule);
  }
  .site-nav.is-open { display: flex; }

  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; font-size: 1rem; }
  .site-nav__list > li > a,
  .site-nav__dropdown-toggle { width: 100%; padding: .8rem 0; justify-content: space-between; }
  .site-nav__list a[aria-current="page"]::after { display: none; }
  .site-nav__list a[aria-current="page"] { color: var(--sage-text); font-weight: 500; }

  .dropdown {
    position: static; transform: none; translate: 0;
    min-width: 0; padding: 0 0 .5rem 1rem;
    box-shadow: none; background: transparent;
    display: none; opacity: 1; visibility: visible;
  }
  .dropdown::before { display: none; }
  .has-dropdown.is-open .dropdown { display: block; }
  .has-dropdown:hover .dropdown:not(.is-open) { display: none; }
  .has-dropdown.is-open:hover .dropdown { display: block; }
  .dropdown a { padding: .55rem 0; }

  .site-nav__actions { justify-content: flex-start; }

  .hero { min-height: 0; }
  .hero__media { position: relative; height: 300px; order: -1; }
  .hero__media::after {
    background: linear-gradient(180deg, rgba(248,247,244,0) 70%, var(--cream) 100%);
  }
  .hero { flex-direction: column; align-items: stretch; }
  .hero__inner { padding-block: 1.5rem 3rem; }
  .hero__content { max-width: 32rem; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
  .feature-grid--divided .feature + .feature { border-left: 0; }
  .feature-grid--divided .feature:nth-child(even) { border-left: 1px solid var(--rule); }

  .mission { grid-template-columns: 1fr; }
  .mission__media img { height: 260px; }
  .mission__panel { padding: 3rem var(--gutter); }

  .site-footer__inner { flex-wrap: wrap; gap: 1.5rem 2.5rem; padding-block: 2.25rem; }
  .site-footer__location { margin-left: 0; padding-right: 0; border-right: 0; }
  .newsletter { width: 100%; }
  .newsletter input { flex: 1 1 auto; width: auto; }
  .site-footer__bottom-inner { flex-direction: column; text-align: center; gap: .25rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid--divided .feature:nth-child(even) { border-left: 0; }
  .hero__title { white-space: normal; font-size: clamp(2.4rem, 11vw, 2.75rem); }
  .hero__title-line--indent { padding-left: .4em; }
  .hero__title-accent { padding-left: .8em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
