/* =========================================================================
   Kansas Imaging Consultants — Site Stylesheet
   Covers: homepage (index) + inner pages (e.g., Privacy Policy)
   Approach: mobile-first, responsive at 640 / 1024 / 1280 px
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Web fonts
   ------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* -------------------------------------------------------------------------
   2. Design tokens
   ------------------------------------------------------------------------- */
:root {
  /* Brand palette — deep institutional navy + warm cream + antique gold */
  --navy-900:        #0a2540;
  --navy-800:        #102f54;
  --navy-700:        #1d3f6e;
  --navy-500:        #3a6090;
  --navy-100:        #e8eef5;
  --gold:            #b08938;
  --gold-soft:       #d9c089;
  --gold-pale:       #f0e6cc;
  --ivory:           #faf6ec;
  --paper:           #fefcf7;
  --white:           #ffffff;
  --ink:             #1a1f2e;
  --ink-soft:        #4a5468;
  --ink-muted:       #6b7689;
  --rule:            #d8cfb8;
  --rule-soft:       #ede7d6;

  /* Typography */
  --font-display:    'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body:       'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizing & rhythm */
  --container-max:   1200px;
  --content-max:     780px;
  --radius:          2px;
  --radius-lg:       4px;
  --shadow-sm:       0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-md:       0 4px 16px rgba(10, 37, 64, 0.08);
  --shadow-lg:       0 12px 40px rgba(10, 37, 64, 0.12);

  /* Transitions */
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:          150ms;
  --t-base:          250ms;
  --t-slow:          400ms;
}

/* -------------------------------------------------------------------------
   3. Reset / base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* Subtle paper-texture feel via layered gradients */
  background-image:
    radial-gradient(circle at 0% 0%, rgba(176, 137, 56, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(10, 37, 64, 0.025) 0%, transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--navy-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

a:hover,
a:focus {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy-900);
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.125rem); font-weight: 500; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem);    font-weight: 600; }
h4 { font-size: 1.125rem;                       font-weight: 600; }

p {
  margin: 0 0 1.15em;
}

ul, ol {
  padding-left: 1.25em;
  margin: 0 0 1.25em;
}

li {
  margin-bottom: 0.4em;
}

/* Selection */
::selection {
  background: var(--gold-soft);
  color: var(--navy-900);
}

/* -------------------------------------------------------------------------
   4. Layout primitives — .row, .container, columns
   ------------------------------------------------------------------------- */

/* Foundation's .row used both as top-level container and as a flex row.
   We treat it as a centered, max-width wrapper. */
.row {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Foundation's column units — used in the footer (3 + 2 + 2 + 6) and
   inner pages (.twelve columns). On desktop we lay them out via flex. */
.three.columns,
.two.columns,
.six.columns,
.twelve.columns {
  width: 100%;
}

/* -------------------------------------------------------------------------
   5. Off-canvas wrapper
   ------------------------------------------------------------------------- */
.off-canvas-content {
  position: relative;
  min-height: 100vh;
  background: var(--paper);
  transition: transform var(--t-base) var(--ease);
}

/* When mobile menu opens, push content right (Foundation convention) */
body.is-off-canvas-open .off-canvas-content,
.off-canvas-content.is-open-left.has-transition-push {
  transform: translateX(280px);
}

/* -------------------------------------------------------------------------
   6. Mobile off-canvas menu
   ------------------------------------------------------------------------- */
.mobile-off-canvas-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--navy-900);
  color: var(--ivory);
  padding: 2rem 1.5rem;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform var(--t-base) var(--ease);
  box-shadow: var(--shadow-lg);
}

.mobile-off-canvas-menu.is-open,
.mobile-off-canvas-menu.is-transition-push.is-open,
body.is-off-canvas-open .mobile-off-canvas-menu {
  transform: translateX(0);
}

.mobile-off-canvas-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-off-canvas-menu .menu-item {
  margin: 0;
  border-bottom: 1px solid rgba(216, 207, 184, 0.12);
}

.mobile-off-canvas-menu .menu-item:last-child {
  border-bottom: none;
}

.mobile-off-canvas-menu .menu-item > a,
.mobile-off-canvas-menu .menu-item {
  display: block;
  padding: 0.85rem 0.25rem;
  color: var(--ivory);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  border-bottom: none;
}

.mobile-off-canvas-menu .menu-item > a:hover,
.mobile-off-canvas-menu .menu-item > a:focus {
  color: var(--gold-soft);
}

.mobile-off-canvas-menu .menu-item.is-active > a,
.mobile-off-canvas-menu .current-menu-item > a {
  color: var(--gold-soft);
  font-weight: 600;
}

/* Nested sub-menus on mobile */
.mobile-off-canvas-menu .nested.menu {
  padding-left: 1rem;
  margin: 0.25rem 0 0.75rem;
  border-left: 2px solid var(--gold);
}

.mobile-off-canvas-menu .nested.menu .menu-item {
  border-bottom: none;
}

