/* =========================================================
   THE INVISIBLE STRING DIRECTORY
   Main stylesheet
   ========================================================= */

/* 1. Brand tokens */
:root {
  --linen: #F6F2EA;
  --paper: #FCFAF6;
  --oat: #E6DED1;
  --taupe: #B5A28D;
  --walnut: #796858;
  --gold: #B69A65;
  --ink: #453D36;
  --muted: #83796F;
  --line: #E7E0D6;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

/* 2. Base and shared elements */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

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

.eyebrow {
  margin: 0 0 20px;
  color: var(--walnut);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.tiny-star {
  margin-right: 6px;
  color: var(--gold);
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 15px 19px;
  font-size: 13px;
  font-weight: 700;
}

.button-primary,
.button-light {
  border: 1px solid var(--walnut);
  background: var(--walnut);
  color: #fff;
}

.button-primary:hover {
  border-color: #625346;
  background: #625346;
}

.quiet-link {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--oat);
  font-size: 13px;
  font-weight: 600;
}

.quiet-link:hover {
  color: var(--walnut);
}

/* 3. Typography
   Keep all h1 and h2 sizing here so heading hierarchy is easy to maintain. */
h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -1.2px;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(24px, 3.5vw, 46px);
  line-height: 1.15;
}

h1 em,
h2 em {
  color: var(--walnut);
  font-weight: 500;
}

.business-card h3 {
  margin: 0 0 8px;
  font: 500 24px var(--serif);
}

.join-card h3 {
  margin: 15px 0 10px;
  font: 23px var(--serif);
}

.hero-intro {
  max-width: 470px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.handwritten {
  margin-top: 34px;
  color: #9B876C;
  font: italic 15px var(--serif);
}

/* 4. Header and main logo */
.site-header {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 20px 2.5%;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  position: relative;
  display: flex;
  min-width: 210px;
  flex-direction: column;
  align-items: center;
}

.site-header > .brand {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

.site-header > .brand > .brand-logo {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.brand-thread {
  width: 105px;
  height: 16px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.brand-name {
  color: var(--walnut);
  font: 500 23px var(--serif);
  letter-spacing: -.6px;
}

.brand-descriptor {
  margin-top: 5px;
  color: var(--taupe);
  font-size: 8px;
  letter-spacing: 2.2px;
}

.site-header nav {
  display: flex;
  gap: 32px;
  color: #71675D;
  font-size: 12px;
}

.site-header nav a:hover {
  color: var(--walnut);
}

.header-link {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.header-link span {
  margin-left: 8px;
  color: var(--gold);
}

/* 5. Hero and business spotlight */
.hero {
  display: grid;
  min-height: 590px;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 6%;
  overflow: hidden;
  padding: 75px 9% 70px;
  background: var(--linen);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}

.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 470px;
  height: 520px;
}

.paper {
  position: absolute;
  border: 1px solid #79685812;
  box-shadow: 0 18px 45px #49332a10;
}

.paper-back {
  top: 20%;
  left: 12%;
  width: 66%;
  height: 70%;
  transform: rotate(-8deg);
  background: var(--oat);
}

.paper-front {
  top: 12%;
  left: 20%;
  display: flex;
  width: 66%;
  height: 77%;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  transform: rotate(5deg);
  background: var(--paper);
}

.paper-kicker,
.paper-bottom {
  color: #8B7B69;
  font-size: 8px;
  letter-spacing: 1.5px;
}

.paper-script {
  color: var(--walnut);
  font: italic 43px/1.12 var(--serif);
}

.hero-thread {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-thread path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-star {
  position: absolute;
  z-index: 3;
  top: 7%;
  right: 5%;
  color: var(--gold);
  font-size: 34px;
}

/* Spotlight heading sits above the card */
.spotlight-heading {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 100%;
}

.spotlight-heading .eyebrow {
  margin-bottom: 12px;
}

.spotlight-card {
  position: absolute;
  z-index: 2;
  top: 20%;
  left: 20%;
  display: flex;
  width: 66%;
  height: 70%;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  overflow: visible;
}

.spotlight-card .paper-kicker,
.spotlight-card .paper-bottom {
  position: relative;
  z-index: 2;
}

.spotlight-photo {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 105px;
  max-height: 190px;
  flex: 1 1 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid #79685818;
  background: linear-gradient(145deg, #E6DED1, #F6F2EA 58%, #DCD0BF);
}

.spotlight-photo span {
  padding: 12px;
  color: var(--walnut);
  font: italic 15px var(--serif);
  opacity: .75;
  text-align: center;
}

/* Use this class for a real featured-business image. */
.spotlight-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 105px;
  max-height: 190px;
  object-fit: cover;
}

.spotlight-thread {
  position: absolute;
  z-index: 1;
  bottom: 1%;
  left: -4%;
  width: 108%;
  height: 25%;
  overflow: visible;
  pointer-events: none;
}

.spotlight-thread path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.spotlight-card .paper-bottom {
  padding-bottom: 13px;
}

/* 6. Values strip */
.values-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 9%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #71675D;
  font-size: 10px;
}

.values-strip i {
  margin-right: 10px;
  color: var(--gold);
  font-size: 9px;
  font-style: normal;
}

/* 7. Directory and shared sections */
.section {
  padding: 95px 9%;
}

.discover-section {
  padding-top: 65px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading > p {
  max-width: 330px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

/* 8. Search and filters */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 10px;
}

.search-box {
  display: flex;
  min-height: 49px;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--gold);
  font-size: 24px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 14px var(--sans);
}

.filter-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
}

.filter-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 14px;
  color: var(--walnut);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary::after {
  color: var(--gold);
  content: "＋";
}

.filter-panel[open] summary::after {
  content: "−";
}

.filter-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.filter-options {
  display: grid;
  max-height: 190px;
  gap: 9px;
  overflow: auto;
  padding: 0 14px 14px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.filter-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--walnut);
}

.filter-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  padding: 2px 1px;
  color: var(--muted);
  font-size: 12px;
}

.filter-actions button {
  padding: 5px;
  border: 0;
  background: none;
  color: var(--walnut);
  font: 700 12px var(--sans);
  cursor: pointer;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin: 19px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.demo-label {
  color: var(--walnut);
  font-size: 11px;
}

/* 9. Business listing cards */
.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.business-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: .2s;
}

.business-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #49332a0d;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.card-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--oat);
  color: var(--walnut);
  font: italic 19px var(--serif);
}

