/* ============================================================
   Tijac — landing page styles
   Direction: "Quiet Authority" (option 1C)
   ============================================================ */

:root {
  --cream:   #faf7f1;
  --ink:     #232019;
  --muted:   #5f584d;
  --muted-2: #7a7266;
  --red:     #b01319;
  --coral:   #e0625f;
  --white:   #ffffff;

  --rule:    rgba(35,32,25,.16);
  --rule-2:  rgba(35,32,25,.10);
  --rule-3:  rgba(35,32,25,.12);

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --pad:  64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

/* ---------- layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  margin: 0 0 34px;
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.eyebrow-coral { color: var(--coral); }

.rule {
  width: 64px;
  height: 2px;
  background: var(--red);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  padding-bottom: 30px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand img { height: 40px; width: auto; display: block; }
.brand span {
  font-size: 22px;
  letter-spacing: .34em;
  color: var(--ink);
  font-weight: 600;
}
.nav { display: flex; gap: 36px; }
.nav a {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}
.nav a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  padding-top: 104px;
  padding-bottom: 96px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 40px;
  max-width: 900px;
  text-wrap: balance;
}
.hero .rule { margin-bottom: 34px; }
.hero-lead {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.68;
  color: var(--muted);
  margin: 0;
  max-width: 600px;
}

/* ---------- hero image ---------- */
.hero-media { padding-bottom: 96px; }
.hero-media img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}
.hero-media-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted-2);
}
.accent { color: var(--red); font-weight: 600; }

/* ---------- about ---------- */
.about { padding-bottom: 96px; }
.about-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 2.7vw, 27px);
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 30px;
  max-width: 820px;
}
.about-body {
  font-size: 16px;
  line-height: 1.74;
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

/* ---------- capabilities ---------- */
.capabilities { padding-bottom: 96px; }
.caps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cap {
  padding: 32px 24px;
  border-left: 1px solid var(--rule-2);
}
.cap:first-child { border-left: none; padding-left: 0; }
.cap-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 30px;
  color: var(--red);
  margin-bottom: 14px;
}
.cap-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.cap-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* ---------- projects ---------- */
.projects { padding-bottom: 96px; }
.projects-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}
.projects-head h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  margin: 0;
}
.projects-meta {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.project {
  display: grid;
  grid-template-columns: 64px 116px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.project:last-child { border-bottom: 1px solid var(--rule); }
.project-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 32px;
  color: var(--red);
}
.project-thumb {
  width: 116px;
  height: 74px;
  object-fit: cover;
  display: block;
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 5px;
}
.project-addr {
  display: inline-block;
  font-size: 13px;
  color: var(--muted-2);
  text-decoration: none;
  transition: color .2s ease;
}
a.project-addr:hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.project-spec {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: right;
}

/* ---------- castlemaine ---------- */
.castlemaine { padding-bottom: 100px; }
.castlemaine-box {
  border: 1px solid rgba(176,19,25,.4);
  background: var(--white);
  padding: 64px 60px;
}
.castlemaine-box h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.14;
  margin: 0 0 22px;
  max-width: 760px;
  text-wrap: balance;
}
.castlemaine-lead {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.66;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 640px;
}
.castlemaine-stats {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.stat-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
}

/* ---------- contact (full-bleed dark) ---------- */
.contact {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 0;
}
.contact-inner { text-align: center; }
.contact-crest {
  height: 60px;
  width: auto;
  display: block;
  margin: 0 auto 24px;
}
.contact .eyebrow { margin-bottom: 18px; }
.contact h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.1;
  margin: 0 0 6px;
  color: var(--white);
}
.contact-role {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(250,247,241,.6);
  font-weight: 500;
  margin: 0 0 28px;
}
.contact-details {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.contact-details a { text-decoration: none; }
.contact-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(250,247,241,.5);
  margin-bottom: 10px;
}
.contact-value {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--white);
  transition: color .2s ease;
}
.contact-details a:hover .contact-value { color: var(--coral); }
.contact-divider {
  width: 56px;
  height: 1px;
  background: rgba(250,247,241,.3);
  margin: 0 auto 18px;
}
.contact-note {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(250,247,241,.55);
  margin: 0;
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
  padding-bottom: 30px;
  color: var(--muted-2);
  border-top: 1px solid var(--rule-3);
}
.footer-brand {
  font-size: 13px;
  letter-spacing: .28em;
  color: var(--ink);
  font-weight: 600;
}
.footer-meta {
  font-size: 12px;
  letter-spacing: .06em;
  text-align: right;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- tablet --- */
@media (max-width: 900px) {
  :root { --pad: 40px; }

  .caps { grid-template-columns: repeat(3, 1fr); }
  .cap { border-top: 1px solid var(--rule-2); }
  .cap:nth-child(-n+3) { border-top: none; }
  .cap:nth-child(3n+1) { border-left: none; padding-left: 0; }
  .cap:first-child { padding-left: 0; }

  .hero-media img { height: 380px; }
}

/* --- large mobile --- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    right: var(--pad);
    left: var(--pad);
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--rule);
    box-shadow: 0 24px 48px -24px rgba(35,32,25,.5);
    padding: 6px 0;
    display: none;
    z-index: 30;
  }
  .nav.open { display: flex; }
  .nav a { padding: 15px 24px; }

  .hero { padding-top: 64px; padding-bottom: 64px; }
  .hero h1 { margin-bottom: 30px; }
  .hero-media { padding-bottom: 64px; }
  .hero-media img { height: 300px; }
  .about { padding-bottom: 64px; }
  .capabilities { padding-bottom: 64px; }
  .projects { padding-bottom: 64px; }
  .castlemaine { padding-bottom: 72px; }

  .projects-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* project rows → stacked editorial cards */
  .project {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 0;
  }
  .project-num { font-size: 26px; }
  .project-thumb { width: 100%; height: 190px; }
  .project-spec { text-align: left; }

  .castlemaine-box { padding: 40px 28px; }
  .castlemaine-stats { gap: 28px; }

  .contact { padding: 56px 0; }
  .contact-crest { height: 54px; }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer-meta { text-align: left; }
}

/* --- small mobile --- */
@media (max-width: 520px) {
  :root { --pad: 22px; }

  .caps { grid-template-columns: repeat(2, 1fr); }
  .cap { border-top: 1px solid var(--rule-2); border-left: 1px solid var(--rule-2); padding: 26px 20px; }
  .cap:nth-child(-n+2) { border-top: none; }
  .cap:nth-child(2n+1) { border-left: none; padding-left: 0; }

  .castlemaine-stats { gap: 22px; flex-direction: column; }
}