.mobile-off-canvas-menu .nested.menu .menu-item,
.mobile-off-canvas-menu .nested.menu .menu-item > a {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  color: rgba(250, 246, 236, 0.78);
}

/* -------------------------------------------------------------------------
   7. Header — desktop top bar + mobile title bar
   ------------------------------------------------------------------------- */
.site-header {
  position: relative;
  background: var(--white);
  border-bottom: 1px solid var(--rule-soft);
  box-shadow: var(--shadow-sm);
}

/* Decorative double-rule under header (classic editorial feel) */
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--navy-900) 0%,
    var(--navy-900) 50%,
    var(--gold) 50%,
    var(--gold) 100%
  );
}

/* Mobile title bar (visible < 1024px) */
.site-title-bar.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.25rem;
  background: var(--white);
}

.title-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.site-mobile-title.title-bar-title {
  display: inline-flex;
  align-items: center;
}

.site-mobile-title img {
  max-height: 44px;
  width: auto;
}

/* Hamburger button */
.menu-icon {
  position: relative;
  width: 28px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
}

.menu-icon::before,
.menu-icon::after,
.menu-icon span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--navy-900);
  border-radius: 1px;
  transition: transform var(--t-base) var(--ease),
              opacity var(--t-base) var(--ease);
}

.menu-icon::before { top: 0; }
.menu-icon::after  { bottom: 0; }
.menu-icon::before,
.menu-icon::after {
  box-shadow: 0 9px 0 var(--navy-900);
}

/* Desktop top-bar navigation — hidden on mobile, shown on desktop */
.site-navigation.top-bar {
  display: none;
}

/* -------------------------------------------------------------------------
   8. Header search block
   ------------------------------------------------------------------------- */
.header-search {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.header-search #search {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
}

#search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}

#search-form:focus-within {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(29, 63, 110, 0.08);
}

#search-form .fa-search {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

#search-form .fa-search::before {
  content: "⌕";
  font-style: normal;
  font-size: 1rem;
}

#search-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  width: 140px;
  padding: 0.15rem 0;
}

#search-input::placeholder {
  color: var(--ink-muted);
}

/* -------------------------------------------------------------------------
   9. Main content area
   ------------------------------------------------------------------------- */
.page-container {
  padding: 2rem 0 3rem;
}

/* Breadcrumb / phone row */
.breadcrumb-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 2rem;
}

.phone {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: 0.01em;
  position: relative;
  padding-left: 1.5rem;
}

.phone::before {
  content: "✆";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.1rem;
}

/* Inner-page title bar (article / privacy / etc.) */
.header-container {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
  position: relative;
}

.header-container::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem auto 0;
}

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--navy-900);
  margin: 0;
  letter-spacing: 0.01em;
  font-style: italic;
}

/* Homepage intro section */
.intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 1.5rem 0;
}

.intro .entry-content > h2:first-of-type {
  margin-top: 0;
}

/* Generic main wrap for inner pages */
.main-wrap {
  max-width: var(--content-max);
  margin-inline: auto;
}

.main-wrap .twelve.columns {
  width: 100%;
}

/* Article body */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}

.entry-content h2 {
  margin-top: 2.25em;
  margin-bottom: 0.65em;
  font-style: italic;
  color: var(--navy-900);
  position: relative;
  padding-left: 1.25rem;
}

.entry-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  bottom: 0.4em;
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.entry-content > h2:first-child {
  margin-top: 0;
}

.entry-content p {
  margin-bottom: 1.15em;
}

.entry-content a {
  color: var(--navy-700);
  border-bottom: 1px solid var(--gold-soft);
  font-weight: 500;
}

.entry-content a:hover,
.entry-content a:focus {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Lists in article body */
.entry-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5em;
}

.entry-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65em;
}

.entry-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.entry-content ol {
  padding-left: 1.5em;
}

/* Footer of entry block (empty <p>) */
.entry-content + footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule-soft);
  padding-top: 1rem;
}

/* -------------------------------------------------------------------------
   10. Copyright bar
   ------------------------------------------------------------------------- */
.copyright-container {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule-soft);
}

.copyright {
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}

.copyright a {
  color: var(--navy-700);
}

/* -------------------------------------------------------------------------
   11. Site footer (widget area, 4 columns)
   ------------------------------------------------------------------------- */
.footer {
  background: var(--navy-900);
  color: var(--ivory);
  padding: 3rem 1.25rem 2rem;
  margin-top: 4rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold) 30%,
    var(--gold) 70%,
    transparent
  );
}

.footer > div {
  margin-bottom: 2rem;
}

.footer .widget {
  margin-bottom: 0;
}

