/* Desert Mesa Gardens styles. Mobile first.
   Kraft seed packet look: flat cut-paper shapes in tans and browns. */

:root {
  --parchment: #F4ECDF;
  --sand: #E9DCC6;
  --khaki: #C9B08A;
  --saddle: #8B5E3C;
  --espresso: #3B2A1E;
  --ink: #2A1F17;
  /* Terracotta darkened from #A8502E and sage from #6F7A55 so every text pair passes 4.5:1. */
  --terracotta: #9C4A2A;
  --sage: #5F6A47;
  --card: #FBF7F0;

  --shadow: 4px 4px 0 var(--saddle);
  --shadow-hover: 6px 6px 0 var(--saddle);
  --radius-card: 14px;
  --radius-pill: 999px;

  --font-head: "Alfa Slab One", Georgia, serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --header-h: 76px;
}

/* Base */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--parchment);
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

/* One key word per heading. */
.accent {
  color: var(--terracotta);
}

[hidden] {
  display: none !important;
}

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

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--parchment);
}

.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: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1.1rem;
  background: var(--parchment);
  color: var(--ink);
  border: 2px solid var(--espresso);
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 820px;
}

.section {
  padding: 3.5rem 0;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* Logo seal: the logo on a solid espresso circle, baked into the image. */

.seal {
  display: block;
  border-radius: 50%;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--espresso);
  border-radius: var(--radius-pill);
  background: var(--espresso);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--saddle);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
}

/* On the espresso header: a parchment pill so it stands out. */
.btn--light {
  background: var(--parchment);
  border-color: var(--parchment);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--khaki);
}

.btn--light:hover {
  box-shadow: 6px 6px 0 var(--khaki);
}

.btn--light:active {
  box-shadow: 2px 2px 0 var(--khaki);
}

.btn--small {
  min-height: 44px;
  padding: 0.5rem 1.15rem;
  font-size: 0.9375rem;
}

/* Badges */

.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  background: var(--khaki);
  color: var(--ink);
}

.badge--sage {
  background: var(--sage);
  color: var(--parchment);
}

.badge--terracotta {
  background: var(--terracotta);
  color: var(--parchment);
}

.badge--khaki {
  background: var(--khaki);
  color: var(--ink);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--espresso);
  color: var(--parchment);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
}

.brand__logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid var(--parchment);
  border-radius: 12px;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--parchment);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0 16px;
  width: 100%;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-color: var(--khaki);
}

/* Without JavaScript the menu simply wraps below the brand. */
.header-inner {
  flex-wrap: wrap;
}

.js .header-inner {
  flex-wrap: nowrap;
}

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

.js .site-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 22px;
  background: var(--espresso);
}

.js .site-menu.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .brand__name {
    font-size: 1.375rem;
  }

  .brand__logo {
    width: 60px;
    height: 60px;
  }

  .header-inner,
  .js .header-inner {
    flex-wrap: nowrap;
  }

  .js .nav-toggle {
    display: none;
  }

  .site-menu,
  .js .site-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    width: auto;
    padding: 0;
    background: none;
  }

  .nav-list {
    flex-direction: row;
    gap: 24px;
    width: auto;
  }
}

/* Mesa band */

.mesa {
  display: block;
  width: 100%;
}

.mesa--hero {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: 0;
}

.mesa--divider {
  aspect-ratio: 1200 / 200;
  height: auto;
  max-height: 120px;
}

@media (min-width: 768px) {
  .mesa--hero {
    height: 180px;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 0 170px;
}

.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 1rem + 5vw, 5.25rem);
  margin-bottom: 0.35em;
}

.hero__sub {
  font-size: 1.1875rem;
  max-width: 36ch;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
}

.hero__art {
  justify-self: center;
  width: 100%;
  max-width: 360px;
}

.hero__art img {
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .hero {
    padding: 3rem 0 220px;
  }
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
  }

  .hero__art {
    justify-self: end;
    max-width: 460px;
  }
}

/* Notice strip */

