/*
Theme Name: WordPress Core
Theme URI: https://github.com/jefffabiny/wordpress-core
Author: rochester.dev
Author URI: https://rochester.dev
Description: Barebones theme scaffold for building new WordPress themes. Responsive mobile-first nav, minimal templates for pages, posts, and front page.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wordpress-core
*/

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, pre,
ul, ol, dl, dd,
fieldset, legend {
  margin: 0;
}

ul, ol {
  padding-left: 1.5em;
}

body {
  padding: 0;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Base / layout */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* When logged in, admin bar reduces viewport; don't push footer past fold */
body.admin-bar {
  min-height: calc(100vh - 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar {
    min-height: calc(100vh - 46px);
  }
}

.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: #171717;
}

.site-brand-title {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.site-brand-tagline {
  font-size: 0.8125rem;
  font-weight: 450;
  color: #6b7280;
}

.site-brand:hover {
  color: #111827;
  text-decoration: none;
}

.site-brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Hamburger toggle: visible only on small screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #171717;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  color: #404040;
}

.nav-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav menu — horizontal row on desktop */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  display: inline-block;
}

.nav-menu a {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #525252;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-menu a:hover {
  color: #171717;
  background-color: #f5f5f5;
}

.nav-menu a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Mobile: hamburger + slide-down menu */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-nav.is-open {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-menu a {
    padding: 0.6rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #f5f5f5;
  }

  .nav-menu li:last-child a {
    border-bottom: 0;
  }
}

/* Front page jumbotron */
.front-page-jumbotron {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(320px, 70vh, 640px);
  padding: 3rem 1.5rem 3.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  overflow: hidden;
}

.jumbotron-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.jumbotron-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Default: no featured image — use gradient as hero background */
.jumbotron-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.85) 40%,
    rgba(15, 23, 42, 0.6) 100%
  );
}

/* With featured image — dark overlay for readability */
.front-page-jumbotron .jumbotron-background ~ .jumbotron-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(15, 23, 42, 0.7) 45%,
    rgba(15, 23, 42, 0.45) 100%
  );
}

/* With hero video — slightly lighter overlay so video shows through */
.front-page-jumbotron.has-hero-video .jumbotron-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.8) 0%,
    rgba(15, 23, 42, 0.55) 40%,
    rgba(15, 23, 42, 0.3) 100%
  );
}

.jumbotron-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 48rem;
  text-align: left;
}

.jumbotron-kicker {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a3a3a3;
  margin-bottom: 0.9rem;
}

.jumbotron-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw + 1.25rem, 3.5rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #f9fafb;
}

.jumbotron-lead {
  margin: 0;
  font-size: clamp(1rem, 2vw + 0.8rem, 1.25rem);
  line-height: 1.7;
  color: rgba(249, 250, 251, 0.9);
  max-width: 34rem;
}

.jumbotron-actions {
  margin-top: 1.5rem;
}

@media (min-width: 960px) {
  .front-page-jumbotron {
    justify-content: flex-start;
  }

  .jumbotron-inner {
    margin-left: max(4rem, (100% - 72rem) / 2);
  }
}

.site-main--front {
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .site-main--front {
    padding-top: 2.5rem;
  }
}

/* Home sections */
.home-sections {
  max-width: 60rem;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.25rem;
}

.home-section {
  margin: 0;
}

.home-section-title {
  font-size: 1.625rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.home-section--intro p + p {
  margin-top: 0.9rem;
}

.home-section--testimonials {
  border-radius: 1rem;
  padding: 1.9rem 1.75rem;
  background: #f5f5f5;
}

.home-testimonial {
  margin: 0;
}

.home-testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  margin: 0 0 0.75rem;
}

.home-testimonial-meta {
  font-size: 0.9375rem;
  color: #525252;
}

.home-section--cta {
  margin-top: 0.5rem;
}

.home-section-cta-inner {
  border-radius: 1.1rem;
  padding: 1.9rem 1.75rem;
  background: #111827;
  color: #f9fafb;
}

.home-section-cta-inner p {
  margin: 0.6rem 0 0;
  max-width: 32rem;
}

.home-section-cta-actions {
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.08s ease;
}

.button-primary {
  background: #f9fafb;
  border-color: #f9fafb;
  color: #111827;
}

.button-primary:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
  transform: translateY(-1px);
}

.button-primary:focus-visible {
  outline: 2px solid #e5e7eb;
  outline-offset: 2px;
}

.home-section--local {
  padding-top: 0.5rem;
  border-top: 1px solid #e5e5e5;
}

.home-local-tagline {
  font-size: 0.9375rem;
  color: #737373;
}

/* Footer */
.site-footer {
  padding: 1.25rem 1.75rem 1.5rem;
  border-top: 1px solid #e5e5e5;
  background: #f9fafb;
  font-size: 0.875rem;
}

.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-footer-brand strong {
  font-weight: 650;
}

.site-footer-tagline {
  color: #6b7280;
}

.site-footer-copy {
  color: #6b7280;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: #9ca3af;
}

.site-footer-meta a {
  color: inherit;
  text-decoration: none;
}

.site-footer-meta a:hover {
  text-decoration: underline;
}

.site-footer-separator {
  opacity: 0.7;
}

.site-main {
  flex: 1;
  padding: 1rem 2rem;
  max-width: 72ch;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
