@import url("fonts.css");

/* ============================================================
   JSF Homes — custom home builder, North Texas
   Four sections: hero, work, who we are, contact.
   Palette and mark are the brand's: bronze, black, warm paper.
   ============================================================ */

:root {
  color-scheme: light;

  --paper:      #ebe7e0;
  --paper-hi:   #f5f2ec;
  --ink:        #171614;
  --ink-soft:   #514c44;
  --rule:       #cfc9be;
  --night:      #1a1815;
  --bronze:     #a88567;   /* brand bronze — the mark, rules, never small text */
  --bronze-ink: #7a5a3d;   /* bronze at text contrast (5.3:1 on paper) */

  --display: "Marcellus", "Hoefler Text", Georgia, serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --sec-y: clamp(4rem, 9vw, 7.5rem);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.08rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is load-bearing: the width/height attributes on each <img>
   land as presentational height, which disables aspect-ratio. */
img, svg { max-width: 100%; display: block; }
img { height: auto; }
figure { margin: 0; }
a { color: inherit; }
::selection { background: var(--bronze); color: #fff; }
:focus-visible { outline: 2px solid var(--bronze-ink); outline-offset: 3px; }
.hero :focus-visible, .foot :focus-visible { outline-color: var(--bronze); }

.u-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .8rem 1.1rem; font-size: .85rem;
}
.u-skip:focus { left: 0; }
.u-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- type ---------- */

.label {
  text-wrap: balance;
  font-size: .75rem; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: var(--bronze-ink); margin: 0;
}

.h1, .h2 {
  font-family: var(--display); font-weight: 400;
  letter-spacing: -.005em; text-wrap: balance; margin: 0;
}
.h1 { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.2rem); line-height: 1.06; }
.h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); line-height: 1.12; }

.lede {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  line-height: 1.58; color: var(--ink-soft); max-width: 46ch; margin: 0;
}

.prose p { margin: 0 0 1.15rem; max-width: 62ch; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }

/* the closing line is the point of the section — give it a beat and full ink */
.prose__close {
  margin-top: 1.8rem !important;
  font-size: 1.12em;
  line-height: 1.55;
  color: var(--ink) !important;
}

/* ---------- button ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none;
  padding: 1rem 1.6rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.btn:hover { background: var(--bronze-ink); border-color: var(--bronze-ink); color: #fff; }
.btn--onphoto { background: transparent; border-color: rgba(255,255,255,.65); color: #fff; }
.btn--onphoto:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn--sm { padding: .8rem 1.15rem; }

/* ---------- masthead ---------- */

.masthead {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background .3s ease, box-shadow .3s ease;
}
.masthead__in {
  max-width: var(--max); margin: 0 auto;
  padding: 1rem var(--pad-x);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
}
.masthead.is-stuck { background: var(--paper); box-shadow: 0 1px 0 var(--rule); }
.masthead.is-stuck .masthead__in { padding-top: .6rem; padding-bottom: .6rem; }

.mark { display: flex; align-items: center; gap: .8rem; margin-right: auto; text-decoration: none; color: #fff; }
.masthead.is-stuck .mark { color: var(--ink); }
.mark__logo { height: 46px; width: auto; flex: none; transition: height .3s ease; }
.masthead.is-stuck .mark__logo { height: 38px; }
.mark__logo .jsf-bronze { fill: var(--bronze); }
.mark__logo .jsf-bronze-s { stroke: var(--bronze); }

.nav { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.8rem); }
.nav__link {
  font-size: .78rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: #fff;
  padding: .7rem 0; border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.masthead.is-stuck .nav__link { color: var(--ink); }
.nav__link:hover { border-bottom-color: var(--bronze); }
@media (max-width: 700px) { .nav__link[data-optional] { display: none; } }
@media (max-width: 460px) { .nav__link { display: none; } .mark__logo { height: 42px; } }

/* ---------- hero ---------- */

.hero {
  position: relative; min-height: min(92svh, 56rem);
  display: flex; align-items: flex-end; background: var(--night); overflow: hidden;
}
.hero picture { position: absolute; inset: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
@media (max-width: 759px) {
  .hero__img { object-position: 50% 42%; }
  .hero::after {
    background: linear-gradient(180deg, rgba(20,18,16,.6) 0%, rgba(20,18,16,.2) 22%,
      rgba(20,18,16,.42) 55%, rgba(20,18,16,.72) 78%, rgba(20,18,16,.86) 100%);
  }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,18,16,.72) 0%, rgba(20,18,16,.42) 34%, rgba(20,18,16,.05) 62%, transparent 78%),
    linear-gradient(180deg, rgba(20,18,16,.72) 0%, rgba(20,18,16,.34) 14%, rgba(20,18,16,.18) 34%, rgba(20,18,16,.46) 62%, rgba(20,18,16,.82) 100%);
}
.hero__in {
  position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 0 var(--pad-x) clamp(3rem, 7vw, 5rem);
  color: #fff; display: grid; gap: 1.5rem;
}
.hero .h1 { color: #fff; }

/* the name set as a wordmark across the hero, in the logo's face */
.hero__wordmark {
  font-family: "Bodoni Moda", Didot, "Bodoni 72", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: .055em;
  line-height: .95;
  white-space: nowrap;
  font-size: clamp(2.1rem, 12vw, 13rem);
  margin-left: -.03em;   /* optical: pull the J's stem to the text edge */
}
.hero__cta { margin-top: 1.6rem; }

/* ---------- sections ---------- */

.sheet { padding: var(--sec-y) 0; }
.sheet--hi { background: var(--paper-hi); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }
.head { display: grid; gap: 1rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }

/* ---------- work ---------- */

.gallery { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(6, 1fr); } }

