/* ===================================================================
   Del Ponte Realty — Mayville, WI
   Custom CSS  |  Warm Slate + Terracotta  |  Light/Dark
   Fonts: Playfair Display (headings) + Nunito Sans (body)
   =================================================================== */

/* --- Custom Properties ------------------------------------------- */
:root {
  --bg: #faf9f7;
  --bg-alt: #f2efeb;
  --bg-card: #ffffff;
  --text: #2c2a26;
  --text-muted: #6b6760;
  --primary: #8b5e3c;
  --primary-light: #a67650;
  --primary-dark: #6d4830;
  --accent: #3d5a4c;
  --accent-light: #4e7260;
  --border: #ddd8d1;
  --shadow: 0 1px 3px rgba(44,42,38,.06), 0 1px 2px rgba(44,42,38,.04);
  --shadow-md: 0 4px 12px rgba(44,42,38,.07), 0 2px 4px rgba(44,42,38,.04);
  --shadow-lg: 0 10px 30px rgba(44,42,38,.09), 0 4px 8px rgba(44,42,38,.04);
  --radius: 6px;
  --radius-lg: 10px;
  --transition: .25s ease;
  --nav-height: 72px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1a1816;
  --bg-alt: #22201d;
  --bg-card: #2a2724;
  --text: #e8e4df;
  --text-muted: #9a958d;
  --primary: #c4956e;
  --primary-light: #d4a880;
  --primary-dark: #b08058;
  --accent: #6ea88a;
  --accent-light: #82bfa0;
  --border: #3a3632;
  --shadow: 0 1px 3px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.15);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.15);
  color-scheme: dark;
}

/* --- Reset & Base ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 2.25rem;
}

/* FOUC prevention */
body.no-fouc { opacity: 0; }
body.no-fouc.ready { opacity: 1; transition: opacity .15s ease; }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem); }
h4 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.375rem); }

p + p { margin-top: 1em; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* --- Layout ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

.section-header p {
  margin-top: .75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.label {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .5rem;
}

/* --- Grids ------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Navigation -------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  height: var(--nav-height);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
  background: rgba(250,249,247,.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .nav.scrolled {
  background: rgba(26,24,22,.95);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.nav-logo:hover { color: var(--primary); }

.nav-links {
  list-style: none;
  display: none;
  gap: .25rem;
}

.nav-links a {
  display: block;
  padding: .5rem .875rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--bg-alt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav-phone {
  display: none;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
}
.nav-phone:hover { color: var(--primary); }
.nav-phone svg { width: 16px; height: 16px; flex-shrink: 0; }

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.theme-toggle:hover { color: var(--primary); background: var(--bg-alt); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
  transform: translateY(-110%);
  transition: transform .3s ease;
  z-index: 99;
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { transform: translateY(0); }

.mobile-menu a {
  display: block;
  padding: .75rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--primary); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-phone { display: flex; }
  .hamburger { display: none; }
  .mobile-menu { display: none; }
}

/* --- Hero -------------------------------------------------------- */
.hero {
  padding-top: calc(var(--nav-height) + clamp(3rem, 3vw, 5rem));
  padding-bottom: clamp(3rem, 3vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content { max-width: 560px; }

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero-desc {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-image img { height: 480px; }
}

/* --- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8125rem 1.75rem;
  font-family: 'Nunito Sans', sans-serif;
  font-size: .9375rem;
  font-weight: 700;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1.3;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-sm {
  padding: .5rem 1.25rem;
  font-size: .875rem;
}

.btn svg { width: 18px; height: 18px; }

/* --- Cards ------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: .5rem; }

.card p { color: var(--text-muted); font-size: .95rem; }

/* --- Value Props (Horizontal Cards) ------------------------------ */
.value-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.value-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--primary);
  flex-shrink: 0;
}

.value-card-icon svg { width: 22px; height: 22px; }

.value-card h4 { margin-bottom: .35rem; }
.value-card p { color: var(--text-muted); font-size: .9rem; }

/* --- Process Steps ----------------------------------------------- */
.process-step {
  position: relative;
  padding-left: 4rem;
  padding-bottom: 2.5rem;
}

.process-step::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.process-step:last-child::before { display: none; }
.process-step:last-child { padding-bottom: 0; }

.process-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
}

.process-step h4 { margin-bottom: .35rem; }
.process-step p { color: var(--text-muted); font-size: .95rem; }

/* --- Testimonials ------------------------------------------------ */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 1rem;
  color: #d4a84e;
}
.testimonial-stars svg { width: 18px; height: 18px; }

