/* ==========================================================
   YALE PROJECTS & CO. — style.css
   1. Tokens  2. Base  3. Header  4. Hero  5. Sections
   6. Contact  7. Footer  8. Motion  9. Responsive
   ========================================================== */

/* 1. TOKENS ------------------------------------------------ */
:root {
  --bg: #050505;
  --bg-2: #101010;
  --white: #ffffff;
  --grey: #F3F4F2;
  --muted: #A6AAA7;
  --muted-dark: #565b58;
  --ink: #0a0a0a;
  --green: #06CC1E;        /* sampled from the supplied logo */
  --green-ink: #0A7A18;    /* darker green for text on light backgrounds (contrast) */
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(5, 5, 5, 0.14);

  --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 9vw, 130px);
  --radius: 18px;

  /* IMAGES — all photos live in /assets. Swap a file (same name) to change a picture.
     The drawn skyline is only a fallback if a photo file is missing. */
  --img-hero: url("../assets/hero.jpg"), url("../assets/architecture-fallback.svg");
  --img-about: url("../assets/about.jpg"), url("../assets/architecture-fallback.svg");
}

/* 2. BASE -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 110px; }
body { margin: 0; font-family: var(--font-body); line-height: 1.7; color: var(--ink); background: var(--white); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.section--light :focus-visible, .section--white :focus-visible { outline-color: var(--green-ink); }

.container { width: min(100% - 2 * var(--pad), var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--green); color: #04130a; padding: 10px 18px; border-radius: 8px; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 12px; }
.ico { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 28px; border: 1.5px solid transparent; border-radius: 999px; font: 700 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s; }
.btn--green { background: var(--green); color: #04130a; }
.btn--green:hover { background: #fff; transform: translateY(-2px); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--sm { min-height: 44px; padding: 11px 22px; font-size: .88rem; }

.label { font: 700 .75rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 18px; }
.section--dark .label { color: var(--green); }
h2 { font: 800 clamp(1.9rem, 4.2vw, 3.5rem)/1.05 var(--font-head); letter-spacing: -.015em; text-transform: uppercase; text-wrap: balance; }
h3 { font-family: var(--font-head); font-weight: 700; }
.lead { font-size: 1.08rem; max-width: 52ch; }
.section--dark .lead { color: var(--muted); }

.section { padding-block: var(--section); }
.section--dark { background: var(--bg); color: #fff; }
.section--light { background: var(--grey); }
.section--white { background: #fff; }
/* Sections with a photo background: image (::before) + dark shade (::after) keep text readable */
.section--photo { position: relative; isolation: isolate; }
.section--photo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bg) var(--photo) center / cover no-repeat; }
.section--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--shade); }
#focus { --photo: url("../assets/focus-bg.jpg"); --shade: linear-gradient(180deg, rgba(5,5,5,.86), rgba(5,5,5,.78)); }
#mission-vision { --photo: url("../assets/direction-bg.jpg"); --shade: linear-gradient(180deg, rgba(5,5,5,.72), rgba(5,5,5,.5) 45%, rgba(5,5,5,.78)); }
#contact { --photo: url("../assets/contact-bg.jpg"); --shade: linear-gradient(180deg, rgba(5,5,5,.88), rgba(5,5,5,.74)); }
.head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 880px; }
.split-head { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: end; margin-bottom: clamp(40px, 6vw, 64px); }

