/* ============================================================
   DEVISE DESIGN — Main Stylesheet (Fixed & Responsive)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink:     #15171c;
  --ink-2:   #1d2027;
  --bone:    #f3efe7;
  --bone-2:  #e8e3d8;
  --ash:     #7a7d85;
  --ash-2:   #3a3d44;
  --line:    rgba(21,23,28,.12);
  --line-d:  rgba(243,239,231,.14);
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --header-h: 84px;
}

html {
  scroll-behavior: smooth;
  /* prevent horizontal scroll always */
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  overflow-x: hidden; /* critical — no horizontal scroll */
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
h1,h2,h3,h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.08;
}

/* ── Layout Helpers ── */
.container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (min-width: 1024px) { .container { padding-inline: 48px; } }

.eyebrow {
  font-size: 11px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--ash);
  font-family: var(--sans);
  font-weight: 500;
}
.mono { font-family: var(--mono); font-size: 12px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(243,239,231,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ── Logo (image wordmark — single PNG with DEVISE + DESIGN) ── */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo-img {
  height: 42px;   /* shows both DEVISE + DESIGN rows clearly */
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-img-footer {
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

/* ── Nav ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.main-nav a {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ash-2);
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--ink);
}

/* ── Hamburger ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: all .3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bone);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    border-bottom: 1px solid var(--line);
    z-index: 199;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav a {
    padding: 18px 24px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }
  .main-nav a.active::after { display: none; }
}

/* ============================================================
   HERO — full width, full height, no white gap
   ============================================================ */
.hero {
  position: relative;
  /* Full viewport width — override any container */
  width: 100vw;
  left: 0;
  /* Full viewport height minus nothing — sits behind fixed header */
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  color: var(--bone);
  /* Push content down so it isn't hidden under header */
  padding-top: var(--header-h);
}

/* Slides */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: opacity 1.6s ease;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.6s ease, transform 8s ease;
}

/* Gradient overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(21,23,28,.5)  0%,
    rgba(21,23,28,.25) 40%,
    rgba(21,23,28,.8)  100%
  );
}

/* Content */
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 72px;
}

.hero-eyebrow { color: rgba(243,239,231,.7); margin-bottom: 20px; }

.hero-title {
  font-size: clamp(36px, 6.5vw, 92px);
  font-weight: 300;
  max-width: 1100px;
  color: var(--bone);
}
.hero-title em {
  font-style: italic;
  color: rgba(243,239,231,.65);
}

/* Stats row */
.hero-meta {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(243,239,231,.2);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-stat strong {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  color: var(--bone);
  line-height: 1;
}
.hero-stat span {
  font-size: 11px;
  color: rgba(243,239,231,.65);
  letter-spacing: .05em;
}
.mono-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(243,239,231,.5);
  margin-left: auto;
  align-self: flex-end;
}

/* Slide dots */
.hero-dots {
  position: absolute;
  right: 48px;
  bottom: 48px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dots .dot {
  width: 32px;
  height: 2px;
  background: rgba(243,239,231,.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .3s;
}
.hero-dots .dot.active { background: var(--bone); }

@media (max-width: 600px) {
  .hero-dots { right: 20px; bottom: 20px; }
  .hero-meta  { gap: 20px; }
  .mono-tag   { display: none; }
}

/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.expertise-strip {
  background: var(--ink);
  padding: 20px 0;
  border-top: 1px solid var(--line-d);
  border-bottom: 1px solid var(--line-d);
  overflow: hidden;
  width: 100%;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--display);
  font-size: 26px;
  color: var(--bone);
  flex-shrink: 0;
}
.marquee-track .dot-sep {
  font-size: 12px;
  color: var(--ash);
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   SECTION BLOCKS
   ============================================================ */
.block {
  padding: 96px 0;
  position: relative;
}
@media (min-width: 1024px) { .block { padding: 140px 0; } }

.block.dark {
  background: var(--ink);
  color: var(--bone);
}
.block.dark .eyebrow { color: rgba(243,239,231,.45); }

/* ── 12-col grid ── */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.col-4 { grid-column: span 4; }
.col-7 { grid-column: 7 / span 6; }
.col-6 { grid-column: span 6; }
.col-12{ grid-column: 1 / -1; }

@media (max-width: 860px) {
  .grid-12 { grid-template-columns: 1fr; gap: 28px; }
  .col-4, .col-7, .col-6 { grid-column: 1 / -1; }
}

.section-title {
  font-size: clamp(32px, 4.5vw, 62px);
  font-weight: 300;
  max-width: 900px;
  margin-top: 20px;
}
.section-title em { font-style: italic; color: var(--ash); }
.dark .section-title em { color: rgba(243,239,231,.55); }

/* ── Lead text block ── */
.lead p { margin-bottom: 18px; color: rgba(21,23,28,.75); font-size: 15px; }
.dark .lead p { color: rgba(243,239,231,.75); }
.lead .drop {
  font-family: var(--display);
  font-size: 48px;
  float: left;
  line-height: .85;
  margin: 8px 10px 0 0;
  color: var(--ink);
}
.dark .lead .drop { color: var(--bone); }
.muted-text { color: rgba(243,239,231,.65); max-width: 520px; font-size: 15px; }

/* ============================================================
   FEATURE GRID (home)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.card {
  display: block;
  overflow: hidden;
  cursor: pointer;
}
.card-img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

/* Overlay */
.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(21,23,28,.7));
  opacity: 0;
  transition: opacity .5s ease;
}

/* Hover effect */
.card:hover .card-img::after {
  opacity: 1;
}

.card:hover .card-img img {
  transform: scale(1.05);
}
.card h3 {
  font-size: clamp(20px, 2.5vw, 30px);
  margin-top: 16px;
  font-weight: 300;
  color: var(--bone);
}
.card .meta {
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(243,239,231,.5);
  margin-top: 6px;
}

.center-cta { margin-top: 64px; text-align: center; }

@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: var(--bone);
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  transition: background .3s;
}
.btn:hover { background: var(--ash-2); }
.btn .arrow { display: inline-block; transition: transform .3s; }
.btn:hover .arrow { transform: translateX(6px); }

.btn-light {
  background: var(--bone);
  color: var(--ink);
}
.btn-light:hover { background: var(--bone-2); }

/* ============================================================
   PORTFOLIO TABS
   ============================================================ */
.tabs-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  background: rgba(243,239,231,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs-bar .container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-top: 16px;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.tabs-bar .container::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color .3s;
}
.tab:hover, .tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 1px;
  background: var(--ink);
}

