/*
  Emergency shell styles for the public homepage.
  The css-fallback class is added by a tiny inline probe only when the normal
  Next/Tailwind stylesheet did not apply, which is the stale-cache failure mode
  that leaves the page as raw browser HTML.
*/

html.css-fallback {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #fffdf7;
  color: #2b2518;
}

html.css-fallback *,
html.css-fallback *::before,
html.css-fallback *::after {
  box-sizing: border-box;
}

html.css-fallback body {
  margin: 0;
  min-width: 320px;
  background: #fffdf7;
  color: #2b2518;
  line-height: 1.5;
}

html.css-fallback a {
  color: inherit;
  text-decoration: none;
}

html.css-fallback img,
html.css-fallback svg {
  display: block;
  max-width: 100%;
}

html.css-fallback button,
html.css-fallback input,
html.css-fallback select {
  font: inherit;
}

html.css-fallback button {
  cursor: pointer;
}

html.css-fallback .hidden {
  display: none !important;
}

html.css-fallback .container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

html.css-fallback header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(120, 92, 34, 0.14);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(14px);
}

html.css-fallback header > div {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

html.css-fallback header > div > div {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

html.css-fallback header img {
  width: auto;
  height: 2.5rem;
}

html.css-fallback header nav,
html.css-fallback header [class*="md:flex"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html.css-fallback header button,
html.css-fallback header a {
  border-radius: 0.75rem;
}

html.css-fallback main {
  min-height: 100vh;
  background: #fffdf7;
}

html.css-fallback main > section:first-of-type {
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(221, 161, 46, 0.14), transparent 28rem),
    #fffdf7;
}

html.css-fallback main > section:first-of-type > div {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

html.css-fallback main > section:first-of-type [class*="grid"] {
  display: grid;
  align-items: center;
  gap: 2rem;
}

html.css-fallback h1 {
  max-width: 42rem;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

html.css-fallback h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

html.css-fallback h3 {
  margin: 0;
}

html.css-fallback p {
  margin: 0;
}

html.css-fallback main > section:first-of-type p {
  max-width: 42rem;
  color: #675b42;
}

html.css-fallback [class*="bg-primary"],
html.css-fallback button[class*="bg-primary"] {
  background: #d9a12f;
  color: #211706;
}

html.css-fallback [class*="text-primary"] {
  color: #b77916;
}

html.css-fallback [class*="text-muted-foreground"] {
  color: #6f654e;
}

html.css-fallback [class*="border"] {
  border-color: rgba(120, 92, 34, 0.18);
}

html.css-fallback [class*="rounded"] {
  border-radius: 0.75rem;
}

html.css-fallback [class*="shadow"] {
  box-shadow: 0 16px 45px rgba(55, 39, 13, 0.1);
}

html.css-fallback [class*="Card"],
html.css-fallback [class*="card"],
html.css-fallback main [class*="border"][class*="rounded"] {
  border: 1px solid rgba(120, 92, 34, 0.16);
  background: #ffffff;
}

html.css-fallback main button,
html.css-fallback main a[class*="inline-flex"],
html.css-fallback label[class*="cursor-pointer"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  border: 1px solid rgba(120, 92, 34, 0.2);
  border-radius: 0.85rem;
  padding: 0.65rem 1rem;
  background: #fff;
  color: #2b2518;
}

html.css-fallback main button:first-of-type {
  background: #d9a12f;
  color: #211706;
  border-color: #d9a12f;
}

html.css-fallback input[type="file"] {
  max-width: 100%;
}

html.css-fallback [class*="border-dashed"] {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 2px dashed rgba(120, 92, 34, 0.28);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  background: #fffaf0;
}

html.css-fallback main section:not(:first-of-type) {
  padding: 4rem 0;
}

html.css-fallback main section:not(:first-of-type) > div {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

html.css-fallback [class*="grid-cols-1"],
html.css-fallback [class*="md:grid-cols-3"],
html.css-fallback [class*="lg:grid-cols-4"] {
  display: grid;
  gap: 1rem;
}

html.css-fallback footer {
  border-top: 1px solid rgba(120, 92, 34, 0.14);
  background: #2b2518;
  color: #fff8e8;
}

html.css-fallback footer > div {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

@media (min-width: 768px) {
  html.css-fallback main > section:first-of-type [class*="grid"] {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.85fr);
  }

  html.css-fallback [class*="md:hidden"] {
    display: none !important;
  }

  html.css-fallback [class*="md:flex"] {
    display: flex !important;
  }

  html.css-fallback [class*="md:grid-cols-3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  html.css-fallback [class*="lg:grid-cols-4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  html.css-fallback header nav,
  html.css-fallback header [class*="md:flex"] {
    display: none !important;
  }

  html.css-fallback header > div {
    padding: 0 1rem;
  }

  html.css-fallback main > section:first-of-type {
    padding: 2rem 0;
  }
}
