/* ============================================================================
   City of Tontitown — website redesign concept by Stoa
   A light, warm, fully accessible (WCAG 2.1 AA) municipal design system.
   Palette leans into Tontitown's grapes + Grape Festival heritage:
   deep grape purple + harvest gold on warm cream, with real City photography.
   Fraunces display + Inter body.
   ========================================================================== */

:root {
  --paper:       #fbf8f3;  /* warm cream base             */
  --surface:     #ffffff;  /* cards / raised surfaces      */
  --surface-alt: #f4edec;  /* banded sections (faint grape-cream) */
  --ink:         #221a24;  /* primary text (warm purple-black) */
  --muted:       #5c5360;  /* secondary text (AA)         */
  --wine:        #5a2a66;  /* PRIMARY: grape purple (>10:1 text) */
  --wine-deep:   #3c1a47;  /* hover / pressed / dark bands */
  --wine-ink:    #2e1437;  /* darkest grape, headings     */
  --wineaccent:  #7a1e2b;  /* true wine red, rare warm accent */
  --gold:        #a9791f;  /* harvest gold accent         */
  --gold-text:   #8a5e12;  /* gold as text (AA)           */
  --gold-bright: #e6b84a;  /* gold on dark backgrounds    */
  --vine:        #3c5a3a;  /* vine-leaf green (badges)    */
  --border:      #e7ded0;
  --border-strong:#cdbfa6;
  --shadow:      0 1px 2px rgba(28,26,23,.05), 0 6px 20px rgba(28,26,23,.06);
  --radius:      10px;
  --maxw:        1100px;
  --readw:       720px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(16px, 0.97rem + 0.15vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); color: var(--wine-ink); line-height: 1.12; font-weight: 600; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.02rem; font-family: var(--body); font-weight: 700; letter-spacing: .02em; }
p { margin: 0 0 1rem; }
a { color: var(--wine); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--wine-deep); }
strong { font-weight: 700; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Keyboard focus: visible outline (never rely on color alone) */
a:focus-visible, button:focus-visible, input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--wine); color: #fff; padding: .7rem 1.1rem;
  font-weight: 600; border-radius: 0 0 6px 0; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.read { max-width: var(--readw); }
.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;
}

/* ---- Layout utilities ---- */
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
.grid-2-wide { display: grid; gap: 1.5rem; grid-template-columns: 1.3fr 1fr; align-items: center; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
}

/* ---- Prototype disclaimer banner ---- */
.proto-banner {
  background: var(--wine-ink); color: #f7ece9;
  font-size: .8rem; line-height: 1.45; text-align: center;
  padding: .5rem 1rem;
}
.proto-banner strong { color: #fff; }
.proto-banner a { color: var(--gold-bright); }

/* ---- Header / nav ---- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand .glyph { width: 38px; height: 38px; flex: none; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wordmark .city { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--wine-ink); }
.brand .wordmark .state { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .6rem; }

.primary-nav { border-top: 1px solid var(--border); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.primary-nav a {
  display: block; padding: .8rem .9rem; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .94rem; border-bottom: 3px solid transparent;
}
.primary-nav a:hover { color: var(--wine); border-bottom-color: var(--gold); }
.primary-nav a[aria-current="page"] { color: var(--wine); border-bottom-color: var(--wine); }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.15rem; border-radius: 6px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--wine); background: var(--wine); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--wine); }
.btn-ghost:hover { background: var(--wine); color: #fff; }
.btn-gold { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--wine-ink); }
.btn-gold:hover { background: #d7a233; border-color: #d7a233; color: var(--wine-ink); }
.btn-sm { padding: .5rem .8rem; font-size: .85rem; }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(169,121,31,.16), transparent 60%),
    radial-gradient(700px 380px at 6% 120%, rgba(60,90,58,.14), transparent 55%),
    linear-gradient(180deg, #fcf9f4, #f4ecdf);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: clamp(2.5rem, 6vw, 4.5rem) 0; max-width: 760px; }
.hero .eyebrow { color: var(--gold-text); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin: 0 0 .8rem; }
.hero p.lede { font-size: 1.18rem; color: #34302a; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

/* ---- Section scaffolding ---- */
.section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 60ch; margin-bottom: 1.6rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ---- Service card grid ---- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.35rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s;
}
a.card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 4px 10px rgba(28,26,23,.07), 0 14px 34px rgba(28,26,23,.09); }
.card .ico { width: 30px; height: 30px; color: var(--wine); margin-bottom: .7rem; }
.card h3 { font-size: 1.12rem; margin-bottom: .25rem; color: var(--wine-ink); }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card .more { margin-top: .7rem; color: var(--wine); font-weight: 600; font-size: .9rem; }