.business-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 14px;
}

.card-tags span {
  padding: 6px 9px;
  border-radius: 20px;
  background: #EFE9DF;
  color: var(--walnut);
  font-size: 10px;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.card-bottom a {
  color: var(--walnut);
  font-weight: 700;
  white-space: nowrap;
}

.empty-state {
  padding: 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* 10. Category section */
.category-section {
  padding-top: 90px;
  padding-bottom: 90px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 17px var(--serif);
  text-align: left;
  cursor: pointer;
}

.category-link span {
  color: var(--gold);
  font: 14px var(--sans);
}

.category-link:hover {
  background: #EFE9DF;
}

/* 11. Get listed section */
.join-section {
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: center;
  gap: 9%;
  padding: 75px 11%;
  background: var(--walnut);
  color: #fff;
}

.join-section .eyebrow {
  color: #E8DFD2;
}

.join-section h2 em {
  color: #D9C59F;
}

.join-section > div:first-child > p:last-child {
  max-width: 390px;
  color: #EAE2D8;
  font-size: 14px;
  line-height: 1.9;
}

.join-card {
  padding: 30px;
  background: var(--paper);
  color: var(--ink);
}

.join-card svg {
  width: 150px;
  height: 25px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.join-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* 12. Footer */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 32px 6.5%;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-brand {
  display: block;
  width: 150px;
  max-width: 150px;
  min-width: 0;
  justify-self: start;
  flex: none;
}

.footer-brand .brand-logo {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
}

.site-footer p,
.site-footer > span {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.site-footer > span {
  text-align: right;
}

.site-footer p a {
  color: var(--walnut);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer p a:hover {
  color: var(--gold);
  border-bottom-color: var(--walnut);
}

.site-footer p a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

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

/* 13. Tablet layout */
@media (max-width: 800px) {
  .site-header {
    padding: 12px 2%;
  }

  .site-header nav {
    gap: 16px;
  }

  .header-link {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 58px 7% 20px;
  }

  .hero-art {
    justify-self: center;
    max-width: 390px;
    height: 520px;
  }

  .spotlight-heading {
    top: 0;
    left: 0;
    z-index: 5;
    width: 100%;
  }

  .spotlight-card {
    top: 24%;
    height: 66%;
    z-index: 2;
  }

  .paper-back {
    top: 24%;
    height: 66%;
  }

  .spotlight-photo {
    min-height: 90px;
  }

  .spotlight-heading h2 {
    max-width: 95%;
  }

  .values-strip {
    flex-wrap: wrap;
    padding: 20px 7%;
  }

  .section {
    padding: 75px 7%;
  }

  .discover-section {
    padding-top: 20px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 17px;
  }

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

  .search-box,
  .filter-actions {
    grid-column: 1 / -1;
  }

  .filter-panel:last-of-type {
    grid-column: 1 / -1;
  }

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

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

  .join-section {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 62px 8%;
  }

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

  .site-footer p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-footer > span {
    text-align: right;
  }
}

/* 14. Mobile layout */
@media (max-width: 480px) {
  .site-header {
    padding: 12px 2%;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    font-size: 20px;
  }

  .site-header nav {
    gap: 12px;
    font-size: 10px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.13;
  }

  h2 {
    font-size: 24px;
    line-height: 1.15;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 20px;
  }

.discover-section {
  padding-top: 40px;
}

  /* Keep the spotlight card below its heading on small screens. */
  .hero-art {
    height: 420px;
  }

  .spotlight-heading h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .spotlight-card {
  gap: 10px;
  top: 34%;
  height: 63%;
}

  .paper-back {
    top: 28%;
    height: 66%;
  }

  .paper-script {
    font-size: 35px;
  }

  .paper-front {
    padding: 20px;
  }

  .spotlight-photo {
    min-height: 78px;
  }

  .spotlight-photo span {
    font-size: 12px;
  }

  .spotlight-thread {
    bottom: 1%;
    height: 23%;
  }

  .spotlight-card .paper-bottom {
    padding-bottom: 10px;
  }

  .values-strip {
    font-size: 9px;
  }

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

  .search-box,
  .filter-panel:last-of-type,
  .filter-actions {
    grid-column: auto;
  }

  .filter-hint {
    font-size: 10px;
  }

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

  .business-card h3 {
    font-size: 23px;
  }

  .result-row {
    flex-direction: column;
    gap: 8px;
  }

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

  .category-link {
    padding: 15px 11px;
    font-size: 14px;
  }

  .join-section {
    padding: 62px 8%;
  }

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

  .footer-brand {
    width: 125px;
    max-width: 125px;
  }

  .footer-brand .brand-logo {
    max-width: 125px;
  }

  .site-footer p {
    grid-column: auto;
    grid-row: auto;
  }

  .site-footer > span {
    text-align: left;
  }
}



/* Threads community link in homepage introduction */
.hero-intro a {
  color: var(--walnut);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-intro a:hover {
  color: var(--gold);
  border-bottom-color: var(--walnut);
}



/* Keyboard accessibility */
.hero-intro a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}



/* 15. Business listing application form */
.join-copy h2 {
  color: #fff;
}

.join-card .form-intro {
  margin-bottom: 22px;
}

#businessSubmissionForm {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: var(--walnut);
  font-size: 12px;
  font-weight: 700;
}

.form-field > span > span,
.consent-field > span > span {
  color: #A36E55;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: 14px/1.6 var(--sans);
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #9A9086;
  font-weight: 400;
  opacity: 1;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  outline: 2px solid #B69A6533;
  outline-offset: 1px;
}

.consent-field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  cursor: pointer;
  text-align: left;
}

.consent-field input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--walnut);
  justify-self: start;
}

.consent-field > span {
  display: block;
  min-width: 0;
}

.submission-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 13px 18px;
  border: 1px solid var(--walnut);
  border-radius: 2px;
  background: var(--walnut);
  color: #fff;
  font: 700 13px var(--sans);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.submission-button:hover:not(:disabled) {
  border-color: #625346;
  background: #625346;
}

.submission-button:disabled {
  cursor: wait;
  opacity: .7;
}

.form-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.form-status {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.form-status-success {
  border: 1px solid #C9D5C3;
  background: #F1F5EE;
  color: #40543B;
}

.form-status-error {
  border: 1px solid #E2C7BD;
  background: #FAF0EC;
  color: #854B3C;
}

@media (max-width: 800px) {
  .join-card {
    width: 100%;
  }
}
