/* Tres IQS Consultancy — site styles
 * Editorial, consultancy look: warm paper background, deep navy, serif headlines
 * with a light-blue accent word, white pill navigation, large rounded image panels. */

:root {
  --paper: #f1eee8;
  --paper-deep: #e7e2d8;
  --white: #ffffff;
  --navy: #1f3a68;
  --navy-deep: #13264a;
  --ink: #1b2a44;
  --muted: #56627a;
  --accent: #4b8fd6;
  --line: rgba(31, 58, 104, 0.18);
  --sage: #a8c18f;
  --sky: #98c0e6;
  --slate: #aebccb;
  --sand: #dccdb2;

  --serif: 'Newsreader', 'Georgia', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.eyebrow {
  font: 600 13px/1.2 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 20px;
}
.display {
  font: 400 clamp(44px, 7vw, 84px)/1.02 var(--serif);
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0;
}
.display em, .h2 em, .card-title em { font-style: italic; }
.accent { color: var(--accent); }
.h2 {
  font: 400 clamp(32px, 4.2vw, 52px)/1.08 var(--serif);
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0;
}
.lede {
  font: 400 clamp(20px, 2.1vw, 27px)/1.35 var(--serif);
  color: var(--navy);
  margin: 0 0 24px;
}
.body-muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 8px;
  font: 500 17px/1 var(--sans);
  text-decoration: none;
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn--solid { background: var(--navy); color: var(--white); }
.btn--solid:hover { background: var(--navy-deep); }
.btn--white { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--paper); border-color: var(--paper); color: var(--navy); }

.circle-arrow {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.circle-arrow svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto; z-index: 50; padding-top: 28px; }
.site-header.is-solid { position: relative; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: stretch; gap: 4px; text-decoration: none; }
.logo-mark {
  width: 46px;
  background: var(--navy);
  display: grid;
  place-items: center;
  padding: 11px 0;
}
.logo-mark span { display: block; width: 20px; height: 3px; background: var(--white); margin: 3px 0; }
.logo-mark span:nth-child(2) { width: 14px; margin-left: 6px; }
.logo-word {
  background: var(--navy);
  color: var(--white);
  font: 400 26px/1 var(--serif);
  padding: 11px 16px 12px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-word small { font: 500 11px/1 var(--sans); letter-spacing: 0.12em; opacity: 0.75; margin-left: 8px; text-transform: uppercase; }
.on-image .logo-mark, .on-image .logo-word { background: var(--white); color: var(--navy); }
.on-image .logo-mark span { background: var(--navy); }

.nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border-radius: 10px;
  padding: 8px 10px 8px 22px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.nav-pill a.nav-link {
  position: relative;
  padding: 12px 12px;
  font: 400 15px/1 var(--sans);
  color: var(--navy);
  text-decoration: none;
}
.nav-pill a.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -8px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-pill a.nav-link:hover::after,
.nav-pill a.nav-link[aria-current='page']::after { transform: scaleX(1); }
.nav-pill .menu-btn {
  margin-left: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 8px;
}
.nav-pill .menu-btn:hover { background: var(--paper); }
.nav-pill .menu-btn svg { width: 26px; height: 26px; }
.on-image .nav-pill { background: rgba(19, 38, 74, 0.55); backdrop-filter: blur(10px); }
.on-image .nav-pill a.nav-link, .on-image .nav-pill .menu-btn { color: var(--white); }
.on-image .nav-pill .menu-btn:hover { background: rgba(255, 255, 255, 0.1); }

.breadcrumb { margin-top: 24px; font-size: 14px; color: var(--navy); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb svg { width: 14px; height: 14px; }

/* Full-screen navy menu (mobile + "more" menu) */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 28px var(--gutter) 48px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.menu-panel.is-open { opacity: 1; visibility: visible; }
.menu-panel .panel-top { display: flex; justify-content: space-between; align-items: center; }
.menu-panel .close-btn { width: 48px; height: 48px; border: 1.5px solid rgba(255,255,255,0.5); border-radius: 50%; background: transparent; color: var(--white); cursor: pointer; display: grid; place-items: center; }
.menu-panel .close-btn svg { width: 22px; height: 22px; }
.menu-panel nav { margin-top: 56px; display: grid; gap: 40px; max-width: var(--wrap); }
.menu-panel .panel-link { display: inline-flex; align-items: center; gap: 16px; color: var(--white); text-decoration: none; font: 400 clamp(30px, 4vw, 44px)/1.1 var(--serif); }
.menu-panel .panel-link .circle-arrow { width: 38px; height: 38px; }
.menu-panel .panel-sub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 32px; margin-top: 18px; }
.menu-panel .panel-sub a { display: flex; gap: 10px; align-items: baseline; color: rgba(255,255,255,0.92); text-decoration: none; font-size: 16px; }
.menu-panel .panel-sub a:hover { color: var(--sky); }
.menu-panel .panel-sub svg { width: 12px; height: 12px; flex: none; }
.menu-panel .panel-foot { margin-top: 64px; color: rgba(255,255,255,0.7); font-size: 14px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 980px);
  color: var(--white);
  display: flex;
  align-items: flex-end;
  padding: 180px 0 64px;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 40, 0.78) 0%, rgba(10, 20, 40, 0.45) 55%, rgba(10, 20, 40, 0.25) 100%),
    linear-gradient(0deg, rgba(10, 20, 40, 0.55), transparent 45%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 48px; }
