/* =========================================================
   Tran + Thomas Design Studio
   Homepage styles
   ========================================================= */

:root {
  --black: #111111;
  --ink: #1c1c1c;
  --body: #3a3a3a;
  --muted: #8a8a86;
  --line: #d9d6d0;
  --bg: #ffffff;
  --bg-soft: #f6f4f1;
  --accent: #b59f7e; /* brass — buttons & rules */

  /* placeholder grey */
  --ph-bg: #e3e1dd;
  --ph-bg-2: #d6d3ce;
  --ph-label: #9a9690;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1200px;

  --font-display: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* ---------- Placeholder blocks (grey) ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--ph-bg) 0,
      var(--ph-bg) 22px,
      var(--ph-bg-2) 22px,
      var(--ph-bg-2) 44px
    );
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ph-label);
}

/* =========================================================
   MASTHEAD — switchable header (data-header on <html>)
   Header 1 = stacked/centered · Header 2 = horizontal
   ========================================================= */
.wordmark {
  text-decoration: none;
  color: var(--black);
  display: inline-block;
  line-height: 0;
}
.wordmark__img {
  height: auto;
  display: block;
}

.masthead { background: #fff; }
.masthead__nav ul { list-style: none; margin: 0; padding: 0; }
.masthead__nav > ul { display: flex; flex-wrap: wrap; align-items: center; }
.masthead__nav li { position: relative; }

/* nav links + dropdown trigger share one look */
.masthead__nav a,
.nav-dropdown-toggle {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  line-height: 1.2;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 4px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.masthead__nav a:hover,
.nav-dropdown-toggle:hover { border-color: var(--ink); }
.nav-dropdown-toggle::after { content: " \25BE"; font-size: 0.7em; }

.masthead__cta .btn { padding: 0.7rem 1.7rem; font-size: 0.72rem; }

/* ---------- Blog dropdown ---------- */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0;
  display: none;
  z-index: 60;
}
.has-dropdown.is-open .nav-dropdown { display: block; }
.nav-dropdown a,
.nav-dropdown .header-switch {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown a:hover,
.nav-dropdown .header-switch:hover { background: var(--bg-soft); }
.nav-dropdown .header-switch.is-active { color: var(--accent); }

/* ---------- Header style 1 — stacked / centered ---------- */
[data-header="1"] .masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 2.5rem var(--gutter) 1.75rem;
  text-align: center;
}
[data-header="1"] .masthead__logo .wordmark__img { width: clamp(240px, 34vw, 400px); }
[data-header="1"] .masthead__nav > ul { justify-content: center; gap: clamp(1.2rem, 3vw, 2.75rem); }
[data-header="1"] .masthead__cta { display: none; }

/* ---------- Condensed fixed bar — slides in on scroll (Header 1, desktop) ---------- */
.compact-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.5rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
[data-header="1"] .compact-bar { display: flex; }
[data-header="1"] .compact-bar.is-visible { transform: translateY(0); opacity: 1; }
.compact-bar__logo { line-height: 0; }
.compact-bar__logo .wordmark__img { width: clamp(119px, 13.6vw, 157px); }
.compact-bar__nav > ul { justify-content: flex-end; }
.compact-bar .nav-dropdown { left: auto; right: 0; transform: none; }

@media (max-width: 900px) {
  .compact-bar { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .compact-bar { transition: opacity 0.2s ease; }
}

/* ---------- Header style 2 — horizontal · logo left / nav center / CTA right ---------- */
[data-header="2"] .masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
[data-header="2"] .masthead__logo { justify-self: start; }
[data-header="2"] .masthead__logo .wordmark__img { width: clamp(150px, 20vw, 230px); }
[data-header="2"] .masthead__nav { justify-self: center; }
[data-header="2"] .masthead__nav > ul { gap: clamp(1rem, 2vw, 2rem); }
[data-header="2"] .masthead__nav a,
[data-header="2"] .nav-dropdown-toggle { font-size: 0.76rem; letter-spacing: 0.18em; }
[data-header="2"] .masthead__cta { justify-self: end; }
[data-header="2"] .masthead__nav .nav-contact { display: none; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px auto;
  background: var(--black);
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: clamp(440px, 74vh, 840px);
  overflow: hidden;
  background: var(--black);
}
.hero__track { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* arrows */
.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--black);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}
.hero__nav:hover { background: #fff; }
.hero__nav--prev { left: clamp(0.75rem, 3vw, 2.25rem); }
.hero__nav--next { right: clamp(0.75rem, 3vw, 2.25rem); }

/* dots */
.hero__dots {
  position: absolute;
  bottom: clamp(1rem, 3vw, 1.75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  max-width: 80%;
}
.hero__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease;
}
.hero__dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero__dot.is-active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
}

/* =========================================================
   INTRO
   ========================================================= */
.intro {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.intro__title {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: var(--black);
  margin: 0 0 1.5rem;
}
.intro__lead {
  margin: 0;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--body);
}

/* =========================================================
   CONTENT BLOCKS
   ========================================================= */
.block {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.block__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  object-fit: cover;
}
.block__body { max-width: none; }
.block__title {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: 0.16em;
  line-height: 1.25;
  color: var(--black);
  margin: 0 0 1.25rem;
}
.block__body p { margin: 0 0 2rem; }

/* ---------- Outline button ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: var(--ink);
  border: 1px solid var(--accent);
  padding: 1rem 2.5rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* =========================================================
   FEATURED PROJECTS
   ========================================================= */
.featured { background: var(--bg-soft); }
.featured__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}
.featured__head {
  text-align: center;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.featured__eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.featured__title {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: var(--black);
  margin: 0;
}

.featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}
.featured__cta {
  text-align: center;
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

.project {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.project__media {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* base gradient so the caption stays legible */
.project__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(17, 17, 17, 0.62) 0%,
    rgba(17, 17, 17, 0.12) 45%,
    rgba(17, 17, 17, 0) 70%
  );
  transition: background 0.45s ease;
}
.project__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: clamp(1.25rem, 3vw, 1.85rem);
}
.project__cat {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: #fff;
  background: rgba(181, 159, 126, 0.85);
  padding: 0.35em 0.7em 0.35em 0.85em;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}