.notice {
  position: relative;
  z-index: 1;
  background: var(--espresso);
  color: var(--parchment);
  padding: 14px var(--gutter);
  text-align: center;
  font-weight: 700;
  font-size: 1.0625rem;
}

.notice p {
  margin: 0;
}

/* Shop */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 2rem;
}

.pill {
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--saddle);
  border-radius: var(--radius-pill);
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pill:hover {
  background: var(--sand);
}

.pill[aria-pressed="true"] {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--parchment);
}

.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  background: var(--card);
  border: 2px solid var(--saddle);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.card:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

.card__media,
.modal__media {
  padding: 14px;
  border-radius: 10px;
  background: var(--khaki);
}

/* No photo yet: one plain khaki block, same size as a framed photo. */
.photo-soon {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.card__media img,
.modal__media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--sand);
}

.card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 16px 4px 4px;
}

.card__title {
  font-size: 1.375rem;
  margin: 12px 0 8px;
}

.card__open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.card__open:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  text-decoration-color: var(--terracotta);
}

.card__desc {
  margin-bottom: 1rem;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: auto;
}

.card__price,
.modal__price {
  font-family: var(--font-head);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  color: var(--saddle);
  margin: 0;
  overflow-wrap: anywhere;
}

.noscript-note {
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--saddle);
  border-radius: var(--radius-card);
}

.noscript-note a {
  font-weight: 700;
}

/* About */

.about {
  position: relative;
  overflow: hidden;
  background: var(--sand);
  padding: 3rem 0 3.5rem;
}

.about__inner {
  display: grid;
  gap: 1rem;
}

.about__text {
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  .about {
    padding: 4rem 0 4.5rem;
  }

  .about__inner {
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: start;
  }
}

/* FAQ */

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--card);
  border: 2px solid var(--saddle);
  border-radius: var(--radius-card);
}

.faq-item__heading {
  margin: 0;
  font-family: var(--font-body);
  letter-spacing: 0;
  line-height: 1.3;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.faq-q:hover {
  background: var(--parchment);
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--espresso);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 3px;
  background: var(--parchment);
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.2s ease;
}

.faq-q[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-a {
  padding: 0 18px 4px;
}

/* Footer */

.site-footer {
  background: var(--espresso);
  color: var(--parchment);
  padding: 3rem 0 2.5rem;
}

.footer-inner > * {
  margin: 0 0 0.75rem;
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--parchment);
  font-weight: 700;
  text-decoration-color: var(--khaki);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.copyright {
  font-size: 0.9375rem;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 31, 23, 0.6);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin-right: 6px;
  background: var(--card);
  border: 2px solid var(--saddle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  animation: modal-in 0.2s ease-out;
}

.modal__scroll {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 2 * var(--gutter) - 10px);
  max-height: calc(100dvh - 2 * var(--gutter) - 10px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 12px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--espresso);
  color: var(--parchment);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--saddle);
}

.modal__close svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.modal__media {
  align-self: start;
}

.modal__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.modal__title {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  margin: 14px 0 10px;
}

.modal__price {
  margin-bottom: 1rem;
}

.modal__subhead {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.modal__details {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.modal__details li {
  margin-bottom: 0.25rem;
}

.modal__details li::marker {
  color: var(--saddle);
}

@media (min-width: 768px) {
  .modal__scroll {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 28px;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Shipping page */

.page-head {
  padding-top: 3rem;
  padding-bottom: 1.5rem;
}

.page-head h1 {
  font-size: clamp(2.25rem, 1.5rem + 4vw, 4rem);
  margin: 0;
}

.policy-band {
  background: var(--sand);
}

.policy-list {
  display: grid;
  gap: 20px;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.policy {
  padding: 22px;
  background: var(--card);
  border: 2px solid var(--saddle);
  border-radius: var(--radius-card);
}

.policy h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
}

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

.policy a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Reduced motion: no lifts, no modal animation, no smooth scroll. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover,
  .btn:active,
  .card:hover,
  .card:focus-within {
    transform: none;
  }

  .btn:hover {
    box-shadow: var(--shadow);
  }

  .btn--light:hover {
    box-shadow: 4px 4px 0 var(--khaki);
  }
}