.hero .display { color: var(--white); }
.hero .display .accent { color: #8cc0f3; }
.hero-copy { max-width: 620px; font: 400 clamp(19px, 1.9vw, 24px)/1.4 var(--serif); margin: 0 0 32px; }
.hero-bottom { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: end; }
.hero-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.glass-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 20px 22px;
  border-radius: 12px;
  background: rgba(20, 30, 50, 0.55);
  backdrop-filter: blur(12px);
  color: var(--white);
  text-decoration: none;
  font: 400 26px/1.1 var(--serif);
  transition: background 0.2s;
}
.glass-card:hover { background: rgba(20, 30, 50, 0.72); }
.glass-card .circle-arrow { align-self: flex-end; }

/* ---------- Page intro (two columns) ---------- */
.page-intro { padding: 120px 0 72px; }
.intro-grid { display: grid; gap: 40px; }
.intro-grid .lede:last-child { margin-bottom: 0; }

.jump { border-top: 1px solid var(--navy); padding-top: 22px; margin-top: 32px; }
.jump ul { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.jump a { display: inline-flex; gap: 12px; align-items: center; color: var(--navy); text-decoration: none; font-size: 18px; }
.jump a:hover { text-decoration: underline; text-underline-offset: 4px; }
.jump svg { width: 18px; height: 18px; }

/* ---------- Media panel ---------- */
.media-panel { border-radius: var(--radius); overflow: hidden; background: var(--paper-deep); aspect-ratio: 16 / 8; }
.media-panel img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--white { background: var(--white); }
.section--navy { background: linear-gradient(180deg, var(--navy-deep), var(--navy)); color: var(--white); }
.section--navy .eyebrow, .section--navy .h2 { color: var(--white); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 44px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stat { background: var(--paper); padding: 34px 24px 30px 0; }
.stat b { display: block; font: 400 clamp(46px, 5vw, 64px)/1 var(--serif); color: var(--navy); letter-spacing: -0.02em; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 220px; }

/* Project cards (pastel, like editorial case-study cards) */
.cards { display: grid; gap: 22px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  padding: 26px 26px 24px;
  border-radius: var(--radius);
  background: var(--sky);
  color: var(--navy);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(19, 38, 74, 0.6); }
.card--sage { background: var(--sage); }
.card--sky { background: var(--sky); }
.card--slate { background: var(--slate); }
.card--sand { background: var(--sand); }
.card .card-loc { font: 600 13px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 14px; }
.card-title { font: 400 clamp(26px, 2.4vw, 32px)/1.12 var(--serif); margin: 0; letter-spacing: -0.01em; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.card-meta { font: 600 14px/1.4 var(--sans); }
.card-meta span { display: block; font-weight: 400; opacity: 0.85; }
.card:hover .circle-arrow { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Services list */
.service-list { display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,0.25); }
.service-item { display: grid; gap: 10px; padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,0.25); }
.service-item h3 { font: 400 28px/1.15 var(--serif); margin: 0; }
.service-item p { margin: 0; color: rgba(255,255,255,0.82); max-width: 640px; }
.section:not(.section--navy) .service-list, .section:not(.section--navy) .service-item { border-color: var(--line); }
.section:not(.section--navy) .service-item h3 { color: var(--navy); }
.section:not(.section--navy) .service-item p { color: var(--muted); }

/* CTA band */
.cta {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  padding: clamp(40px, 7vw, 88px);
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
}
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,40,0.85), rgba(10,20,40,0.35)); }
.cta > div { position: relative; z-index: 1; max-width: 640px; }
.cta .h2 { color: var(--white); margin-bottom: 28px; }