.project__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.project__cta span { color: var(--accent); }

/* hover / focus */
.project:hover .project__media,
.project:focus-visible .project__media { transform: scale(1.06); }
.project:hover .project__veil,
.project:focus-visible .project__veil {
  background: linear-gradient(
    to top,
    rgba(17, 17, 17, 0.78) 0%,
    rgba(17, 17, 17, 0.42) 50%,
    rgba(17, 17, 17, 0.28) 100%
  );
}
.project:hover .project__cta,
.project:focus-visible .project__cta { opacity: 1; transform: none; }
.project:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .project__media,
  .project__veil,
  .project__cta { transition: none; }
}

/* =========================================================
   TESTIMONIAL
   ========================================================= */
.testimonial {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
  text-align: center;
}
.testimonial__quote {
  margin: 0 0 1.5rem;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.7;
  color: var(--ink);
}
.testimonial__cite {
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
.footer__brand {
  display: flex;
  justify-content: center;
  color: var(--black);
}
.footer__logo {
  width: clamp(190px, 30vw, 250px);
  height: auto;
  display: block;
}

.footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.footer__nav a {
  font-family: var(--font-display);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.footer__nav a:hover { color: var(--black); text-decoration: underline; }

.footer__meta {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}

/* =========================================================
   SITEMAP
   ========================================================= */
.sitemap {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}
.sitemap__head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.sitemap__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 1rem;
}
.sitemap__title {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
  color: var(--black);
  margin: 0;
}
.sitemap__group-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: clamp(2rem, 5vw, 3rem) 0 0.5rem;
}
.sitemap__list { list-style: none; margin: 0; padding: 0; }
.sitemap__list li { border-bottom: 1px solid var(--line); }
.sitemap__list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.sitemap__list a:hover { color: var(--accent); }
.sitemap__list .path {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .hero { height: clamp(360px, 60vh, 560px); }
  .hero__nav { width: 44px; height: 44px; font-size: 1.3rem; }

  .block {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: left;
  }
  .block__body { max-width: none; }

  .featured__grid { grid-template-columns: 1fr; }
}

/* Masthead collapse — both header styles share one mobile layout */
@media (max-width: 900px) {
  [data-header="1"] .masthead,
  [data-header="2"] .masthead {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    position: relative !important;
    padding: 1.5rem var(--gutter) !important;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  [data-header="1"] .masthead__logo .wordmark__img,
  [data-header="2"] .masthead__logo .wordmark__img { width: clamp(210px, 62vw, 300px); }

  .nav-toggle { display: block; position: absolute; top: 1.1rem; right: 0.6rem; }
  .masthead__cta { display: none !important; }

  .masthead__nav {
    flex-basis: 100%;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .masthead__nav.is-open { max-height: 820px; }
  .masthead__nav > ul {
    flex-direction: column;
    align-items: center;
    gap: 1.1rem !important;
    padding: 1.25rem 0 0 !important;
  }
  [data-header="2"] .masthead__nav .nav-contact { display: block; }

  /* dropdown inline within the mobile menu */
  .has-dropdown { width: 100%; text-align: center; }
  .nav-dropdown {
    position: static;
    transform: none;
    display: block;
    border: 0;
    box-shadow: none;
    min-width: 0;
    margin: 0.4rem 0 0;
    padding: 0.25rem 0 0;
    background: transparent;
  }
  .nav-dropdown a,
  .nav-dropdown .header-switch {
    text-align: center;
    color: var(--muted);
    padding: 0.4rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero__dots { gap: 0.4rem; }
  .hero__dot { width: 7px; height: 7px; }
}
