:root {
  --ink: #121713;
  --ink-soft: #252b26;
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --stone: #dcd5c8;
  --muted: #62645e;
  --brass: #c2a465;
  --brass-dark: #80693d;
  --deep: #121b16;
  --white: #ffffff;
  --font: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --section-space: clamp(5rem, 9vw, 8.5rem);
  --page-pad: clamp(1.25rem, 5vw, 5.5rem);
  --max-width: 1380px;
  --radius: 12px;
  --transition: 220ms ease;
}

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

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

body {
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4000;
  width: var(--scroll-progress, 0%);
  height: 3px;
  background: var(--brass);
  pointer-events: none;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.035em; }
h1 { font-size: clamp(3.2rem, 5.5vw, 5.6rem); line-height: 0.96; }
h2 { font-size: clamp(2.3rem, 3.6vw, 3.8rem); line-height: 1.02; }
h3 { font-size: clamp(1.25rem, 1.5vw, 1.55rem); line-height: 1.2; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 300;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.full-width { width: 100%; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.8rem 1.3rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.button-primary { background: var(--brass); color: var(--ink); }
.button-primary:hover { background: #c89a4a; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: var(--ink-soft); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid currentColor;
  font-size: 0.95rem;
  font-weight: 600;
}

.text-link-light { color: var(--white); }

.section {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: var(--section-space) var(--page-pad);
}

/* Loading reveal */
.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  background: #050505;
  color: var(--white);
  transition: opacity 650ms ease, visibility 650ms ease;
}

.site-preloader.is-finished { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-logo-wrap { position: relative; width: clamp(10rem, 20vw, 14rem); aspect-ratio: 1; }
.preloader-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preloader-logo-mono { filter: grayscale(1) brightness(1.55); opacity: 0.58; }
.preloader-color-reveal { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 100% 0 0); animation: color-reveal 2.2s cubic-bezier(.65,0,.35,1) forwards; }
.site-preloader > p { font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; color: #b7b2ac; }
@keyframes color-reveal { to { clip-path: inset(0); } }

/* Prototype notice */
.demo-modal { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 1.25rem; opacity: 0; visibility: hidden; transition: opacity 250ms ease, visibility 250ms ease; }
.demo-modal.is-open { opacity: 1; visibility: visible; }
.demo-modal-backdrop { position: absolute; inset: 0; background: rgba(10,9,8,.82); backdrop-filter: blur(8px); }
.demo-modal-card { position: relative; z-index: 1; width: min(100%, 510px); padding: clamp(2rem, 6vw, 3.5rem); border: 1px solid var(--stone); border-radius: var(--radius); background: var(--surface); text-align: center; }
.demo-modal-close { position: absolute; top: .75rem; right: 1rem; border: 0; background: transparent; color: var(--ink); font-size: 2rem; cursor: pointer; }
.redmark-logo { width: min(100%, 240px); height: auto; margin: 0 auto 1.8rem; }
.demo-modal-card h2 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3.25rem); }
.demo-modal-card > p { color: var(--muted); }
.demo-modal-card .device-note { display: flex; justify-content: center; align-items: center; gap: .5rem; margin: 1.25rem 0 1.5rem; color: var(--ink); font-weight: 600; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid transparent;
  background: rgba(247,245,240,.94);
  backdrop-filter: blur(16px);
  transition: height var(--transition), border-color var(--transition);
}

.site-header.is-scrolled { height: 72px; border-color: var(--stone); }
.brand { justify-self: start; display: flex; align-items: center; }
.brand img { width: 62px; height: 62px; object-fit: contain; }
.desktop-nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }
.desktop-nav a { position: relative; color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; }
.desktop-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -.45rem; height: 1px; background: var(--brass-dark); transition: right var(--transition); }
.desktop-nav a:hover::after, .desktop-nav a.is-active::after { right: 0; }
.desktop-nav a:hover { color: var(--brass-dark); }
.header-actions { justify-self: end; display: flex; align-items: center; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--stone); border-radius: 5px; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 21px; height: 1.5px; margin: 5px auto; background: var(--ink); }

