/* ==========================================================================
   MTG · Multifamily Technology Group — shared stylesheet
   ========================================================================== */

:root {
  --ink: #142b2a;
  --muted: #536663;
  --cream: #f6f5ef;
  --orange: #cf501f;
  --orange-deep: #ad3f16;
  --line: #d8dfd7;
  --white: #fff;
  --pale: #e9ede4;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  opacity: 0;
  animation: page-in .6s var(--ease) forwards;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 5px;
}

.wrap { width: min(1200px, 90%); margin: auto; }
.skip { position: absolute; top: -100px; background: white; padding: 12px; z-index: 100; }
.skip:focus { top: 10px; }

/* ---------------------------------- Header ---------------------------------- */

header {
  position: sticky;
  top: 0;
  background: rgba(246, 245, 239, .97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
  z-index: 30;
  transition: box-shadow .3s var(--ease);
}
header.scrolled { box-shadow: 0 10px 30px -22px rgb(20 43 42 / 35%); }

.nav { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.mark { display: flex; align-items: end; gap: 4px; height: 32px; }
.mark i { display: block; width: 7px; background: var(--orange); height: 23px; transition: height .35s var(--ease); }
.mark i:nth-child(2) { height: 32px; }
.mark i:nth-child(3) { height: 17px; }
.logo:hover .mark i { height: 32px; }
.logo strong { font-size: 30px; letter-spacing: -2px; }
.logo small { font-size: 9px; line-height: 1.3; letter-spacing: 1px; display: block; margin-left: 8px; max-width: 110px; text-transform: uppercase; }

.links { display: flex; align-items: center; gap: 28px; }
.links > a:not(.btn), .links > .dropdown > button { text-decoration: none; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; display: flex; align-items: center; gap: 6px; }
.links > a:not(.btn):hover, .links > .dropdown > button:hover { text-decoration: underline; }
.links a[aria-current="page"] { color: var(--orange); font-weight: 700; }
.links a.btn[aria-current="page"] { color: #fff; }

.dropdown { position: relative; }
.dropdown > button svg { width: 9px; height: 9px; transition: transform .25s var(--ease); }
.dropdown:hover > button svg, .dropdown.open > button svg { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px);
  margin-top: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; min-width: 260px; box-shadow: 0 24px 48px -20px rgb(20 43 42 / 30%);
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu, .dropdown-menu:focus-within {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.dropdown-menu a { display: block; padding: 11px 14px; border-radius: 5px; text-decoration: none; font-size: 13px; }
.dropdown-menu a:hover { background: var(--pale); }
.dropdown-menu a strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.dropdown-menu a span { color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px 21px; border: 1px solid transparent; background: var(--orange);
  color: white; text-decoration: none; font-size: 14px; font-weight: 700; border-radius: 3px;
  cursor: pointer; position: relative; overflow: hidden; transition: background .25s, transform .25s var(--ease);
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover { background: var(--orange-deep); transform: translateY(-2px); }
.btn:hover span { transform: translate(3px, -1px); }
.btn.secondary { background: transparent; color: var(--ink); border-color: #aab8ad; }
.btn.secondary:hover { background: var(--pale); }
.menu { display: none; background: none; border: 1px solid var(--line); padding: 8px 12px; border-radius: 3px; }

/* ---------------------------------- Page header (inner pages) ---------------------------------- */

.page-header { padding: 62px 0 50px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 22px; text-transform: uppercase; letter-spacing: .6px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-header h1 { font-size: clamp(34px, 4.2vw, 54px); letter-spacing: -2px; margin: 18px 0 0; font-weight: 500; }
.page-header .intro { max-width: 620px; margin-top: 18px; }

/* ---------------------------------- Hero ---------------------------------- */

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 65px; padding: 80px 0 64px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.eyebrow:before { content: ''; width: 23px; height: 2px; background: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(44px, 5.4vw, 73px); line-height: 1.06; letter-spacing: -3.4px; font-weight: 500; margin: 24px 0; }
h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--orange); font-style: normal; }
.intro { font-size: 18px; color: var(--muted); max-width: 490px; line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.note { font-size: 12px; color: var(--muted); }

.scene { position: relative; background: #cad5c6; border-radius: 5px; overflow: hidden; min-height: 470px; }
.scene svg { width: 100%; height: 470px; display: block; transition: transform .2s linear; will-change: transform; }
.scene-tag { position: absolute; left: 24px; top: 24px; display: flex; gap: 8px; align-items: center; background: #f6f5efed; border: 1px solid #fff8; border-radius: 30px; padding: 8px 13px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.dot { height: 6px; width: 6px; border-radius: 100%; background: #4b7051; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.scene-bottom { position: absolute; bottom: 20px; left: 20px; right: 20px; background: var(--cream); padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.scene-bottom span { font-size: 12px; color: var(--muted); display: block; }
.scene-bottom strong { font-size: 19px; font-weight: 500; }
.scene-bottom b { border: 1px solid var(--line); padding: 6px 12px; border-radius: 100%; font-weight: 400; display: inline-block; transition: transform .3s var(--ease), background .3s; }
.scene:hover .scene-bottom b { transform: translate(3px, -3px); background: var(--pale); }
.win { animation: flicker 6s ease-in-out infinite; transform-origin: center; }
.win:nth-child(2) { animation-delay: 1.3s; }
.win:nth-child(3) { animation-delay: 2.6s; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .55; } }

.trust { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 24px 0 30px; font-size: 13px; }
.trust span { display: flex; align-items: center; gap: 10px; }
.trust span:before { content: '✓'; color: var(--orange); }

/* ---------------------------------- Sections ---------------------------------- */

section { padding: 85px 0; }
.white { background: white; }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 36px; }
.heading h2 { max-width: 620px; margin: 15px 0 0; }
h2 { font-size: clamp(32px, 3.5vw, 46px); font-weight: 500; letter-spacing: -1.7px; line-height: 1.15; }
h3 { font-weight: 500; }
.heading > p { max-width: 330px; color: var(--muted); font-size: 15px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  padding: 32px; border: 1px solid var(--line); border-radius: 4px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -30px rgb(20 43 42 / 45%); border-color: #b9c7bb; }
.number { font-size: 12px; letter-spacing: 1px; color: var(--orange); display: block; margin-bottom: 35px; }
.card h3 { font-size: 21px; font-weight: 500; letter-spacing: -.5px; line-height: 1.25; }
.card p { color: var(--muted); font-size: 14px; margin-bottom: 0; }

.service { background: var(--cream); border: 0; }
.service .icon {
  width: 42px; height: 42px; border: 1px solid #b4c3b3; display: grid; place-items: center;
  border-radius: 50%; margin-bottom: 25px; font-size: 20px; transition: background .3s, color .3s, transform .3s var(--ease);
}
.service:hover .icon { background: var(--orange); border-color: var(--orange); color: white; transform: rotate(-8deg) scale(1.06); }
.service ul { margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 12px; color: var(--muted); }
.service li { margin: 6px 0; }
.service li:before { content: '↗'; color: var(--orange); margin-right: 10px; }

.dark { background: var(--ink); color: var(--cream); }
.dark .heading > p, .dark .card p { color: #c4cec6; }
.dark .card { border-color: #435650; }
.dark .card:hover { border-color: #5c7069; }
.dark .number { color: #ffa374; }

/* ---------------------------------- Stats / counters ---------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { padding: 30px 24px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.stat strong { display: block; font-size: clamp(30px, 3.4vw, 42px); font-weight: 500; letter-spacing: -1.5px; color: var(--orange); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------------------------------- Timeline (process) ---------------------------------- */

.timeline { position: relative; display: grid; gap: 28px; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: 26px; }
.timeline-item .index { font-size: 34px; font-weight: 500; color: var(--orange); opacity: .5; }
.timeline-item h3 { font-size: 20px; margin-bottom: 8px; }
.timeline-item p { color: var(--muted); margin: 0; }

/* ---------------------------------- About ---------------------------------- */

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; align-items: start; }
.about p { color: var(--muted); }
.about h2 { margin-top: 20px; }
.about-detail { border-left: 2px solid var(--orange); padding-left: 28px; margin-bottom: 26px; }
.about-detail:last-child { margin-bottom: 0; }
.about-detail h3 { font-size: 22px; font-weight: 500; }
.about-detail p:last-child { margin: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------------------------------- Case studies ---------------------------------- */

.case-card { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: white; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.case-card:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -30px rgb(20 43 42 / 45%); }
.case-media { height: 190px; background: linear-gradient(135deg, #cad5c6, #edf0df); position: relative; overflow: hidden; }
.case-media svg { width: 100%; height: 100%; display: block; transition: transform .5s var(--ease); }
.case-card:hover .case-media svg { transform: scale(1.06); }
.case-tag { position: absolute; left: 16px; top: 16px; background: var(--ink); color: var(--cream); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 11px; border-radius: 30px; }
.case-body { padding: 26px; }
.case-body h3 { font-size: 19px; margin-bottom: 10px; }
.case-body p { color: var(--muted); font-size: 14px; }
.case-stats { display: flex; gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.case-stats div strong { display: block; font-size: 20px; color: var(--orange); font-weight: 500; }
.case-stats div span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---------------------------------- Resources ---------------------------------- */

.resource-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.resource-filters button {
  border: 1px solid var(--line); background: white; padding: 9px 16px; border-radius: 30px;
  font-size: 13px; cursor: pointer; transition: background .25s, border-color .25s, color .25s;
}
.resource-filters button:hover { border-color: var(--orange); }
.resource-filters button.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.resource-card { border: 1px solid var(--line); border-radius: 4px; padding: 28px; background: white; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.resource-card:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -30px rgb(20 43 42 / 45%); }
.resource-card .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--orange); font-weight: 700; }
.resource-card h3 { font-size: 18px; margin: 14px 0 10px; }
.resource-card p { color: var(--muted); font-size: 14px; }
.resource-card[hidden] { display: none; }

.faq { max-width: 820px; }
.faq h2 { margin: 18px 0 35px; }
details { border-top: 1px solid var(--line); padding: 22px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary:after { content: '+'; color: var(--orange); font-size: 23px; line-height: 1; transition: transform .3s var(--ease); }
details[open] summary:after { content: '−'; }
details p { color: var(--muted); font-size: 15px; margin: 17px 40px 0 0; }

/* ---------------------------------- Contact ---------------------------------- */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact h2 { margin: 20px 0; }
.contact p { color: var(--muted); }
.contact-links { margin-top: 30px; display: grid; gap: 8px; font-size: 15px; }
.contact-links a { text-underline-offset: 5px; }
form { padding: 32px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.field { margin-bottom: 18px; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #b8c5bd; background: #fff; border-radius: 3px; padding: 10px; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
form .btn { width: 100%; margin-top: 4px; }
form .note { margin: 14px 0 0; line-height: 1.6; }
#form-status { font-size: 13px; margin: 14px 0 0; }

footer { padding: 46px 0 35px; background: var(--ink); color: var(--cream); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; padding-bottom: 34px; border-bottom: 1px solid #2c433f; }
.footer-top p { color: #c4cec6; font-size: 13px; max-width: 260px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 16px; color: #9db2ab; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 13px; color: var(--cream); }
.footer-col a:hover { text-decoration: underline; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-top: 22px; }
.footer p { font-size: 11px; color: #c4cec6; margin: 0; }
.footer a { font-size: 12px; text-underline-offset: 4px; }
.footer .logo strong { font-size: 24px; }

/* ---------------------------------- Reveal-on-scroll animation ---------------------------------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-group .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2) { transition-delay: .09s; }
.reveal-group .reveal:nth-child(3) { transition-delay: .18s; }
.reveal-group .reveal:nth-child(4) { transition-delay: .27s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .win, .scene svg { animation: none !important; transition: none !important; }
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (min-width: 1500px) {
  .hero { padding-top: 95px; padding-bottom: 85px; }
}

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 950px) {
  .logo small { display: none; }
  .links { gap: 16px; }
  .hero { gap: 30px; }
  h1 { font-size: 53px; }
  .scene, .scene svg { min-height: 440px; height: 440px; }
  .contact, .about { gap: 35px; }
  .card { padding: 24px; }
  .resource-grid, .values { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav { height: 72px; }
  .menu { display: block; }
  .links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; padding: 22px 5%;
    background: var(--cream); border-bottom: 1px solid var(--line); align-items: stretch;
  }
  .links.open { display: flex; flex-direction: column; gap: 20px; }
  .dropdown-menu, .dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu, .dropdown-menu:focus-within {
    position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 6px 0 0 14px; min-width: 0;
  }
  .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: grid; }
  .hero { grid-template-columns: 1fr; padding: 45px 0 35px; gap: 25px; }
  h1 { font-size: clamp(43px, 10vw, 66px); letter-spacing: -2px; max-width: 560px; }
  .intro { font-size: 16px; }
  .scene, .scene svg { min-height: 340px; height: 340px; }
  .trust { font-size: 12px; gap: 12px 20px; }
  .heading { display: block; }
  .heading > p { margin-top: 20px; max-width: 100%; }
  .grid, .about, .contact, .stats, .resource-grid, .values, .footer-top { grid-template-columns: 1fr; }
  .grid { gap: 14px; }
  .number { margin-bottom: 20px; }
  .card { padding: 28px; }
  .about, .contact { gap: 25px; }
  section { padding: 55px 0; }
  .page-header { padding: 42px 0 34px; }
  .footer { flex-wrap: wrap; }
  .footer p { width: 100%; order: 3; }
  .fields { grid-template-columns: 1fr; gap: 0; }
  form { padding: 24px; }
  .scene-bottom { padding: 15px; }
  .scene-bottom strong { font-size: 17px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}
