@font-face {
  font-family: "Ubuntu Sans";
  src: url("../fonts/UbuntuSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F5EFE3;
  --olive: #575D3D;
  --olive-deep: #363D2A;
  --terra: #A65D3C;
  --ink: #373629;
  --line: #DFD1BE;
  color: var(--ink);
  background: var(--cream);
  font-family: "Ubuntu Sans", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--olive-deep);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--olive);
  color: var(--cream);
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
main,
footer {
  width: min(56rem, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.5rem 0 1.25rem;
}

.wordmark {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--olive-deep);
  font-size: 1.15rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

nav a {
  text-decoration: none;
  color: var(--olive);
  font-weight: 500;
}

nav a[aria-current="page"] {
  color: var(--olive-deep);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Home-only Login: keep it out of flex so brand/nav match interior pages. */
.header-tools:has(.login) {
  position: relative;
}

.header-tools .login {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 0.85rem;
  white-space: nowrap;
}

.header-tools select,
.login {
  font: inherit;
  font-weight: 500;
  color: var(--olive-deep);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

main {
  flex: 1;
  padding: 3.5rem 0 4.5rem;
}

.hero {
  text-align: center;
  padding-bottom: 3.5rem;
}

.hero h1 {
  margin-bottom: 10px;
}

.hero .lead {
  margin-bottom: 30px;
}

h1 {
  margin: 0 auto 1rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
  max-width: 14ch;
}

.lead {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--olive);
  font-size: 1.05rem;
}

.hero .nito {
  display: block;
  width: min(21rem, 67.5%);
  height: auto;
  margin: 0 auto 2rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: none;
  object-fit: contain;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin: 0;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--olive);
  color: var(--cream);
  text-decoration: none;
  border-radius: 0.45rem;
  font-weight: 500;
}

.button:hover {
  background: var(--olive-deep);
  color: var(--cream);
}

.button-secondary {
  background: transparent;
  color: var(--olive-deep);
  box-shadow: inset 0 0 0 1px var(--olive);
}

.button-secondary:hover {
  background: transparent;
  color: var(--terra);
}

.powered {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

h2,
h3,
.powered h2 {
  font-weight: 600;
}

.powered h2 {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
}

.powered-lead {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  color: var(--olive);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 18.5rem));
  gap: 1.25rem;
  max-width: calc(18.5rem * 3 + 1.25rem * 2);
  margin-inline: auto;
  justify-content: center;
}

.business-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1.6rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
  color: var(--terra);
}

.business-card:hover,
.business-card:visited {
  color: var(--terra);
  background: var(--cream);
  border-color: var(--line);
  transform: none;
}

.business-card:active,
.business-card:hover:active,
.business-card:visited:active {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--cream);
}

.business-card:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
}

.business-card-name {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(1.35rem * 1.25 * 2);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: inherit;
}

.business-card-visit {
  display: block;
  align-self: flex-start;
  margin-top: 0.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  color: inherit;
}

.page-intro {
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-intro h1 {
  max-width: 36rem;
}

.page-intro .lead {
  margin-inline: auto;
}

h1.businesses-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  max-width: none;
  font-weight: 400;
}

h1.businesses-heading .businesses-heading-lead {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--olive);
  white-space: nowrap;
}

h1.businesses-heading .businesses-heading-brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.prose {
  max-width: 36rem;
  margin-inline: auto;
  text-align: left;
}

.prose h2 {
  margin: 2rem 0 0.6rem;
  text-align: center;
}

.features {
  display: grid;
  gap: 2rem 2.5rem;
  margin-inline: auto;
  justify-content: center;
}

.features article {
  max-width: 34rem;
  margin-inline: auto;
  text-align: left;
}

.features h3 {
  margin-top: 0;
}

.login-admin {
  max-width: 36rem;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  text-align: left;
}

.login-admin h2 {
  margin: 0 0 0.6rem;
}

.login-admin .button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.login-admin p:has(.button) {
  text-align: center;
}

.login-business-note {
  max-width: 36rem;
  margin-inline: auto;
  line-height: 1.55;
  text-align: left;
}

.contact-form {
  max-width: 28rem;
  margin-inline: auto;
  text-align: left;
}

.contact-form p {
  margin: 0 0 1.15rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--ink);
}

.contact-form button {
  font: inherit;
  font-weight: 500;
  color: var(--cream);
  background: var(--olive);
  border: 1px solid var(--olive);
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.contact-form button:disabled {
  opacity: 0.65;
  cursor: default;
}

.contact-form .honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile {
  margin: 0 0 1.15rem;
}

.form-status {
  color: var(--olive);
  min-height: 1.4em;
}

.form-status.is-error {
  color: var(--terra);
}

.notice {
  color: var(--olive);
}

footer {
  padding: 1.5rem 0 2.25rem;
  color: var(--olive);
  font-size: 0.9rem;
}

.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;
}

@media (min-width: 44rem) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* Phone portrait, and short landscape (e.g. iPhone 15 ~844×390). */
@media (max-width: 40rem), (orientation: landscape) and (max-height: 30rem) {
  .site-header,
  main,
  footer {
    width: min(56rem, calc(100% - 2rem));
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
    padding: 0.9rem 0 0.55rem;
  }

  .wordmark {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .header-tools {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 0.5rem;
    position: static;
  }

  /* Login sits beside the language select in-flow (Home only). */
  .header-tools .login {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    margin: 0;
    order: -1;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
    align-items: start;
    gap: 0.25rem 0.4rem;
    width: 100%;
  }

  nav a {
    text-align: center;
    max-width: 100%;
  }

  main {
    padding-top: 1rem;
  }

  h1.businesses-heading .businesses-heading-lead {
    white-space: normal;
  }
}

@media (orientation: landscape) and (max-height: 30rem) {
  .site-header {
    padding-block: 0.55rem;
    row-gap: 0.35rem;
  }

  main {
    padding: 0.65rem 0 1.75rem;
  }

  .hero {
    padding-bottom: 1.5rem;
  }

  .hero .nito {
    width: min(21rem, 38vh, 40%);
    margin-bottom: 0.85rem;
  }
}