/* 3. HEADER ------------------------------------------------ */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; padding-top: 12px; background: linear-gradient(rgba(5,5,5,.55), rgba(5,5,5,0)); transition: background .3s, backdrop-filter .3s, padding .3s; }
.site-header.is-scrolled { background: rgba(5, 5, 5, .93); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-bottom: 10px; padding-top: 6px; }
.topbar { display: flex; justify-content: space-between; gap: 12px; padding: 0 22px 8px; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.topbar a { text-decoration: none; transition: color .2s; }
.topbar a:hover { color: var(--green); }
.nav { position: relative; display: flex; align-items: center; gap: 16px; padding: 8px 10px 8px 22px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 5, 5, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .3s; }
.is-scrolled .nav { background: #0a0a0a; }
.brand img { height: 36px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-menu a:not(.btn) { display: block; padding: 9px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: rgba(255, 255, 255, .82); text-decoration: none; transition: background .2s, color .2s; }
.nav-menu a:not(.btn):hover, .nav-menu a[aria-current="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-menu__mage { display: none; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, background .25s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 4. HERO -------------------------------------------------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh; margin: 12px; border-radius: 28px; overflow: hidden; background: #0b0d0c; color: #fff; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; background-color: #0b0d0c; background-image: var(--img-hero); background-position: center 62%; background-size: cover; background-repeat: no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,5,5,.6) 0%, rgba(5,5,5,.35) 38%, rgba(5,5,5,.9) 100%); }
.hero__inner { padding-block: 190px 36px; }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 22px; }
.eyebrow__line { width: 48px; height: 3px; background: var(--green); border-radius: 2px; }
.hero h1 { max-width: 15ch; font: 800 clamp(2.4rem, 7.2vw, 6.4rem)/.96 var(--font-head); letter-spacing: -.025em; text-transform: uppercase; text-wrap: balance; }
.hero__text { max-width: 58ch; margin-top: 28px; font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, .86); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: clamp(40px, 7vh, 80px); padding-top: 22px; border-top: 1px solid var(--line); font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.scroll-cue { display: grid; place-items: center; width: 28px; height: 46px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 16px; }
.scroll-cue span { width: 4px; height: 9px; border-radius: 2px; background: var(--green); animation: cue 1.8s ease-in-out infinite; }

/* Intro strip */
.intro { padding-block: clamp(56px, 7vw, 96px) clamp(20px, 3vw, 40px); background: #fff; }
.intro__statement { max-width: 28ch; margin: 0 auto; text-align: center; font: 700 clamp(1.4rem, 3vw, 2.3rem)/1.25 var(--font-head); text-wrap: balance; }
.intro__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.intro__list li { padding-top: 16px; border-top: 2px solid var(--ink); font-size: .88rem; font-weight: 700; letter-spacing: .02em; }
.intro__list li:first-child { border-top-color: var(--green); }

/* 5. SECTIONS ---------------------------------------------- */
/* About */
.about { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about__copy h2 { margin-bottom: 28px; }
.about__copy p + p { margin-top: 1.1em; }
.about__copy p:not(.label) { color: #2a2d2b; max-width: 62ch; }
.about__media { position: relative; }
.about__media::before { content: ""; position: absolute; top: -16px; right: -16px; width: 55%; height: 45%; border-top: 3px solid var(--green); border-right: 3px solid var(--green); border-radius: 0 var(--radius) 0 0; }
.about__frame { position: relative; overflow: hidden; height: clamp(380px, 46vw, 600px); border-radius: var(--radius); background: #101010; }
.about__img { width: 100%; height: 100%; background-color: #101010; background-image: var(--img-about); background-position: center; background-size: cover; background-repeat: no-repeat; transition: transform .9s ease; }
.about__frame:hover .about__img { transform: scale(1.05); }
.sector-card { position: absolute; left: -28px; bottom: -28px; width: min(360px, 82%); padding: 28px; border-radius: 14px; background-color: var(--bg); background-image: linear-gradient(180deg, rgba(5,5,5,.62), rgba(5,5,5,.86)), url("../assets/sector-bg.jpg"); background-size: cover; background-position: center; color: #fff; border-left: 3px solid var(--green); box-shadow: 0 24px 50px rgba(0, 0, 0, .25); }
.sector-card .label { color: var(--green); margin-bottom: 10px; }
.sector-card h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 10px; }
.sector-card p:last-child { font-size: .9rem; color: #d3d6d3; }

/* Focus cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; padding: 30px 26px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 16, 16, .92); transition: transform .3s, border-color .3s; }
.card:hover { transform: translateY(-5px); border-color: var(--green); }
.card .ico { width: 34px; height: 34px; color: var(--green); }
.card__num { margin: 26px 0 8px; font: 700 .8rem/1 var(--font-body); letter-spacing: .12em; color: var(--muted); }
.card h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 14px; }
.card p:last-child { font-size: .92rem; color: var(--muted); }

/* Approach */
.approach { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); }
.approach__col { padding: 36px 36px 8px 0; }
.approach__col + .approach__col { padding-left: 36px; border-left: 1px solid var(--line-dark); }
.approach__col::before { content: ""; display: block; width: 40px; height: 3px; margin-bottom: 26px; background: var(--green); }
.approach__col h3 { font-size: 1.35rem; line-height: 1.2; margin-bottom: 14px; }
.approach__col p { color: var(--muted-dark); max-width: 38ch; }

/* Mission & Vision */
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mv__panel { display: flex; flex-direction: column; min-height: 380px; padding: clamp(28px, 4vw, 56px); border-radius: var(--radius); }
.mv__panel--mission { background: rgba(10, 10, 10, .74); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.mv__panel--vision { background: #fff; color: var(--ink); }
.mv__panel .ico { width: 40px; height: 40px; margin-bottom: auto; padding-bottom: 36px; box-sizing: content-box; color: var(--green); }
.mv__panel--vision .ico { color: var(--green-ink); }
.mv__panel h3 { font: 800 clamp(2rem, 3.6vw, 3rem)/1 var(--font-head); text-transform: uppercase; }
.mv__line { width: 56px; height: 4px; margin: 20px 0; background: var(--green); border-radius: 2px; }
.mv__panel p { font-size: 1.08rem; max-width: 44ch; }
.mv__panel--mission p { color: #d6d9d6; }
.mv__panel--vision p { color: #2a2d2b; }

/* Principles */
.principles { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.principles > div:first-child { position: sticky; top: 130px; }
.principles__list li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 28px 0; border-top: 1px solid var(--line-dark); transition: padding-left .3s; }
.principles__list li:last-child { border-bottom: 1px solid var(--line-dark); }
.principles__list li:hover { padding-left: 10px; }
.principles__num { font: 800 1.05rem/1.6 var(--font-head); color: var(--green-ink); }
.principles__list h3 { font-size: 1.3rem; margin-bottom: 4px; }
.principles__list p { color: var(--muted-dark); }

/* 6. CONTACT ----------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact h2 { margin-bottom: 24px; }
.contact .btn { margin-top: 32px; }
.form { padding: clamp(24px, 3.5vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 10, 10, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.form h3 { font-size: 1.3rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: #0a0a0a; color: #fff; font: inherit; color-scheme: dark; transition: border-color .2s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #ff8a80; }
.field__error { min-height: 0; margin-top: 6px; font-size: .82rem; font-weight: 600; color: #ff9b92; }
.field__error:not(:empty)::before { content: "Error: "; }
.form .btn { width: 100%; margin-top: 6px; }
.form__status { margin-top: 14px; font-size: .88rem; color: var(--muted); }

/* 7. FOOTER ------------------------------------------------ */
.footer { position: relative; overflow: hidden; background: #000; color: #fff; padding-top: clamp(56px, 7vw, 96px); border-top: 3px solid var(--green); }
.footer__grid { display: grid; grid-template-columns: 1.5fr .7fr .9fr; gap: clamp(32px, 5vw, 80px); }
.footer__brand img { height: 56px; width: auto; margin-bottom: 22px; }
.footer__tagline { font: 700 1.15rem/1.35 var(--font-head); max-width: 26ch; margin-bottom: 14px; }
.footer p, .footer li { color: var(--muted); font-size: .92rem; }
.footer__brand p:last-child { max-width: 52ch; }
.footer__title { margin-bottom: 16px; font: 700 .75rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.footer li + li { margin-top: 8px; }
.footer a { text-decoration: none; transition: color .2s; }
.footer li a:hover, .footer__mage:hover { color: var(--green); }
.footer__mage { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .92rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: clamp(40px, 5vw, 64px); padding-block: 22px; border-top: 1px solid var(--line); }
.footer__bottom p { font-size: .82rem; }
.footer__mark { margin: -.12em 0 -.22em; text-align: center; font: 800 clamp(7rem, 26vw, 24rem)/1 var(--font-head); letter-spacing: -.04em; color: rgba(255, 255, 255, .05); user-select: none; pointer-events: none; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--green); color: #04130a; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s, background .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #fff; }

/* 8. MOTION ------------------------------------------------ */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0%, 100% { transform: translateY(-5px); opacity: .4; } 50% { transform: translateY(5px); opacity: 1; } }
.hero__inner > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__inner > :nth-child(2) { animation-delay: .12s; }
.hero__inner > :nth-child(3) { animation-delay: .24s; }
.hero__inner > :nth-child(4) { animation-delay: .36s; }
.hero__inner > :nth-child(5) { animation-delay: .48s; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* 9. RESPONSIVE -------------------------------------------- */
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: #0a0a0a; }
  .nav-menu.is-open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 16px; font-size: 1rem; }
  .nav-menu__mage { display: block; }
  .nav-menu .btn { width: 100%; margin-top: 8px; }
  .topbar { padding-inline: 8px; }
}
@media (max-width: 900px) {
  .about, .contact, .principles, .split-head, .mv { grid-template-columns: 1fr; }
  .split-head { gap: 20px; }
  .about__media { margin-bottom: 44px; }
  .sector-card { left: 16px; right: 16px; bottom: -44px; width: auto; }
  .principles > div:first-child { position: static; }
  .approach { grid-template-columns: 1fr; }
  .approach__col, .approach__col + .approach__col { padding: 32px 0 8px; border-left: 0; }
  .approach__col + .approach__col { border-top: 1px solid var(--line-dark); }
  .intro__list { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .mv__panel { min-height: 320px; }
}
@media (max-width: 640px) {
  .hero { margin: 8px; border-radius: 22px; }
  .hero__inner { padding-top: 160px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__foot { font-size: .7rem; }
  .cards { grid-template-columns: 1fr; }
  .principles__list li { grid-template-columns: 48px 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .brand img { height: 32px; }
  .topbar { font-size: .62rem; letter-spacing: .1em; }
}
@media (max-width: 360px) {
  .intro__list { grid-template-columns: 1fr; }
  .nav { padding-left: 16px; }
}
