/* ==========================================================================
   C&J HOLDINGS AT BAY CREEK — GLOBAL STYLESHEET (style.css)
   One file styles every page: index, about, portfolio, contact.

   HOW TO READ THIS FILE (beginner notes)
   - Text inside a slash-star comment block like this one is ignored by
     the browser. It is there only to explain things to humans.
   - Section 1 holds the brand colors and fonts. Change a value there and
     the whole site updates. You rarely need to touch anything below it.
   - Layout uses Flexbox and Grid. Layouts are built so that longer or
     shorter text, or a different image, will NOT break the design.
   ========================================================================== */


/* ==========================================================================
   1. BRAND SETTINGS  (the easiest place to make changes)
   ========================================================================== */
:root {
  /* --- Brand colors --- */
  --bay-blue:   #1A365D;  /* Deep Bay Blue: headings, nav, buttons      */
  --sail-white: #FFFFFF;  /* Crisp Sail White: page background          */
  --dune:       #F4F1EA;  /* Dune / Sand: soft alternate section color  */
  --seaglass:   #7BA498;  /* Seaglass Green: accents and highlights     */

  /* --- Supporting shades (derived from the brand colors) --- */
  --bay-blue-dark: #12263f;           /* darker blue for hover states   */
  --ink:           #2b3442;           /* body text, softer than black   */
  --ink-soft:      #5b6675;           /* secondary text                 */
  --line:          #e3ded2;           /* thin divider lines             */
  --seaglass-deep: #3f6b5e;           /* readable green for small text  */

  /* --- Fonts (Google Fonts are loaded in each page's <head>) --- */
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* --- Layout --- */
  --content-width: 1180px;   /* maximum width of page content           */
  --gutter: clamp(1.25rem, 5vw, 3rem); /* left/right page padding       */
  --section-space: clamp(3.5rem, 9vw, 7rem); /* top/bottom section gap  */
  --radius: 4px;
  --nav-height: 76px;
  --shadow: 0 18px 40px -22px rgba(26, 54, 93, 0.45);
}


/* ==========================================================================
   2. BASE / RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--sail-white);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;       /* long words/emails never force sideways scroll */
}

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

a { color: var(--bay-blue); text-underline-offset: 3px; }
a:hover { color: var(--seaglass-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--bay-blue);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1.2em; }

/* Keyboard users see a clear outline; mouse users do not */
:focus-visible {
  outline: 3px solid var(--seaglass);
  outline-offset: 3px;
}

/* "Skip to content" link for screen readers / keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bay-blue);
  color: var(--sail-white);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 0; color: var(--sail-white); }


/* ==========================================================================
   3. SHARED LAYOUT HELPERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section        { padding-block: var(--section-space); }
.section--sand  { background: var(--dune); }
.section--blue  { background: var(--bay-blue); color: #dfe7f1; }
.section--blue h2, .section--blue h3 { color: var(--sail-white); }

/* Small uppercase label that sits above a heading */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--seaglass-deep);
  margin-bottom: 1rem;
}
.section--blue .eyebrow { color: #a9cabf; }

/* Short green rule under a heading */
.rule {
  width: 56px;
  height: 3px;
  background: var(--seaglass);
  border: 0;
  margin: 0 0 1.75rem;
}

.section-intro { max-width: 46rem; }
.section-intro--center { margin-inline: auto; text-align: center; }
.section-intro--center .rule { margin-inline: auto; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.8;
  color: var(--ink-soft);
}


/* ==========================================================================
   4. NAVIGATION BAR  (identical on every page, stays at the top)
   The mobile menu uses a hidden checkbox, so no JavaScript is required.
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.nav {
  position: relative;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bay-blue);
}
.brand__tag {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--seaglass-deep);
  margin-top: 0.2rem;
}

/* Hidden checkbox that powers the mobile menu */
.nav__toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
/* The "hamburger" button (visible on small screens only) */
.nav__button {
  display: none;
  cursor: pointer;
  padding: 0.75rem;
  margin-right: -0.75rem;
}
.nav__button span,
.nav__button span::before,
.nav__button span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bay-blue);
  content: "";
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav__button span::before { top: -7px; position: absolute; }
.nav__button span::after  { top: 7px;  position: absolute; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bay-blue);
  border-bottom: 2px solid transparent;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  border-bottom-color: var(--seaglass);
  color: var(--bay-blue);
}