/* ---------- Projects page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters + .filters { margin-bottom: 36px; }
.filter-label { font: 600 13px/36px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); margin-right: 6px; }
.chip {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chip:hover { background: rgba(31, 58, 104, 0.08); }
.chip[aria-pressed='true'] { background: var(--navy); color: var(--white); }
.result-count { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.card[hidden] { display: none; }
.empty { display: none; color: var(--muted); padding: 40px 0; }
.empty.is-visible { display: block; }

/* Project table (all projects at a glance) */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--white); }
table.projects { width: 100%; border-collapse: collapse; min-width: 720px; }
table.projects th, table.projects td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.projects th { font: 600 12px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); background: var(--paper-deep); }
table.projects td:first-child { color: var(--muted); width: 48px; }
table.projects td strong { font: 400 19px/1.3 var(--serif); color: var(--navy); }
.band { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.4 var(--sans); white-space: nowrap; }
.band--100 { background: var(--navy); color: var(--white); }
.band--50 { background: var(--sky); color: var(--navy); }
.band--10 { background: var(--sand); color: var(--navy); }

/* ---------- About / values ---------- */
.values { display: grid; gap: 22px; }
.value { background: var(--white); border-radius: var(--radius); padding: 30px 28px; }
.value .num { font: 400 20px/1 var(--serif); color: var(--accent); }
.value h3 { font: 400 28px/1.15 var(--serif); color: var(--navy); margin: 14px 0 10px; }
.value p { margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 22px; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 32px 30px; }
.contact-card h2 { font: 400 30px/1.15 var(--serif); color: var(--navy); margin: 0 0 16px; }
.contact-card dl { margin: 0; display: grid; gap: 18px; }
.contact-card dt { font: 600 12px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.contact-card dd { margin: 6px 0 0; font: 400 20px/1.35 var(--serif); color: var(--ink); }
.contact-card dd a { color: var(--navy); }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 8px; font: 600 13px/1.2 var(--sans); letter-spacing: 0.04em; color: var(--navy); }
.form input, .form select, .form textarea {
  font: 400 16px/1.4 var(--sans);
  color: var(--ink);
  padding: 13px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.82); padding: 72px 0 36px; margin-top: 96px; }
.site-footer.flush { margin-top: 0; }
.footer-grid { display: grid; gap: 40px; }
.site-footer h4 { font: 600 12px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-tag { font: 400 26px/1.25 var(--serif); color: var(--white); max-width: 420px; margin: 18px 0 0; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.6); }
.site-footer .logo-mark, .site-footer .logo-word { background: var(--white); color: var(--navy); }
.site-footer .logo-mark span { background: var(--navy); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .nav-pill a.nav-link { display: none; }
  .nav-pill { padding: 4px; }
  .nav-pill .menu-btn { margin-left: 0; }
  .logo-word { font-size: 21px; padding: 10px 12px; }
  .logo-word small { display: none; }
  .logo-mark { width: 40px; }
}
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
  .hero-bottom { grid-template-columns: 1.2fr 1fr; }
  .service-item { grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: baseline; }
  .contact-grid { grid-template-columns: 1fr 1.2fr; }
}
@media (min-width: 1100px) {
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .glass-card { min-height: 120px; font-size: 21px; padding: 16px; }
  .page-intro { padding-top: 96px; }
}
