/* ============================================================
   CAES Departmental Permits — shared styles
   Brand tokens from @caes-webteam/ui (theme.css)
   ============================================================ */

:root {
  /* UGA CAES brand colors */
  --red: #ba0c2f;
  --red-dark: #8a0922;
  --black: #000000;
  --white: #ffffff;
  --teal: #00a3ad;
  --teal-text: #007077;        /* AA on light */
  --sanford: #554f47;
  --creamery: #d6d2c4;
  --parchment: #f6f3ec;
  --parchment-light: #fbf9f4;
  --stegeman: #9ea2a2;
  --medium-gray: #e0e0e0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;

  --font-heading: "Merriweather", Georgia, serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  --r-base: 0.5rem;
  --r-card: 0.75rem;
  --r-btn: 0.375rem;

  --maxw: 1200px;
  --pad: clamp(1rem, 4vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; }
a { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--sanford);
  margin: 0;
}

/* ── Buttons (from .caes-btn primitives) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--sanford); border-color: var(--creamery); }
.btn--ghost:hover { background: var(--parchment-light); }
.btn .arrow { font-family: var(--font-body); font-weight: 400; transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── UGA institutional bar ── */
.ugabar { background: var(--black); color: var(--white); border-bottom: 2px solid var(--red); }
.ugabar__in {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-block: 0.45rem;
}
.ugabar__wm { height: 11px; width: auto; display: block; }
.ugabar__unit { font-family: var(--font-body); font-size: 0.72rem; color: rgba(255,255,255,.7); text-decoration: none; }
.ugabar__unit:hover { color: var(--white); text-decoration: underline; }
@media (max-width: 640px) { .ugabar__unit { display: none; } }

/* ── App header bar ── */
.apphead { background: var(--black); color: var(--white); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12), 0 4px 6px -4px rgba(0,0,0,.12); }
.apphead__in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; padding-block: 0.8rem;
}
.apphead__left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.apphead__logo { display: inline-flex; flex-shrink: 0; border-radius: var(--r-btn); }
.apphead__logo img { height: 34px; width: auto; display: block; }
.apphead__div { width: 1px; height: 26px; flex-shrink: 0; background: rgba(255,255,255,.3); }
.apphead__title {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.01em; line-height: 1.2; color: var(--white); text-decoration: none;
}
@media (min-width: 640px) { .apphead__logo img { height: 40px; } .apphead__title { font-size: 1.15rem; } }

/* ── Hero (home) ── */
.hero { padding-block: clamp(2.75rem, 7vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.hero__kicker { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem; }
.hero__kicker::before { content: ""; width: 32px; height: 3px; background: var(--red); border-radius: 2px; }
.hero h1 { font-family: var(--font-heading); font-weight: 900; line-height: 1.04; font-size: clamp(2.3rem, 5vw, 3.6rem); margin: 0 0 1.2rem; color: var(--text-primary); letter-spacing: -0.01em; }
.hero h1 span { color: var(--red); }
.hero__lead { font-size: clamp(1.04rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--sanford); max-width: 38ch; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem 1rem; align-items: center; }

/* ── Permit hang-tag ── */
.permit-stage { display: flex; justify-content: center; }
.permit {
  position: relative; width: min(330px, 80vw);
  background: var(--white); border: 1px solid var(--creamery); border-radius: 12px;
  box-shadow: 0 24px 48px -22px rgba(0,0,0,.5), 0 4px 10px -6px rgba(0,0,0,.25);
  transform-origin: top center; animation: sway 7s ease-in-out infinite; overflow: hidden;
}
.permit__hanger {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 94px; height: 24px; background: var(--white);
  border: 1px solid var(--creamery); border-bottom: none; border-radius: 8px 8px 0 0; z-index: 0;
}
.permit__hanger::after {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 8px; background: var(--parchment);
  border: 1px solid var(--creamery); border-radius: 5px;
}
.permit__band { position: relative; z-index: 1; background: var(--red); color: var(--white); text-align: center; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; padding: 0.8rem 1rem 0.7rem; }
.permit__body { padding: 1.35rem 1.5rem 1.25rem; text-align: center; }
.permit__fy { font-family: var(--font-body); font-weight: 800; font-size: 3.5rem; line-height: 0.9; letter-spacing: 0.01em; color: var(--black); }
.permit__type { font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.92rem; color: var(--text-primary); margin-top: 0.5rem; }
.permit__college { font-family: var(--font-heading); font-style: italic; font-weight: 400; font-size: 0.8rem; color: var(--sanford); line-height: 1.45; margin: 0.55rem auto 0; max-width: 24ch; }
.permit__perf { border-top: 2px dashed var(--creamery); margin: 1.15rem -1.5rem 0.95rem; }
.permit__meta { display: flex; justify-content: space-between; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.64rem; color: var(--sanford); }
.permit__meta b { color: var(--text-primary); font-weight: 700; }
.permit__foot { background: var(--black); color: var(--white); font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.64rem; text-align: center; padding: 0.7rem 1rem; }

@keyframes sway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(1deg); } }
@media (prefers-reduced-motion: reduce) {
  .permit { animation: none; transform: rotate(-1.5deg); }
  .btn, .btn .arrow { transition: none; }
}

/* ── Sections ── */
main { flex: 1; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--panel { background: var(--white); border-block: 1px solid var(--creamery); }
.section__head { max-width: 54ch; margin-bottom: 2.25rem; }
.section__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; margin: 0.55rem 0 0.65rem; color: var(--text-primary); }
.section__head p { margin: 0; color: var(--sanford); }