/* ============================================================
   PORTFOLIO GRID
   ============================================================ */
.portfolio-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 32px;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .portfolio-grid { grid-template-columns: 1fr; } }

.proj { cursor: pointer; animation: fadeUp .6s ease backwards; }
.proj .img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ddd;
  position: relative;
}
.proj .img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter .7s ease, transform .7s ease;
}
.proj:hover .img img { filter: grayscale(0%); transform: scale(1.05); }
.proj .img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(21,23,28,.7));
  opacity: 0;
  transition: opacity .4s;
}
.proj:hover .img::after { opacity: 1; }
.proj .info {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.proj h3 { font-size: 22px; font-weight: 400; }
.proj .loc { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); margin-top: 4px; }
.proj .yr  { font-family: var(--mono); font-size: 12px; color: var(--ash); flex-shrink: 0; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 64px;
  border: 1px solid var(--line);
}
.svc {
  background: var(--bone);
  padding: 40px 32px;
  transition: background .35s, color .35s;
}
.svc:hover { background: var(--ink); color: var(--bone); }
.svc:hover .svc-icon svg { stroke: var(--bone); }
.svc-icon { margin-bottom: 24px; }
.svc-icon svg { width: 42px; height: 42px; stroke: var(--ink); fill: none; stroke-width: 1.2; transition: stroke .35s; }
.svc h3 { font-size: 24px; font-weight: 400; margin-bottom: 10px; }
.svc .num { font-family: var(--mono); font-size: 11px; color: var(--ash); margin-bottom: 18px; display: block; }
.svc:hover .num { color: rgba(243,239,231,.55); }
.svc p { font-size: 14px; color: var(--ash-2); }
.svc:hover p { color: rgba(243,239,231,.75); }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.info-block { margin-bottom: 36px; }
.info-block .label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ash); margin-bottom: 10px; }
.info-block .value { font-family: var(--display); font-size: 22px; font-weight: 300; }
.info-block a:hover { text-decoration: underline; }