/* ---- Dark band (transparency / AI search) ---- */
.band-dark {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(227,179,74,.14), transparent 60%),
    var(--wine-ink);
  color: #f3e7e4; border: 0;
}
.band-dark h2 { color: #fff; }
.band-dark .gold { color: var(--gold-bright); }
.band-dark a:not(.btn) { color: var(--gold-bright); }

/* ---- AI search / ask widgets ---- */
.searchbox { display: flex; gap: .5rem; flex-wrap: wrap; align-items: stretch; margin: 1rem 0 .4rem; }
.searchbox input {
  flex: 1; min-width: 15rem; padding: .8rem .95rem; font-size: 1rem; font-family: var(--body);
  border: 1.5px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .2rem; }
.chip {
  background: #fff5e2; border: 1px solid var(--gold); color: #5a4108;
  padding: .35rem .7rem; font-size: .82rem; border-radius: 99px; cursor: pointer; font-family: inherit;
}
.chip:hover { background: #fdeac4; }
.answer { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--wine); border-radius: 8px; padding: 1.1rem 1.2rem; margin-top: 1rem; }
.answer .cite { color: var(--wine); font-weight: 600; }
.result { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1.05rem; margin-bottom: .7rem; }
.result .meta { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.result h3 { font-size: 1.05rem; margin: .2rem 0 .3rem; }
.result .rel { float: right; font-size: .78rem; color: var(--gold-text); font-weight: 700; }

/* ---- Generic content prose ---- */
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.callout { background: var(--surface-alt); border: 1px solid var(--border-strong); border-radius: 10px; padding: 1.1rem 1.25rem; margin: 1.4rem 0; }
.callout.good { border-left: 4px solid var(--vine); }
.callout.fix { border-left: 4px solid var(--gold); }
table.tidy { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; }
table.tidy th, table.tidy td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; vertical-align: top; font-size: .95rem; }
table.tidy thead th { background: var(--surface-alt); color: var(--wine-ink); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 99px; }
.badge.fixed { background: #e7efe6; color: #28492a; border: 1px solid #b9cdb7; }
.badge.before { background: #f6e7df; color: #7a3a1e; border: 1px solid #e2c3b1; }

/* ---- Footer ---- */
.site-footer { background: var(--wine-ink); color: #e9dad6; margin-top: 3rem; }
.site-footer a { color: #f3d9b0; }
.footer-grid { display: grid; gap: 1.6rem 2rem; grid-template-columns: 1.4fr 1fr 1fr; padding: 2.6rem 1.25rem 1.6rem; }
.site-footer h4 { color: #fff; font-family: var(--body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; font-size: .92rem; }
.footer-brand .city { font-family: var(--display); font-size: 1.3rem; color: #fff; }
.footer-brand p { color: #cdb3ad; font-size: .9rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 1rem 1.25rem; font-size: .82rem; color: #cdb3ad; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav ul { gap: 0; }
  .primary-nav a { padding: .65rem .6rem; font-size: .88rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ============================================================================
   v2: real City photography, grape-forward hero, formalized reviewer notes
   ========================================================================== */

/* Photo hero: City photography under a grape overlay; white text stays AA. */
.hero--photo { position: relative; border-bottom: 0; }
.hero--photo::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(46,20,55,.60) 0%, rgba(46,20,55,.72) 55%, rgba(46,20,55,.88) 100%),
    var(--hero-img, none);
  background-size: cover; background-position: center 40%;
}
.hero--photo .hero-inner { position: relative; z-index: 1; color: #fff; max-width: 720px; }
.hero--photo h1 { color: #fff; }
.hero--photo .eyebrow { color: var(--gold-bright); }
.hero--photo p.lede { color: #f2eaf2; }
.hero--photo .btn-ghost { color: #fff; border-color: rgba(255,255,255,.75); background: transparent; }
.hero--photo .btn-ghost:hover { background: #fff; color: var(--wine-ink); border-color: #fff; }
.hero-credit { position: absolute; right: .55rem; bottom: .35rem; z-index: 1; font-size: .66rem; color: rgba(255,255,255,.6); }

/* Grape-cluster motif accent (inline SVG) */
.motif { display: inline-block; vertical-align: -0.22em; width: 1.35em; height: 1.35em; margin-right: .35rem; color: var(--gold-bright); }

/* Framed photos + image/text split layouts */
.figure { margin: 0; }
.figure img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.split { display: grid; gap: 2.2rem; grid-template-columns: 1.1fr .9fr; align-items: center; }

/* Full-width photo band (overlay + light text) */
.photo-band { position: relative; color: #fff; border: 0; background: var(--wine-ink); overflow: hidden; }
.photo-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(180deg, rgba(46,20,55,.72), rgba(46,20,55,.82)), var(--band-img, none);
  background-size: cover; background-position: center 45%;
}
.photo-band .wrap { position: relative; }
.photo-band h2 { color: #fff; }
.photo-band p { color: #efe6ef; }

/* Reviewer note: clearly-labeled meta-commentary for RFP evaluators (not live-site copy). */
.reviewer-note {
  background: #f6f0f7; border: 1px solid #d9c5de; border-left: 4px solid var(--wine);
  border-radius: 10px; padding: .95rem 1.2rem 1.05rem; margin: 1.5rem 0; font-size: .92rem;
}
.reviewer-note .rn-tag {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--wine); padding: .2rem .55rem; border-radius: 99px; margin-bottom: .55rem;
}
.reviewer-note p { margin: 0; color: #3a2f3d; }
.reviewer-note p + p { margin-top: .5rem; }
.reviewer-note a { color: var(--wine); }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* Branded interior page masthead: grape band + grape-cluster watermark */
.pagehead {
  position: relative; overflow: hidden;
  background:
    radial-gradient(560px 320px at 90% -30%, rgba(230,184,74,.20), transparent 60%),
    linear-gradient(155deg, #6a2f78 0%, var(--wine) 45%, var(--wine-deep) 100%);
  color: #fff; padding: clamp(2.1rem,5vw,3.4rem) 0; border-bottom: 3px solid var(--gold);
}
.pagehead::after {
  content: ""; position: absolute; right: -24px; bottom: -54px; width: 230px; height: 230px; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Ccircle cx='8' cy='11' r='2.1'/%3E%3Ccircle cx='12' cy='11' r='2.1'/%3E%3Ccircle cx='16' cy='11' r='2.1'/%3E%3Ccircle cx='10' cy='14.6' r='2.1'/%3E%3Ccircle cx='14' cy='14.6' r='2.1'/%3E%3Ccircle cx='12' cy='18.2' r='2.1'/%3E%3Cpath d='M12 8.6c0-2.2 1.2-3.9 3.8-4.4' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain;
  opacity: .10;
}
.pagehead .wrap { position: relative; z-index: 1; }
.pagehead .eyebrow { color: var(--gold-bright) !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; margin: 0 0 .55rem; }
.pagehead h1 { color: #fff; margin: 0 0 .45rem; }
.pagehead .lede { color: #f1e9f2 !important; font-size: 1.12rem; max-width: 60ch; margin: 0; }