.footer img {
  max-width: 200px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* Footer nav widgets */
.footer .menu,
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer .menu-item {
  margin-bottom: 0.65rem;
  padding: 0;
}

.footer .menu-item,
.footer .menu-item a {
  color: rgba(250, 246, 236, 0.85);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.footer .menu-item a {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.footer .menu-item a:hover,
.footer .menu-item a:focus {
  color: var(--gold-soft);
  border-bottom-color: var(--gold-soft);
}

.footer .menu-item.current-menu-item > a,
.footer .menu-item.is-active > a {
  color: var(--gold-soft);
}

/* Footer rotator (banner image area) */
.footer .rotator .headline {
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(216, 207, 184, 0.12);
}

.footer .rotator img {
  filter: none;
  max-width: 100%;
}

/* -------------------------------------------------------------------------
   12. Tablet — 640px and up
   ------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .row,
  .container {
    padding-inline: 2rem;
  }

  .page-container {
    padding: 2.5rem 0 3.5rem;
  }

  .footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
    row-gap: 2rem;
    padding: 3.5rem 2rem 2rem;
  }

  .footer > div {
    margin-bottom: 0;
  }

  .footer .six.columns.rotator {
    grid-column: 1 / -1;
  }
}

/* -------------------------------------------------------------------------
   13. Desktop — 1024px and up
   ------------------------------------------------------------------------- */
@media (min-width: 1024px) {

  /* Hide mobile title bar, show desktop nav */
  .site-title-bar.title-bar {
    display: none;
  }

  .site-navigation.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
  }

  .top-bar-left {
    flex-shrink: 0;
  }

  .top-bar-left img {
    max-height: 70px;
    width: auto;
  }

  .top-bar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex: 1;
  }

  .header-search {
    align-self: flex-end;
  }

  /* Desktop dropdown menu */
  .dropdown.menu.desktop-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
    align-items: center;
  }

  .dropdown.menu.desktop-menu > .menu-item {
    position: relative;
    margin: 0;
    padding: 0;
  }

  .dropdown.menu.desktop-menu > .menu-item > a,
  .dropdown.menu.desktop-menu > .menu-item {
    display: block;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy-900);
    border-bottom: 2px solid transparent;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease);
  }

  .dropdown.menu.desktop-menu > .menu-item > a:hover,
  .dropdown.menu.desktop-menu > .menu-item > a:focus,
  .dropdown.menu.desktop-menu > .menu-item:hover > a,
  .dropdown.menu.desktop-menu > .menu-item:focus-within > a {
    color: var(--gold);
    border-bottom-color: var(--gold);
  }

  .dropdown.menu.desktop-menu > .menu-item.current-menu-item > a,
  .dropdown.menu.desktop-menu > .menu-item.is-active > a {
    color: var(--gold);
    border-bottom-color: var(--gold);
  }

  /* Nested dropdowns */
  .dropdown.menu.desktop-menu .dropdown.menu.vertical {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease),
                visibility var(--t-fast) var(--ease);
    z-index: 100;
  }

  .dropdown.menu.desktop-menu > .menu-item.menu-item-has-children:hover > .dropdown.menu.vertical,
  .dropdown.menu.desktop-menu > .menu-item.menu-item-has-children:focus-within > .dropdown.menu.vertical {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dropdown.menu.desktop-menu .dropdown.menu.vertical .menu-item {
    padding: 0;
    margin: 0;
  }

  .dropdown.menu.desktop-menu .dropdown.menu.vertical .menu-item,
  .dropdown.menu.desktop-menu .dropdown.menu.vertical .menu-item > a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink);
    border: none;
  }

  .dropdown.menu.desktop-menu .dropdown.menu.vertical .menu-item:hover,
  .dropdown.menu.desktop-menu .dropdown.menu.vertical .menu-item > a:hover {
    background: var(--ivory);
    color: var(--navy-900);
    border: none;
  }

  /* Header search becomes inline on desktop */
  .header-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .header-search #search {
    margin-top: 0;
  }

  /* Footer — 4-column layout (3 + 2 + 2 + 6 totals 13, treat as flex) */
  .footer {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 2.25fr;
    column-gap: 3rem;
    align-items: start;
    padding: 4rem 2rem 2.5rem;
  }

  .footer .six.columns.rotator {
    grid-column: auto;
  }

  /* Inner-page header bar gets more breathing room */
  .header-container {
    padding: 3.5rem 0 2rem;
  }
}

/* -------------------------------------------------------------------------
   14. Large desktop — 1280px and up
   ------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .dropdown.menu.desktop-menu > .menu-item > a,
  .dropdown.menu.desktop-menu > .menu-item {
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
  }

  .page-container {
    padding: 3rem 0 4rem;
  }

  .footer {
    padding: 4.5rem 3rem 3rem;
  }
}

/* -------------------------------------------------------------------------
   15. Print
   ------------------------------------------------------------------------- */
@media print {
  .site-header,
  .footer,
  .mobile-off-canvas-menu,
  .breadcrumb-container {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .entry-content {
    font-size: 11pt;
    line-height: 1.5;
  }
}

/* -------------------------------------------------------------------------
   16. Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   17. Accessibility — focus states
   ------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