.mobile-drawer { position: fixed; top: 0; right: -100%; z-index: 1000; width: min(88vw, 380px); height: 100dvh; display: flex; flex-direction: column; gap: 2rem; padding: 1.5rem; background: var(--paper); transition: right 300ms ease; }
.mobile-drawer.open { right: 0; }
.mobile-drawer-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--stone); }
.mobile-logo { width: 64px; height: 64px; object-fit: contain; }
.drawer-close { border: 0; background: transparent; font-size: 2rem; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-link { padding: 1rem 0; border-bottom: 1px solid var(--stone); font-size: 1.3rem; font-weight: 500; }
.mobile-drawer > .button { margin-top: auto; }

/* Hero */
.hero {
  position: relative;
  width: calc(100% - (2 * clamp(.75rem, 2vw, 2rem)));
  height: min(810px, calc(100dvh - 108px));
  min-height: 640px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
}

.hero-video-container, .hero-video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { object-fit: cover; background: var(--ink); }
.hero-video-mobile { display: none; }
.hero-shade { background: linear-gradient(90deg, rgba(14,10,8,.82) 0%, rgba(14,10,8,.52) 42%, rgba(14,10,8,.08) 75%), linear-gradient(0deg, rgba(14,10,8,.5), transparent 50%); }
.hero-copy { position: absolute; z-index: 2; left: clamp(1.5rem, 6vw, 6.5rem); bottom: clamp(2rem, 7vw, 6rem); max-width: 680px; }
.hero-copy h1 { max-width: 650px; }
.hero-intro { max-width: 480px; margin-top: 1.5rem; color: #e2ded8; font-size: clamp(1rem, 1.5vw, 1.18rem); }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.hero-copy h1, .hero-intro, .hero-actions { opacity: 0; transform: translateY(24px); }
body.is-ready .hero-copy h1 { animation: hero-in 750ms cubic-bezier(.2,.75,.25,1) 80ms forwards; }
body.is-ready .hero-intro { animation: hero-in 700ms cubic-bezier(.2,.75,.25,1) 190ms forwards; }
body.is-ready .hero-actions { animation: hero-in 700ms cubic-bezier(.2,.75,.25,1) 290ms forwards; }
@keyframes hero-in { to { opacity: 1; transform: none; } }
.hero-video-controls { position: absolute; z-index: 3; right: 1.5rem; bottom: 1.5rem; display: flex; gap: .5rem; }
.video-ctrl-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(10,8,7,.45); color: var(--white); cursor: pointer; }
.video-ctrl-btn:hover { background: var(--white); color: var(--ink); }

/* Services */
.services-section { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.5fr); gap: clamp(3rem, 7vw, 8rem); align-items: start; }
.section-heading { position: sticky; top: 120px; }
.section-heading > p:last-child, .about-copy > p, .contact-copy > p { max-width: 460px; margin-top: 1.6rem; color: var(--muted); font-size: 1.05rem; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.5rem; }
.service-card { position: relative; border-top: 1px solid var(--stone); padding-top: 1rem; transition: transform 350ms cubic-bezier(.2,.75,.25,1), border-color var(--transition); }
.service-card::before { content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--brass-dark); transition: width 450ms ease; }
.service-card:hover { transform: translateY(-7px); border-color: transparent; }
.service-card:hover::before { width: 100%; }
.service-card img { width: 100%; height: clamp(240px, 26vw, 330px); object-fit: cover; border-radius: 8px; transition: transform 650ms cubic-bezier(.2,.75,.25,1), filter 400ms ease; }
.service-card:hover img { transform: scale(1.018); filter: saturate(.92) contrast(1.03); }
.service-card > div { padding: 1.15rem .15rem 0; }
.service-card h3 { margin-bottom: .45rem; }
.service-card p { max-width: 34ch; color: var(--muted); }

