:root {
  --navy: #1f3347;
  --navy-dark: #16242f;
  --steel: #4a6580;
  --accent: #c8791f;
  --accent-dark: #a8620f;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --text: #202a32;
  --text-muted: #5a6b78;
  --border: #e1e6ea;
  --max-width: 1140px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--navy);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: none;
  }
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: #cfd9e0;
  padding: 32px 24px;
  margin-top: 64px;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.site-footer a { color: #fff; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--accent-dark); }

/* Hero (Home) */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 96px 24px 88px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 28px;
  line-height: 1.3;
}

.hero .cta-line {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  max-width: 700px;
  margin: 0 auto 36px;
  color: #dbe4ea;
}

/* Client marquee */
.clients {
  padding: 56px 0 64px;
  background: var(--bg-alt);
  overflow: hidden;
}

.clients h2 {
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: scroll-left 30s linear infinite;
}

.marquee-track .client-badge {
  flex: 0 0 auto;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.client-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  min-width: 160px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
}

/* Page header (non-home pages) */
.page-header {
  background: var(--navy);
  color: #fff;
  padding: 56px 24px;
  text-align: center;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}

.page-header p {
  margin: 12px auto 0;
  max-width: 640px;
  color: #cfd9e0;
}

section { padding: 64px 0; }

/* About */
.about-block {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: start;
  margin-bottom: 56px;
}

.about-block img {
  border-radius: var(--radius);
  width: 100%;
  object-fit: cover;
}

.about-block.reverse {
  grid-template-columns: 1fr 340px;
}

.about-block.reverse .about-photo { order: 2; }

.about-block h2 {
  margin-top: 0;
  color: var(--navy);
}

.placeholder {
  background: #fff4e0;
  border: 1px dashed var(--accent);
  padding: 0 4px;
  border-radius: 3px;
  color: var(--accent-dark);
  font-style: italic;
}

@media (max-width: 760px) {
  .about-block,
  .about-block.reverse {
    grid-template-columns: 1fr;
  }
  .about-block.reverse .about-photo { order: 0; }
}

/* Services */
.services-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
}

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

.service-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: var(--accent);
}

.service-icon svg { width: 100%; height: 100%; }

.service-number {
  font-weight: 800;
  color: var(--steel);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.service-card h3 {
  color: var(--navy);
  margin: 0 0 14px;
  font-size: 1.2rem;
}

@media (max-width: 860px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Projects flip grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.flip-card {
  perspective: 1200px;
  height: 260px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}

.flip-card.flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.flip-card-front {
  display: flex;
  flex-direction: column;
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 1;
}

.flip-card-front .card-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(15,25,35,0.88), rgba(15,25,35,0));
  color: #fff;
  padding: 28px 14px 12px;
}

.flip-card-front .card-caption .year { color: #f0b878; font-weight: 700; font-size: 0.82rem; }
.flip-card-front .card-caption .title { font-weight: 700; font-size: 0.98rem; margin-top: 2px; }

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--navy);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flip-card-back .year { color: #f0b878; font-weight: 700; font-size: 0.82rem; margin-bottom: 4px; }
.flip-card-back .title { font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.flip-card-back p { font-size: 0.88rem; color: #dbe4ea; margin: 0; }
.flip-card-back .tags { margin-top: 12px; font-size: 0.78rem; color: #f0b878; font-weight: 600; }

@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .flip-card { height: 300px; }
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.contact-info {
  padding: 72px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info h1 {
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-top: 0;
}

.contact-info .lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.contact-item {
  margin-bottom: 24px;
}

.contact-item .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--steel);
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-item .value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-photo {
  min-height: 320px;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-info { padding: 48px 24px; }
  .contact-photo { height: 320px; }
}
