/* ==========================================================================
   Terry Tedesco, Inc — Modular Homes
   Shared modern stylesheet (system-font, responsive, accessible)
   ========================================================================== */

:root {
  --navy: #17334d;
  --navy-2: #20466b;
  --teal: #2c7a9b;
  --teal-dark: #22658a;
  --gold: #e8a13b;
  --gold-dark: #c8872b;
  --bg: #f5f8fb;
  --card: #ffffff;
  --ink: #263238;
  --muted: #5c6b76;
  --line: #e2e8ef;
  --green: #5b8c3a;
  --shadow: 0 6px 22px rgba(23, 51, 77, .10);
  --shadow-lg: 0 14px 40px rgba(23, 51, 77, .16);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--teal-dark); }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em 1.2em; padding: 0; }
li { margin-bottom: .35em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--navy);
  padding: .6rem 1rem; border-radius: 0 0 8px;
  font-weight: 600; text-decoration: none; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Visually hidden helper (screen-reader only) */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Accessible focus */
a:focus-visible, button:focus-visible, .card:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header / brand / navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: .9rem 0;
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand img {
  height: 64px; width: auto; border-radius: 6px;
}
.brand-name { color: #fff; font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; color: #bfd6e4; font-size: .82rem; }
.header-phone { text-align: right; }
.header-phone a {
  color: var(--gold); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4rem;
}
.header-phone span { display: block; color: #bfd6e4; font-size: .82rem; font-weight: 500; }

.site-nav {
  background: rgba(255, 255, 255, .06);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 1.5rem; line-height: 1; padding: .3rem .65rem; border-radius: 6px;
  cursor: pointer; margin: .4rem 0;
}
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .15rem;
}
.nav-list a {
  display: block; color: #e8f0f6; text-decoration: none;
  padding: .85rem .85rem; font-weight: 600; font-size: .98rem;
  border-radius: 6px;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.14); }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.main-article { padding: 2.5rem 0 3.5rem; }
.hero {
  background:
    linear-gradient(rgba(23, 51, 77, .82), rgba(23, 51, 77, .82)),
    #17334d;
  color: #fff; text-align: center; padding: 3.5rem 1.25rem;
}
.hero h1 { color: #fff; margin-bottom: .6rem; }
.hero p.lead { font-size: 1.15rem; max-width: 720px; margin: 0 auto 1.4rem; color: #dfeaf2; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem;
  color: var(--gold); font-weight: 700; margin-bottom: .6rem;
}

.cta-group { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: .4rem; }

.btn {
  display: inline-block; background: var(--gold); color: #17334d;
  font-weight: 700; text-decoration: none; padding: .8rem 1.4rem;
  border-radius: 8px; box-shadow: var(--shadow); transition: transform .12s, background .12s;
}
.btn:hover { background: #f0b252; color: #17334d; transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); box-shadow: none; }
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }

.section { padding: 2.6rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 1.8rem; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  color: var(--teal); font-weight: 700;
}
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card img { border-radius: 8px; margin-bottom: 1rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .97rem; }
.card .meta { color: var(--teal); font-weight: 700; font-size: .86rem; }

.plan-card a.img-link { display: block; }
.plan-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.plan-card .sqft {
  display: inline-block; background: var(--navy); color: #fff;
  font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 20px; margin-bottom: .7rem;
}

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding-left: 1.8rem; position: relative; margin-bottom: .7rem; }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}

/* Call to action banner */
.cta-banner {
  background: linear-gradient(120deg, var(--teal) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: var(--radius); padding: 2.2rem;
  text-align: center; margin: 2rem 0 0;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #e6f0f6; }
.cta-banner .btn { margin-top: .6rem; }

/* Address / map-ish block */
.address-block {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: 8px; padding: 1.2rem 1.4rem;
}
.address-block .add { font-weight: 700; color: var(--navy); }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 560px; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: #f3f7fb; }

/* FAQ */
details.faq {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: .8rem; padding: 1.1rem 1.3rem;
}
details.faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy); font-size: 1.05rem;
  list-style: none; position: relative; padding-right: 1.4rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 0; color: var(--teal);
  font-size: 1.4rem; line-height: 1; font-weight: 400;
}
details.faq[open] summary::after { content: "–"; }
details.faq p, details.faq ul { margin-top: .8rem; }

/* Gallery / lightbox */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid a { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; transition: transform .25s; }
.gallery-grid a:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 20, 30, .92); display: none;
  align-items: center; justify-content: center; z-index: 1000; padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox-caption { color: #fff; text-align: center; margin-top: .7rem; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.4rem; background: none; border: none;
  color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer;
}

/* Breadcrumbs */
.breadcrumbs { padding: 1rem 0 0; font-size: .9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li::after { content: "›"; margin-left: .4rem; color: var(--muted); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { text-decoration: none; color: var(--teal-dark); }
.breadcrumbs [aria-current] { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer { background: var(--navy); color: #c9d8e4; margin-top: 3rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding: 2.8rem 1rem 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: #cfe0ea; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 1.1rem 1rem;
  text-align: center; color: #93a9bb; font-size: .85rem;
}
.footer-bottom a { color: #cfe0ea; }

/* From-our-desk note (homepage, slim recommendation strip) */
.desk-note {
  background: #edf3f8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
.desk-note .container { max-width: 880px; }
.desk-note h2.desk-note-label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--teal); margin-bottom: .5rem;
}
.desk-note p { margin: 0; font-size: .97rem; }

/* Curated resource list (resources page) */
.resource-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.resource-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.2rem; margin-bottom: .7rem; box-shadow: var(--shadow);
}
.resource-list a { font-weight: 600; }
.resource-list p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }

/* Media queries */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 52px; }
  .header-phone { display: none; }
  .nav-toggle { display: block; }
  .nav-list {
    display: none; flex-direction: column; width: 100%;
    background: var(--navy-2); border-top: 1px solid rgba(255,255,255,.12);
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .8rem .6rem; border-radius: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 2.6rem 1rem; }
  .cta-group { flex-direction: column; }
  .main-article { padding: 1.6rem 0 2.5rem; }
}