/* About */
.about-section { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: clamp(3rem, 8vw, 9rem); align-items: center; }
.about-visual { position: relative; min-height: 660px; }
.about-image-main { width: 75%; height: 610px; object-fit: cover; border-radius: var(--radius); }
.about-image-accent { position: absolute; right: 0; bottom: 0; width: 47%; height: 330px; object-fit: cover; border: 8px solid var(--paper); border-radius: var(--radius); }
.principles-list { margin-top: 2.5rem; list-style: none; border-top: 1px solid var(--stone); }
.principles-list li { display: block; padding: 1.15rem 0; border-bottom: 1px solid var(--stone); transition: padding-left var(--transition), color var(--transition); }
.principles-list li:hover { padding-left: .65rem; color: var(--brass-dark); }
.principles-list strong { font-size: 1.05rem; font-weight: 600; }

/* Work */
.work-section { width: 100%; max-width: none; background: radial-gradient(circle at var(--work-x, 50%) var(--work-y, 50%), #233127 0, var(--deep) 34rem); color: var(--white); padding-left: max(var(--page-pad), calc((100vw - var(--max-width)) / 2 + var(--page-pad))); padding-right: max(var(--page-pad), calc((100vw - var(--max-width)) / 2 + var(--page-pad))); transition: background 120ms linear; }
.work-heading { display: flex; justify-content: space-between; align-items: end; gap: 4rem; margin-bottom: 3.5rem; }
.work-heading > p { max-width: 380px; color: #aaa39b; }
.work-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; }
.work-card { position: relative; height: clamp(390px, 48vw, 620px); overflow: hidden; border: 0; border-radius: 8px; background: #000; color: var(--white); text-align: left; cursor: zoom-in; transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)); transform-style: preserve-3d; transition: transform 180ms ease, border-radius 300ms ease; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease, opacity 300ms ease; }
.work-card::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.work-card > span { position: absolute; z-index: 1; left: 1.25rem; bottom: 1.25rem; font-size: 1.3rem; font-weight: 600; }
.work-card:hover { border-radius: 16px; }
.work-card:hover img { transform: scale(1.035); opacity: .9; }

/* Contact */
.contact-section { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr); gap: clamp(3rem, 8vw, 9rem); align-items: start; }
.contact-direct { display: flex; flex-direction: column; gap: .45rem; margin-top: 2.5rem; }
.contact-direct a { width: fit-content; border-bottom: 1px solid var(--stone); font-weight: 600; }
.contact-direct span { margin-top: .5rem; color: var(--muted); font-size: .875rem; }
.contact-form { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--stone); border-radius: var(--radius); background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; min-height: 50px; border: 1px solid var(--stone); border-radius: 5px; background: var(--paper); color: var(--ink); padding: .8rem .9rem; outline: none; }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brass-dark); }
.form-group select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.privacy-consent { display: flex; align-items: flex-start; gap: .6rem; margin: .35rem 0 1.25rem; color: var(--muted); font-size: .875rem; }
.privacy-consent input { margin-top: .25rem; accent-color: var(--brass-dark); }
.form-alert { display: none; margin-top: 1rem; padding: .8rem; border-radius: 5px; font-size: .875rem; }
.form-alert.error { display: block; background: #f5e8e5; color: #7d3025; }

/* Lightbox */
.lightbox-modal { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: center; padding: 1.5rem; opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms ease; }
.lightbox-modal.open { opacity: 1; visibility: visible; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.lightbox-content { position: relative; z-index: 1; max-width: min(92vw, 1080px); max-height: 90vh; }
.lightbox-img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 5px; }
.lightbox-close { position: absolute; top: -3rem; right: 0; border: 0; background: transparent; color: var(--white); font-size: 2.2rem; cursor: pointer; }
.lightbox-caption { margin-top: .65rem; color: #d4d0ca; font-size: .875rem; text-align: center; }

.floating-whatsapp-btn { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 800; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: #23c967; color: var(--white); transition: transform var(--transition); }
.floating-whatsapp-btn:hover { transform: translateY(-3px); }

/* Formal footer */
.site-footer {
  --footer-x: 50%;
  --footer-y: 30%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at var(--footer-x) var(--footer-y), #26362c 0, #101712 34rem, #0b100d 70rem);
  color: #c8c4bb;
  padding: clamp(4.5rem, 8vw, 8rem) var(--page-pad) 1.75rem;
}

.footer-cta,
.footer-grid,
.footer-bottom,
.footer-rule {
  width: min(100%, var(--max-width));
  margin-left: auto;
  margin-right: auto;
}

.footer-cta { display: flex; align-items: end; justify-content: space-between; gap: 3rem; }
.footer-cta h2 { max-width: 760px; color: var(--white); font-size: clamp(2.8rem, 5.8vw, 6.25rem); line-height: .94; }
.button-footer { flex: 0 0 auto; border-color: #8f846e; background: transparent; color: var(--white); }
.button-footer:hover { border-color: var(--brass); background: var(--brass); color: var(--ink); }
.footer-rule { height: 1px; margin-top: clamp(3rem, 6vw, 5.5rem); margin-bottom: clamp(3rem, 5vw, 4.5rem); background: rgba(255,255,255,.16); }

.footer-grid { display: grid; grid-template-columns: 1.6fr .8fr 1fr 1.25fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.footer-brand img { width: 112px; height: 112px; object-fit: contain; }
.footer-brand p { max-width: 320px; margin-top: 1rem; color: #aaa9a2; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.footer-group h3 { margin-bottom: .65rem; color: var(--white); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.footer-group a { position: relative; color: #c8c4bb; }
.footer-group a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -.15rem; height: 1px; background: var(--brass); transition: right var(--transition); }
.footer-group a:hover { color: var(--white); }
.footer-group a:hover::after { right: 0; }
.footer-contact a { overflow-wrap: anywhere; }
.footer-contact p { color: #8e918b; }

.footer-bottom { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center; margin-top: clamp(3rem, 6vw, 5.5rem); padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .875rem; }
.footer-bottom span:nth-child(2) { text-align: center; }
.footer-bottom > a { justify-self: end; }
.footer-bottom a { color: #dcc38c; }

/* Motion */
.js-reveal-active .reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.js-reveal-active .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .services-section, .about-section, .contact-section { grid-template-columns: 1fr; }
  .section-heading { position: static; max-width: 650px; }
  .about-section { gap: 4rem; }
  .about-visual { max-width: 760px; }
  .work-heading { align-items: start; flex-direction: column; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --section-space: 4.5rem; }
  h1 { font-size: clamp(3rem, 14vw, 4.6rem); }
  h2 { font-size: clamp(2.25rem, 11vw, 3.4rem); }
  .site-header { height: 72px; }
  .brand img { width: 55px; height: 55px; }
  .hero { height: calc(100dvh - 84px); min-height: 620px; width: calc(100% - 1rem); }
  .hero-video-desktop { display: none; }
  .hero-video-mobile { display: block; }
  .hero-shade { background: linear-gradient(0deg, rgba(12,9,7,.88) 0%, rgba(12,9,7,.38) 65%, rgba(12,9,7,.08) 100%); }
  .hero-copy { left: 1.25rem; right: 1.25rem; bottom: 4.75rem; }
  .hero-intro { margin-top: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: .65rem; margin-top: 1.4rem; }
  .hero-actions .button { width: 100%; }
  .hero-video-controls { right: 1rem; bottom: 1rem; }
  .hero-video-controls { left: 1rem; right: auto; }
  .services-grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-card img { height: 260px; }
  .about-visual { min-height: 470px; }
  .about-image-main { height: 430px; width: 82%; }
  .about-image-accent { width: 48%; height: 210px; border-width: 5px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { height: 480px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-cta { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom span:nth-child(2) { text-align: left; }
  .footer-bottom > a { justify-self: start; }
}

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

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