/* ---- Mobile and tablet menu ---- */
@media (max-width: 899px) {
  .nav__button { display: block; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--sail-white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(26, 54, 93, 0.4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links li + li { border-top: 1px solid var(--line); }
  .nav__links a {
    display: block;
    padding: 1.1rem var(--gutter);
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .nav__links a:hover,
  .nav__links a[aria-current="page"] {
    border-left-color: var(--seaglass);
    background: var(--dune);
  }

  /* When the checkbox is ticked, open the menu */
  .nav__toggle:checked ~ .nav__links { max-height: 420px; }
  .nav__toggle:checked ~ .nav__button span { background: transparent; }
  .nav__toggle:checked ~ .nav__button span::before { top: 0; transform: rotate(45deg); }
  .nav__toggle:checked ~ .nav__button span::after  { top: 0; transform: rotate(-45deg); }
  .nav__toggle:focus-visible ~ .nav__button { outline: 3px solid var(--seaglass); }
}


/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 1.05rem 2.1rem;
  border: 2px solid var(--bay-blue);
  border-radius: var(--radius);
  background: var(--bay-blue);
  color: var(--sail-white);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--bay-blue-dark); border-color: var(--bay-blue-dark); color: var(--sail-white); }

.btn--light { background: var(--sail-white); border-color: var(--sail-white); color: var(--bay-blue); }
.btn--light:hover { background: var(--dune); border-color: var(--dune); color: var(--bay-blue); }

.btn--outline { background: transparent; color: var(--bay-blue); }
.btn--outline:hover { background: var(--bay-blue); color: var(--sail-white); }

.btn--outline-light { background: transparent; border-color: var(--sail-white); color: var(--sail-white); }
.btn--outline-light:hover { background: var(--sail-white); color: var(--bay-blue); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }


/* ==========================================================================
   6. HERO (large image banner at the top of the Home page)
   The photo is an <img> placed behind the text. If a photo ever fails to
   load, the blue gradient below shows instead, so text stays readable.
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 88vh, 860px);
  color: var(--sail-white);
  background: linear-gradient(160deg, #2d5a86 0%, var(--bay-blue) 60%, #0f2440 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fills the area without stretching */
  z-index: -2;
}
/* Dark-blue wash so white text is always readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 38, 63, 0.78) 0%, rgba(18, 38, 63, 0.45) 55%, rgba(18, 38, 63, 0.2) 100%);
}
.hero__content { padding-block: 5rem; max-width: 46rem; }
.hero h1 { color: var(--sail-white); margin-bottom: 0.5em; }
.hero .eyebrow { color: #cfe3dc; }
.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.75;
  color: #eef3f8;
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

/* Smaller banner used at the top of the inside pages */
.page-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(280px, 42vh, 440px);
  color: var(--sail-white);
  background: linear-gradient(160deg, #3b6a8f 0%, var(--bay-blue) 70%);
  overflow: hidden;
  isolation: isolate;
}
.page-banner__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 38, 63, 0.25) 0%, rgba(18, 38, 63, 0.78) 100%);
}
.page-banner__content { padding-block: clamp(2rem, 6vw, 4rem); }
.page-banner h1 { color: var(--sail-white); font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; }
.page-banner .eyebrow { color: #cfe3dc; }


/* ==========================================================================
   7. SPLIT LAYOUT  (text on one side, image on the other)
   Stacks into a single column on phones and tablets.
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: -1; }
}

/* Picture frame: keeps a fixed shape whatever image is placed inside */
.frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--seaglass) 0%, #bcd3cc 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.frame--tall { aspect-ratio: 4 / 5; }
.frame--wide { aspect-ratio: 16 / 9; }
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.caption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}


/* ==========================================================================
   8. CARDS AND GRIDS
   ========================================================================== */
.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .grid--2, .grid--3, .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); } }

.card {
  background: var(--sail-white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--seaglass);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section--sand .card { border-color: transparent; border-top-color: var(--seaglass); }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }

