/* ==========================================================================
   Melisa Trading L.L.C
   Brand red #b5201f, sampled from the logo.
   ========================================================================== */

:root {
  --red: #b5201f;
  --red-dark: #8d1817;
  --red-deep: #5c0f0f;
  --red-light: #ef7c74; /* legible on dark backgrounds */

  --ink: #101014;
  --ink-panel: #16161b;
  --body: #4c4c55;
  --muted: #77777f;
  --line: #e5e1de;
  --line-dark: rgba(255, 255, 255, 0.13);
  --cream: #faf8f6;
  --white: #fff;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.038em;
}

h3 {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 0;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--red);
  color: #fff;
}

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

.section {
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.section--cream {
  background: var(--cream);
}

.section--dark {
  background: var(--ink-panel);
  color: rgba(255, 255, 255, 0.66);
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section--red {
  background: var(--red-dark);
  color: rgba(255, 255, 255, 0.78);
}

.section--red h2 {
  color: #fff;
}

.measure {
  max-width: 64ch;
}

.lede {
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--body);
}

.section--dark .lede,
.section--red .lede {
  color: inherit;
}

/* Section headers: eyebrow + title on a rule */
.head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.section--dark .head {
  border-top-color: var(--line-dark);
}

.head .eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.section--dark .head .eyebrow {
  color: var(--red-light);
}

.head h2 {
  margin: 0;
  max-width: 20ch;
}

.head p {
  margin: 0.9rem 0 0;
  max-width: 52ch;
  color: var(--muted);
}

.section--dark .head p {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--red);
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.btn svg {
  flex: none;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

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

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

.btn--light {
  background: #fff;
  border-color: #fff;
  color: var(--red-dark);
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.88);
  color: var(--red-dark);
}

.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn--ghost-light:hover {
  background: transparent;
  border-color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.25rem;
}

.textlink {
  color: var(--red);
  font-weight: 500;
  box-shadow: inset 0 -1px 0 rgba(181, 32, 31, 0.3);
  transition: box-shadow 0.2s var(--ease);
}

.textlink:hover {
  box-shadow: inset 0 -1px 0 var(--red);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header {
    background: var(--white);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  flex: none;
  display: flex;
}

.logo img {
  height: 48px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding-block: 0.35rem;
  font-size: 0.925rem;
  color: var(--body);
  transition: color 0.2s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.header-phone {
  flex: none;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.header-phone:hover {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before,
.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(168deg, #fdfcfb 0%, var(--cream) 58%, #f6ecea 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(4rem, 8vw, 7rem);
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 1.25rem;
}

.hero-mark {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Size the figure by height — it is tall and narrow, so width-driven sizing
   makes the hero far too deep. */
.hero-mark img {
  width: auto;
  height: clamp(300px, 34vw, 430px);
  max-width: 100%;
}

/* Soft halo behind the brand figure */
.hero-mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 118%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(224, 85, 79, 0.16) 0%,
    rgba(224, 85, 79, 0) 68%
  );
}

/* Capability strip beneath the hero */
.hero-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}

.hero-strip div {
  padding: 1.4rem 1.25rem 1.5rem 0;
}

.hero-strip span {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--red);
}

.hero-strip strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Interior page header */
.page-head {
  position: relative;
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
  background: linear-gradient(168deg, #fdfcfb 0%, var(--cream) 70%, #f7efee 100%);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 17ch;
  margin-bottom: 0.75rem;
}

.page-head p {
  max-width: 56ch;
  font-size: 1.075rem;
  color: var(--muted);
}

/* ==========================================================================
   Numbered index rows (what we do, categories, how to buy)
   ========================================================================== */
.rows {
  border-top: 1px solid var(--line);
}

.section--dark .rows {
  border-top-color: var(--line-dark);
}

.row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.9rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s var(--ease);
}

.section--dark .row {
  border-bottom-color: var(--line-dark);
}

a.row:hover {
  background: rgba(181, 32, 31, 0.03);
}

.section--dark a.row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.row-index {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.section--dark .row-index {
  color: var(--red-light);
}

.row h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

.row p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.section--dark .row p {
  color: rgba(255, 255, 255, 0.6);
}

.row-go {
  display: none;
}

/* ==========================================================================
   Store cards
   ========================================================================== */
.stores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.store {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.store:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.store h3 {
  margin-bottom: 0.35rem;
}

.store p {
  margin: 0 0 1.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.store span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--red);
}

.store svg {
  transition: transform 0.2s var(--ease);
}

.store:hover svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.details {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.details > div {
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.details h3 {
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.details p {
  margin: 0;
  color: var(--ink);
}

.details a:hover {
  color: var(--red);
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(16, 16, 20, 0.06);
}

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.35rem;
}

.form-foot p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
}

.form-status {
  display: none;
  grid-column: 1 / -1;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--cream);
  font-size: 0.9rem;
}

.form-status.is-visible {
  display: block;
}

/* ---------- Map ---------- */
.map {
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--white);
}

.map iframe {
  width: 100%;
  height: clamp(340px, 44vw, 460px);
  border: 0;
}

.map-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.map-foot strong {
  color: var(--ink);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding-top: clamp(3.5rem, 6vw, 5rem);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.footer-about img {
  height: 40px;
  width: auto;
  margin-bottom: 1.1rem;
  /* Dark red on a dark panel — knock the logo back to white */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.footer-about p {
  max-width: 32ch;
  color: rgba(255, 255, 255, 0.5);
}

.footer h4 {
  margin: 0 0 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.footer ul {
  display: grid;
  gap: 0.65rem;
}

.footer a {
  transition: color 0.2s var(--ease);
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.42);
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-mark {
    order: -1;
    justify-content: flex-start;
  }

  .hero-mark img {
    height: clamp(180px, 34vw, 250px);
  }

  .hero-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .row p {
    grid-column: 2;
  }

  .stores {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .header-phone {
    display: none;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.95rem 0;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a::after {
    display: none;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .head {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 70px;
  }

  .logo img {
    height: 40px;
  }

  .hero-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-strip div {
    padding-right: 0.75rem;
  }

  .stores,
  .form,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-block: 1.6rem;
  }

  .row p {
    grid-column: 1;
  }

  .btn-row .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