.shot { min-width: 0; }
.shot__img { width: 100%; object-fit: cover; background: var(--paper-hi); }

@media (min-width: 760px) {
  .shot--wide { grid-column: span 6; }
  .shot--wide .shot__img { aspect-ratio: 16 / 9; }
  .shot--half { grid-column: span 3; }
  .shot--half .shot__img { aspect-ratio: 4 / 3; }
  .shot--third { grid-column: span 2; }
  .shot--third .shot__img { aspect-ratio: 4 / 5; }
  /* the last tile sits centred rather than stranded at the left of the row.
     Must set both lines: grid-column-start alone leaves the end line auto,
     which collapses the tile to a single column. */
  .shot--solo { grid-column: 3 / span 2; }
}
@media (max-width: 759px) { .shot__img { aspect-ratio: 4 / 3; } }

/* ---------- who we are ---------- */

.about { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); } }
.about__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* mission and vision — a matched pair under the story */
.creed { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 800px) { .creed { grid-template-columns: 1fr 1fr; } }
.creed__item { border-top: 2px solid var(--ink); padding-top: 1.1rem; display: grid; gap: .8rem; }
.creed__item p:last-child { margin: 0; color: var(--ink-soft); max-width: 46ch; }

/* core values — five, so the grid settles to three then two */
.values { margin-top: clamp(3rem, 6vw, 5rem); }
.values__grid {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  margin-top: 1.6rem;
}
/* four values with longer copy: pair them rather than run three up */
@media (min-width: 780px) { .values__grid { grid-template-columns: 1fr 1fr; } }
.value { display: grid; gap: .55rem; align-content: start; border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.value__name {
  font-family: var(--display); font-weight: 400;
  font-size: 1.18rem; line-height: 1.2; margin: 0;
}
.value p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- contact ---------- */

.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }

.field { display: grid; gap: .45rem; margin-bottom: 1.3rem; }
.field__label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: .85rem 0; border-radius: 0; width: 100%; transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--ink-soft); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--bronze-ink); }
.field--split { display: grid; gap: 1.3rem; }
@media (min-width: 620px) { .field--split { grid-template-columns: 1fr 1fr; } }

.send { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; margin-top: 1.5rem; }
.send__note { font-size: .85rem; color: var(--ink-soft); max-width: 34ch; margin: 0; }

.card { border-top: 2px solid var(--ink); padding-top: 1.3rem; display: grid; gap: 1.5rem; align-content: start; }
.card__row { display: grid; gap: .25rem; }
.card__val { font-size: 1.05rem; }
.card__val a { display: inline-block; padding: .35rem 0; text-decoration: none; border-bottom: 1px solid var(--rule); }
.card__val a:hover { color: var(--bronze-ink); border-bottom-color: var(--bronze-ink); }

/* ---------- footer ---------- */

.foot { background: var(--night); color: rgba(235,231,224,.72); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.foot__in {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; align-items: center; justify-content: space-between;
}
.foot__logo { height: 150px; width: auto; color: #fff; }
.foot__logo .jsf-bronze { fill: var(--bronze); }
.foot__logo .jsf-bronze-s { stroke: var(--bronze); }
.foot__meta { display: grid; gap: .3rem; font-size: .85rem; }
.foot__copy { font-size: .85rem; white-space: nowrap; }
.foot__meta a { text-decoration: none; }
.foot__meta a:hover { color: var(--bronze); }

/* ---------- motion ---------- */

.rise { opacity: 0; transform: translateY(16px); }
.rise.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .rise { opacity: 1; transform: none; }
}