.testimonial-text {
  font-size: 1.025rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.testimonial-author {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}

.testimonial-role {
  font-size: .825rem;
  color: var(--text-muted);
}

/* --- CTA Banner -------------------------------------------------- */
.cta-banner {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 2rem + 3vw, 4rem);
  text-align: center;
}

.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p { color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto 1.5rem; }
.cta-banner .btn-outline {
  border-color: #fff;
  color: #fff;
}
.cta-banner .btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

/* --- Area Guide -------------------------------------------------- */
.area-highlight {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.area-highlight img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 320px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.area-list { list-style: none; }
.area-list li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .95rem;
  color: var(--text);
}
.area-list li:last-child { border-bottom: none; }
.area-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

@media (min-width: 900px) {
  .area-highlight { grid-template-columns: 1fr 1fr; }
}

/* --- FAQ --------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  line-height: 1.4;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
}

/* --- Contact / Forms --------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-info-item svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-item h4 { font-family: 'Nunito Sans', sans-serif; font-weight: 700; margin-bottom: .15rem; }
.contact-info-item p { color: var(--text-muted); font-size: .925rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 700;
  font-size: .875rem;
  margin-bottom: .35rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  font-family: 'Nunito Sans', sans-serif;
  font-size: .9375rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,94,60,.12);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: 1.25rem;
  font-size: .825rem;
  color: var(--text-muted);
}
.form-consent input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}

.form-status {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  margin-top: 1rem;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(61,90,76,.1);
  color: var(--accent);
}
.form-status.error {
  display: block;
  background: rgba(180,60,60,.1);
  color: #b43c3c;
}

/* --- Footer ------------------------------------------------------ */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: .75rem;
  max-width: 320px;
}

.footer-nav h4 {
  font-family: 'Nunito Sans', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
  color: var(--text);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li { margin-bottom: .4rem; }

.footer-nav a {
  font-size: .9rem;
  color: var(--text-muted);
}
.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary); }

/* --- Disclaimer Bar ---------------------------------------------- */
.disclaimer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: .4rem 1.25rem;
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* --- Page Headers ------------------------------------------------ */
.page-header {
  padding-top: calc(var(--nav-height) + clamp(2.5rem, 3vw, 4rem));
  padding-bottom: clamp(2rem, 2vw, 3rem);
  text-align: center;
  background: var(--bg-alt);
}

.page-header h1 { margin-bottom: .75rem; }
.page-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- About ------------------------------------------------------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .about-split { grid-template-columns: 2fr 3fr; }
}

.about-portrait {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-portrait img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* --- Reveal Animation -------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* --- Service Detail Page ----------------------------------------- */
.service-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .service-intro { grid-template-columns: 1fr 1fr; }
}

.service-intro img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 360px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* --- 404 --------------------------------------------------------- */
.error-page {
  padding-top: calc(var(--nav-height) + 4rem);
  text-align: center;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-page h1 {
  font-size: clamp(5rem, 4rem + 5vw, 8rem);
  color: var(--border);
}

.error-page h2 { margin-bottom: 1rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }

/* --- Whimsy: Subtle Divider -------------------------------------- */
.divider-wave {
  height: 40px;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.divider-wave::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 40px;
  background: var(--bg);
  border-radius: 50% 50% 0 0;
}

/* --- Whimsy: Accent Line ----------------------------------------- */
.accent-line {
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 1rem;
}
.section-header .accent-line { margin: 0 auto 1rem; }

/* --- Responsive adjustments -------------------------------------- */
@media (max-width: 639px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* --- Print ------------------------------------------------------- */
@media print {
  .nav, .mobile-menu, .disclaimer-bar, .theme-toggle, .hamburger { display: none !important; }
  body { padding-bottom: 0; }
  .section { padding: 1.5rem 0; }
}
