/* Utah Sport Court Builder — shared stylesheet
   Modern athletic theme: deep blue + court green + generous white space */

:root {
  --navy: #0b2545;
  --navy-800: #123a68;
  --navy-700: #1b4f8a;
  --green: #17864a;
  --green-600: #1ea75c;
  --green-100: #e6f6ec;
  --ink: #10192b;
  --body: #435068;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 6px 18px rgba(11, 37, 69, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(11, 37, 69, 0.35);
  --maxw: 1140px;
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; }

p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  flex-wrap: wrap;
  padding: 10px 0;
}

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

.bar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tel {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-600));
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(23, 134, 74, 0.8);
}
.btn-navy { background: var(--navy); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.btn-block { display: block; width: 100%; padding: 15px 20px; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.site-nav { border-top: 1px solid var(--line); background: var(--white); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.93rem;
  padding: 10px 0;
}
.site-nav a { color: var(--body); font-weight: 600; }
.site-nav a:hover { color: var(--green); text-decoration: none; }
.site-nav .nav-city { color: var(--body); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(120deg, rgba(11, 37, 69, 0.94), rgba(18, 58, 104, 0.82)),
    url("/images/hero-court.jpg") center/cover no-repeat;
}
.hero .wrap {
  display: grid;
  gap: 34px;
  padding-top: 56px;
  padding-bottom: 56px;
  grid-template-columns: 1fr;
}
.hero h1, .hero h2 { color: var(--white); }
.hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.08rem; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
  color: #9ef0bd;
  background: rgba(30, 167, 92, 0.18);
  border: 1px solid rgba(158, 240, 189, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-list { list-style: none; margin: 18px 0 24px; padding: 0; }
.hero-list li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.92);
}
.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(30, 167, 92, 0.22);
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
main section { padding: 56px 0; }
section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 30px; }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card img { border-radius: var(--radius); margin-bottom: 16px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.stat {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}
.stat strong { display: block; font-size: 1.9rem; color: #9ef0bd; line-height: 1.1; }
.stat span { font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }

.pill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li {
  background: var(--green-100);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.92rem;
}

.check { list-style: none; margin: 0 0 1.1em; padding: 0; }
.check li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 900;
}

.photo-figure { margin: 0; }
.photo-figure figcaption {
  font-size: 0.88rem;
  color: var(--body);
  padding-top: 8px;
}

.media {
  display: grid;
  gap: 26px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .media { grid-template-columns: 1.05fr 1fr; } }
.media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Quote form ---------- */
.quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.quote h2, .quote h3 { color: var(--ink); }
.quote .note { font-size: 0.85rem; color: var(--body); }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid #cfd8e5;
  border-radius: 12px;
  background: var(--white);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--green-600);
  outline-offset: 1px;
  border-color: var(--green-600);
}
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* Inline validation messages */
.field-msg {
  margin: 6px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b3261e;
  min-height: 0;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #b3261e;
  background: #fff7f6;
}
.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  outline-color: #b3261e;
}

/* AJAX form result messages */
.form-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}
.form-result[hidden] { display: none; }
.form-result.success {
  background: var(--green-100);
  color: var(--green);
  border: 1px solid var(--green-600);
}
.form-result.error {
  background: #fff7f6;
  color: #b3261e;
  border: 1px solid #b3261e;
}

.quote-section { background: var(--bg-soft); }
.quote-layout { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .quote-layout { grid-template-columns: 1fr 1.05fr; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 44px 0 28px;
  font-size: 0.95rem;
}
.site-footer h2, .site-footer h3 { color: var(--white); font-size: 1.05rem; }
.site-footer a { color: #9ef0bd; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.85rem;
}
.site-footer img { height: 40px; width: auto; background: var(--white); border-radius: 8px; padding: 5px; }

.nearby { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nearby a {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}
.nearby a:hover { border-color: var(--green-600); text-decoration: none; }

.hero a { color: #9ef0bd; text-decoration: underline; text-underline-offset: 3px; }
.hero a.btn { text-decoration: none; }

/* ---- Locations dropdown ---- */
.site-nav li.has-drop { position: relative; }
.drop-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--navy);
}
.drop-toggle:hover { color: var(--green); }
.caret {
  width: .45rem; height: .45rem; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px);
}
.has-drop.open .caret { transform: rotate(-135deg) translateY(-2px); }
.site-nav ul.drop-menu {
  display: none; position: absolute; top: calc(100% + .65rem); left: 0; z-index: 60;
  min-width: 22rem; padding: .6rem; margin: 0; gap: 0 !important;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(12, 35, 64, .16);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 40rem;
}
.site-nav .has-drop.open ul.drop-menu { display: grid; }

.drop-menu li { list-style: none; }
.drop-menu a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  font-weight: 600; font-size: .95rem; color: var(--body);
}
.drop-menu a:hover { background: rgba(16, 132, 90, .1); color: var(--green); text-decoration: none; }
@media (max-width: 760px) {
  .site-nav ul.drop-menu {
    position: static; min-width: 0; width: 100%; box-shadow: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.site-nav ul.drop-menu.drop-menu-1 { min-width: 16rem; grid-template-columns: 1fr; }

/* ---- Two-column shell: scrolling content + sticky quote form ---- */
.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}
.shell-main { min-width: 0; }
.shell-aside { min-width: 0; padding: 0 20px 48px; }
@media (max-width: 999px) {
  .shell { display: flex; flex-direction: column; }
  .shell-aside { order: -1; padding: 24px 20px 8px; }
}
.shell-aside .quote { border-radius: var(--radius-lg); }
.quote-title { font-size: 1.35rem; margin-bottom: 8px; }
.quote-sub { font-size: 0.95rem; margin-bottom: 18px; }

@media (min-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 32px;
    padding: 0 24px;
  }
  .shell-main .wrap { max-width: none; padding: 0; }
  .shell-main section { padding: 48px 0; }
  .shell-main section.soft,
  .shell-main .hero {
    border-radius: var(--radius-lg);
    padding-left: 30px;
    padding-right: 30px;
  }
  .shell-main .hero { padding-top: 48px; padding-bottom: 48px; overflow: hidden; }
  .shell-main .hero .wrap { padding-top: 0; padding-bottom: 0; }
  .shell-aside {
    position: sticky;
    top: 132px;
    padding: 0 0 40px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .shell-main .grid-3, .shell-main .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .shell-main .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .shell-main .grid-4 { grid-template-columns: repeat(4, 1fr); }
}


/* ---------- FAQ ---------- */
.faq { display: grid; gap: .75rem; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line, #e3e8ef);
  border-radius: 14px;
  padding: 0 1.1rem;
  box-shadow: 0 1px 2px rgba(16, 32, 56, .05);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--navy, #10233f);
  padding: 1rem 2rem 1rem 0;
  position: relative;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--green, #1f9d55);
  line-height: 1;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-answer { padding: 0 0 1rem; }
.faq-answer p { margin: 0; color: #47536b; }

/* Breadcrumbs */
.breadcrumbs { border-bottom: 1px solid var(--line, #e3e8ef); background: #fff; }
.breadcrumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: .7rem 0; font-size: .85rem; color: #5b6b7c;
}
.breadcrumbs li { display: flex; align-items: center; gap: .4rem; }
.breadcrumbs li + li::before { content: "/"; color: #9fb0c0; }
.breadcrumbs a { color: #1c4f8b; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li[aria-current="page"] { color: #0f2b46; font-weight: 600; }