/* ── Resource cards ── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--creamery); border-radius: var(--r-card); padding: 1.7rem 1.6rem; }
.section--panel .card { background: var(--parchment-light); }
.card--featured { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.card__tag { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; color: var(--sanford); margin: 0 0 0.75rem; }
.card--featured .card__tag { color: var(--red); }
.card h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.6rem; color: var(--text-primary); }
.card p { margin: 0 0 1.5rem; font-size: 0.96rem; color: var(--sanford); }
.card__action { margin-top: auto; }
.card__link { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.82rem; text-decoration: none; color: var(--red); }
.card__link:hover { color: var(--red-dark); }
.card__link:hover .arrow { transform: translateX(3px); }
.card__link .arrow { transition: transform .15s ease; }
.card--featured .card__action .btn { width: 100%; }

/* ── Process steps ── */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding: 0 0.75rem; counter-increment: step; }
.step::before { content: ""; position: absolute; top: 14px; left: 0; right: 0; height: 2px; background: var(--creamery); z-index: 0; }
.step:first-child::before { left: 50%; }
.step:last-child::before { right: 50%; }
.step__dot { position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; margin: 0 auto 0.8rem; background: var(--parchment); border: 2px solid var(--sanford); border-radius: 50%; font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; color: var(--sanford); }
.section--panel .step__dot { background: var(--white); }
.step__dot::after { content: counter(step); }
.step--pickup .step__dot { border-color: var(--teal); color: var(--teal-text); }
.step--done .step__dot { background: var(--red); border-color: var(--red); color: var(--white); }
.step__label { display: block; text-align: center; font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.76rem; line-height: 1.3; color: var(--text-primary); }
.step--pickup .step__label { color: var(--teal-text); }

/* ── Facts ── */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.fact { border-left: 3px solid var(--red); padding: 0.3rem 0 0.3rem 1.2rem; }
.fact__k { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--text-primary); margin: 0 0 0.35rem; }
.fact p { margin: 0; font-size: 0.95rem; color: var(--sanford); }

/* ============================================================
   Guidelines page
   ============================================================ */
.page-hero { padding-block: clamp(2.25rem, 6vw, 3.75rem); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; margin: 0.5rem 0 1rem; color: var(--text-primary); }
.page-hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--sanford); max-width: 62ch; margin: 0; line-height: 1.6; }

.source-note {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--creamery); border-left: 4px solid var(--teal);
  border-radius: var(--r-base); padding: 0.95rem 1.25rem; margin-top: 1.9rem; max-width: 70ch;
}
.source-note p { margin: 0; font-size: 0.9rem; color: var(--sanford); }
.source-note a { font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-text); text-decoration: none; display: inline-flex; gap: 0.4rem; align-items: center; white-space: nowrap; }
.source-note a:hover { text-decoration: underline; }

.policy { display: grid; gap: 2.5rem; max-width: 70ch; }
.policy section { scroll-margin-top: 2rem; }
.policy h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.2; margin: 0 0 0.7rem; color: var(--text-primary); }
.policy h2 .num { color: var(--red); font-size: 0.7em; margin-right: 0.5rem; }
.policy p { margin: 0 0 0.85rem; color: var(--text-secondary); }
.policy p:last-child { margin-bottom: 0; }
.policy ul { margin: 0.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.policy ul li { position: relative; padding-left: 1.5rem; color: var(--text-secondary); }
.policy ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; background: var(--red); border-radius: 50%; }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.8rem; }
.chip { font-family: var(--font-body); font-weight: 600; font-size: 0.82rem; background: var(--parchment); border: 1px solid var(--creamery); border-radius: 999px; padding: 0.4rem 0.9rem; color: var(--text-primary); display: inline-flex; align-items: center; gap: 0.45rem; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.callout { background: var(--parchment); border: 1px solid var(--creamery); border-radius: var(--r-card); padding: 1.1rem 1.3rem; margin-top: 0.4rem; }
.callout p { margin: 0; color: var(--text-secondary); }
.callout strong { color: var(--red-dark); }

.contactgrid { display: grid; gap: 1.25rem; }
@media (min-width: 620px) { .contactgrid { grid-template-columns: 1fr 1fr; } }
.contactgrid h3 { font-size: 1.02rem; margin: 0 0 0.4rem; }
.contactgrid p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; }

/* ── CTA band ── */
.cta-band { background: var(--white); border-block: 1px solid var(--creamery); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 2.25rem; }
.cta-band__text h2 { margin: 0 0 0.3rem; font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
.cta-band__text p { margin: 0; color: var(--sanford); font-size: 0.95rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ============================================================
   Footer (from @caes-webteam/ui Footer)
   ============================================================ */
.footer { background: var(--black); color: var(--white); }
.footer__in { padding-block: 2.25rem; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.footer__logo { display: inline-block; border-radius: var(--r-base); }
.footer__logo img { height: 50px; width: auto; display: block; }
.footer__h { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin: 0 0 0.65rem; }
.footer p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,.72); }
.footer a { color: var(--white); }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.footer__list a, .footer p a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; font-size: 0.9rem; }
.footer__list a:hover, .footer p a:hover { color: rgba(255,255,255,.8); }
.footer__bottom { display: flex; flex-direction: column; gap: 0.4rem; border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1rem; font-size: 0.75rem; color: rgba(255,255,255,.7); }
@media (min-width: 640px) { .footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer__bottom p { font-size: 0.75rem; color: rgba(255,255,255,.7); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .permit-stage { order: -1; margin-bottom: 1.25rem; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 0.9rem; padding: 0.5rem 0; }
  .step::before { top: 0; bottom: 0; left: 14px; right: auto; width: 2px; height: auto; }
  .step:first-child::before { top: 50%; }
  .step:last-child::before { bottom: 50%; }
  .step__dot { margin: 0; }
  .step__label { text-align: left; }
}