form.contact-form { display: grid; gap: 18px; }
.contact-form .field { position: relative; margin-bottom: 4px; }
.contact-form label { display: block; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ash); margin-bottom: 8px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .25s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .err { display: block; color: #b3261e; font-size: 12px; margin-top: 6px; min-height: 14px; }
.contact-form .field.invalid input,
.contact-form .field.invalid textarea { border-bottom-color: #b3261e; }

.map-wrap { margin-top: 64px; border: 1px solid var(--line); overflow: hidden; }
.map-wrap iframe { width: 100%; height: 420px; display: block; filter: grayscale(100%) contrast(1.1); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  padding: 160px 0 80px;
  border-bottom: 1px solid var(--line);
  /* offset for fixed header already included in top padding */
}
.page-header h1 { font-size: clamp(48px, 8vw, 110px); font-weight: 300; letter-spacing: -.03em; }
.page-header .intro { max-width: 640px; color: var(--ash-2); margin-top: 24px; font-size: 16px; }
.page-header h1 em {
  font-style: italic;
  color: var(--ash);
}
/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { color: rgba(243,239,231,.6); font-size: 14px; max-width: 340px; margin-top: 16px; }

.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(243,239,231,.45);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: 14px; color: rgba(243,239,231,.7); }
.footer-col li a:hover { color: var(--bone); }

.footer-bottom {
  border-top: 1px solid var(--line-d);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(243,239,231,.45);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   ABOUT — Team rows (updated with photo)
   ============================================================ */
.team-row { display: grid; grid-template-columns: repeat(12,1fr); gap: 24px; margin-bottom: 80px; }
.team-row .num { grid-column: span 4; color: rgba(243,239,231,.4); font-family: var(--mono); font-size: 12px; }
.team-row .num h3 { font-family: var(--display); font-size: 38px; color: var(--bone); margin-top: 10px; font-weight: 300; }
.team-row .num p { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(243,239,231,.5); margin-top: 8px; }
.team-row .num a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 18px; color: rgba(243,239,231,.75); }
.team-row .bio { grid-column: 6 / span 7; color: rgba(243,239,231,.78); font-size: 15px; }

/* ── Team photo box ── */
.team-photo {
  width: 100%;
  max-width: 180px;        /* limits the width */
  aspect-ratio: 1 / 1;    /* square — clean and compact */
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(243,239,231,.12);
  position: relative;
  background: rgba(243,239,231,.05);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(0%);
  transition: filter .5s ease, transform .5s ease;
}
.team-photo:hover img {
  filter: grayscale(50%);
  transform: scale(1.03);
}
/* Placeholder shown when no image src is set */
.team-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(243,239,231,.25);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.team-photo-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: rgba(243,239,231,.2);
  fill: none;
  stroke-width: 1;
}
@media (max-width: 860px) { .team-row .num, .team-row .bio { grid-column: 1/-1; } }

/* ============================================================
   COPY PROTECTION
   ============================================================ */
body.no-copy { user-select: none; -webkit-user-select: none; }
body.no-copy input,
body.no-copy textarea { user-select: text; -webkit-user-select: text; }

/* ============================================================
   RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 600px) {
  .block { padding: 64px 0; }
  .hero  { min-height: 100svh; }
  .hero-content { padding-bottom: 48px; }
}

@media (max-width: 400px) {
  .logo-main { font-size: 24px; }
  .logo-sub  { font-size: 9px; }
}

/* ============================================================
   CONTACT — Inline success card
   ============================================================ */
.success-card {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
  padding: 0;
}
.success-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.success-icon {
  width: 64px;
  height: 64px;
  color: var(--ink);
  margin-bottom: 32px;
}
.success-title {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 20px;
  color: var(--ink);
}
.success-msg {
  font-size: 16px;
  color: var(--ash-2);
  max-width: 380px;
  line-height: 1.65;
}
.form-global-err {
  color: #b3261e;
  font-size: 13px;
  padding: 10px 0;
}

/* 1. Prevent double scrollbar / horizontal overflow from canvas */
html, body {
  overflow-x: hidden;
}
 
/* 2. Canvas must cover full document and scroll with content */
#arch-canvas {
  position: absolute !important;  /* was: fixed — changed to scroll with page */
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  /* height is set by JS to match full document height */
  pointer-events: none !important;
  z-index: 0 !important;
}
 
/* 3. Body needs relative so absolute canvas positions correctly */
body {
  position: relative !important;  /* was: static */
}
 