.card__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--seaglass);
  margin-bottom: 0.75rem;
}


/* ==========================================================================
   9. STRUCTURE DIAGRAM  (About page: the LLC and the property it owns)
   ========================================================================== */
.structure { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-width: 40rem; margin-inline: auto; }
.structure__box {
  background: var(--sail-white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--bay-blue);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}
.structure__box--mid { border-left-color: var(--seaglass); }
.structure__box--end { border-left-color: var(--line); background: var(--dune); }
.structure__box h3 { font-size: 1.2rem; margin-bottom: 0.25em; }
.structure__box p  { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.structure__label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--seaglass-deep);
  margin-bottom: 0.3rem;
}
.structure__link {
  align-self: center;
  width: 2px;
  height: 1.75rem;
  background: var(--seaglass);
}


/* ==========================================================================
   10. FACT LIST  (label / value rows, used on the Portfolio page)
   ========================================================================== */
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.facts__label {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
}
.facts__value { font-weight: 500; color: var(--bay-blue); text-align: right; }
@media (max-width: 479px) {
  .facts li { flex-direction: column; }
  .facts__value { text-align: left; }
}

/* Small pill-shaped status tag */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--seaglass-deep);
  color: var(--sail-white);
  margin-bottom: 1.25rem;
}

/* Photo gallery: three pictures that reflow by screen size */
.gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery .frame { aspect-ratio: 3 / 2; box-shadow: none; }


/* ==========================================================================
   11. CALL-TO-ACTION STRIP
   ========================================================================== */
.cta { text-align: center; }
.cta .container { max-width: 52rem; }
.cta p { color: #dfe7f1; }
.cta .btn-row { justify-content: center; }


/* ==========================================================================
   12. CONTACT PAGE AND FORM
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
@media (min-width: 900px) { .contact-layout { grid-template-columns: 5fr 7fr; align-items: start; } }

.contact-details { margin: 0; padding: 0; list-style: none; }
.contact-details li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-details li:first-child { border-top: 1px solid var(--line); }
.contact-details__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--seaglass-deep);
  margin-bottom: 0.25rem;
}
.contact-details__value { font-size: 1.05rem; color: var(--bay-blue); }
.contact-details a { font-weight: 500; }

.form-card {
  background: var(--sail-white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--seaglass);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

.form-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-field--full { grid-column: 1 / -1; }
}

.form-field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bay-blue);
  margin-bottom: 0.5rem;
}
.form-field .optional { font-weight: 500; letter-spacing: 0.08em; color: var(--ink-soft); text-transform: none; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;           /* 16px prevents iPhone zoom-on-focus */
  color: var(--ink);
  background: var(--dune);
  border: 1px solid transparent;
  border-bottom: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-field textarea { min-height: 170px; resize: vertical; }
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-bottom-color: var(--seaglass); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: var(--sail-white);
  border-color: var(--seaglass);
  box-shadow: 0 0 0 3px rgba(123, 164, 152, 0.3);
}

.form-note { font-size: 0.82rem; color: var(--ink-soft); margin: 1.25rem 0 0; }
.form-status { margin-top: 1rem; font-size: 0.9rem; color: var(--seaglass-deep); font-weight: 500; }
.form-submit { margin-top: 0.5rem; }
@media (max-width: 639px) { .form-submit .btn { width: 100%; } }

/* Hidden "honeypot" field that catches simple spam bots */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* ==========================================================================
   13. FOOTER (identical on every page)
   ========================================================================== */
.site-footer {
  background: var(--bay-blue-dark);
  color: #c4d0df;
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: #e6eef7; }
.site-footer a:hover { color: var(--seaglass); }

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--sail-white);
  margin-bottom: 0.6rem;
}
.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--seaglass);
  margin: 0 0 0.9rem;
}
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 0.45rem; }
.footer-legal { margin: 1.5rem 0 0; font-size: 0.8rem; color: #93a3b8; }


/* ==========================================================================
   14. EXTRA-LARGE SCREENS
   Content is capped at --content-width so lines of text never get too long
   on wide monitors. Only spacing grows.
   ========================================================================== */
@media (min-width: 1600px) {
  html { font-size: 17px; }
}

/* Respect visitors who have asked their device to reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
