/* ==========================================================================
   DevLand Solutions — Global Stylesheet
   Shared: variables, typography, navbar, footer, buttons, layout primitives
   ========================================================================== */

/* Fonts are loaded via <link> tags in each page's <head> (with preconnect)
   instead of @import here — @import blocks CSS parsing until the font
   file is fetched, which slows down first paint. See page <head> blocks. */

:root {
  /* Colour system — grounded, surveyor's-map palette */
  --ink: #14171a;
  --charcoal: #40454b;
  --white: #ffffff;
  --paper: #f1efe8;
  --border: #dad4c6;
  --border-strong: #8f8168;
  --accent: #3f5d3a;
  --accent-ink: #2c4228;

  /* Type */
  --font-display: "Manrope", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  /* Layout */
  --max-width: 1180px;
  --max-width-wide: 1680px;
  --radius: 3px;
  --nav-height: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 4.6vw, 4rem);
}
h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
}
h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.accent-text {
  color: var(--accent);
}

p {
  color: var(--charcoal);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Layout helpers --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: clamp(3rem, 6vw, var(--space-2xl)) 0;
}

.section--tight {
  padding: clamp(2.5rem, 5vw, var(--space-xl)) 0;
}

.section--paper {
  background: var(--paper);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 620px;
  margin-bottom: var(--space-lg);
}

.section-head h2 {
  margin-top: var(--space-xs);
}

.section-head p {
  margin-top: var(--space-sm);
  font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

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

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.btn-whatsapp {
  background: #1a7a3d;
  color: #ffffff;
  margin-top: var(--space-sm);
}

.btn-whatsapp:hover {
  background: #146c3a;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Visible focus states throughout */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Scroll reveal (fade + rise on entry) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.catalog-grid [data-reveal]:nth-child(1) {
  transition-delay: 0ms;
}
.catalog-grid [data-reveal]:nth-child(2) {
  transition-delay: 80ms;
}
.catalog-grid [data-reveal]:nth-child(3) {
  transition-delay: 160ms;
}
.catalog-grid [data-reveal]:nth-child(4) {
  transition-delay: 240ms;
}
.catalog-grid [data-reveal]:nth-child(5) {
  transition-delay: 320ms;
}

.pricing-grid [data-reveal]:nth-child(1) {
  transition-delay: 0ms;
}
.pricing-grid [data-reveal]:nth-child(2) {
  transition-delay: 100ms;
}
.pricing-grid [data-reveal]:nth-child(3) {
  transition-delay: 200ms;
}

.process-steps [data-reveal]:nth-child(1) {
  transition-delay: 0ms;
}
.process-steps [data-reveal]:nth-child(2) {
  transition-delay: 70ms;
}
.process-steps [data-reveal]:nth-child(3) {
  transition-delay: 140ms;
}
.process-steps [data-reveal]:nth-child(4) {
  transition-delay: 210ms;
}
.process-steps [data-reveal]:nth-child(5) {
  transition-delay: 280ms;
}

/* --- Background texture utility --- */
.bg-grid {
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -14px -14px;
}

/* --- Photo banner (skyline image + dark scrim + light text) --- */
.photo-banner {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}

.photo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.photo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 26, 0.62);
}

.photo-banner-content {
  position: relative;
  z-index: 1;
}

.photo-banner .eyebrow {
  color: #ffffff;
}

.photo-banner h1,
.photo-banner p {
  color: var(--white);
}

.page-header.photo-banner {
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-lg) 0;
}

/* --- Catalog cards (image-led service/feature cards) --- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.catalog-card {
  border: 1px solid var(--border);
  background: var(--white);
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.catalog-card:hover {
  box-shadow: 0 10px 26px rgba(20, 23, 26, 0.08);
  transform: translateY(-3px);
}

.catalog-card--featured {
  grid-column: span 2;
}

.catalog-card--featured .catalog-card-image {
  aspect-ratio: 21 / 9;
}

@media (max-width: 900px) {
  .catalog-card--featured {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .catalog-card--featured {
    grid-column: span 1;
  }

  .catalog-card--featured .catalog-card-image {
    aspect-ratio: 4 / 3;
  }
}

.catalog-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.catalog-card-image > img,
.service-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.catalog-card-body {
  padding: var(--space-md);
}

.catalog-card-body h3 {
  margin-bottom: 0.35rem;
}

.catalog-card-body p {
  font-size: 0.92rem;
  margin-bottom: var(--space-sm);
}

/* --- Process section (image + numbered steps) --- */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: start;
}

.process-image {
  position: relative;
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.process-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.process-steps {
  display: flex;
  flex-direction: column;
}

.process-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.process-step:last-child {
  border-bottom: none;
}

.process-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.process-step h3 {
  margin-bottom: 0.25rem;
}

.process-step p {
  font-size: 0.92rem;
}

/* --- Cookie consent banner --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner-text p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-banner-text a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-banner .btn-secondary {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.cookie-banner .btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 700px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    justify-content: stretch;
  }

  .cookie-banner-actions .btn {
    flex: 1;
  }
}

/* --- WhatsApp floating action button --- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a7a3d;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(20, 23, 26, 0.28);
  z-index: 90;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 23, 26, 0.32);
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 600px) {
  .whatsapp-fab {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-fab svg {
    width: 25px;
    height: 25px;
  }
}

/* --- Image placeholder (swap out for a real photo) --- */
.image-placeholder {
  position: relative;
  background: var(--paper);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--charcoal);
  width: 100%;
  height: 100%;
}

.image-placeholder svg {
  width: 30px;
  height: 30px;
  opacity: 0.45;
}

.image-placeholder span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
}

.catalog-card-image .card-index {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  z-index: 1;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  flex-shrink: 0;
}

.nav-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--ink);
}

.nav-links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: var(--space-md) var(--space-md);
  overflow-y: auto;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .btn {
  display: flex;
  width: min(100%, 240px);
  margin: var(--space-md) auto 0;
  justify-content: center;
  background: var(--ink);
  position: relative;
  z-index: 1;
}

body.menu-open {
  overflow: hidden;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.footer-brand .nav-logo {
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: var(--space-sm);
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.95rem;
  color: var(--charcoal);
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--charcoal);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-legal-links a {
  color: var(--charcoal);
  transition: color 0.15s ease;
}

.footer-legal-links a:hover {
  color: var(--ink);
}

.footer-legal-links button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--charcoal);
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-legal-links button:hover {
  color: var(--ink);
}

/* --- Shared form elements --- */
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  margin-bottom: var(--space-md);
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field .required {
  color: var(--accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field-error {
  display: none;
  font-size: 0.82rem;
  color: #b3261e;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #b3261e;
}

.field.has-error .field-error {
  display: block;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links,
  .nav-actions .btn {
    display: none;
  }

  .nav-right {
    gap: var(--space-sm);
    margin-left: auto;
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .footer-legal-links {
    width: 100%;
    display: grid;
    gap: 0.35rem;
  }

  .footer-legal-links a,
  .footer-legal-links button {
    display: block;
    width: 100%;
    padding: 0.35rem 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .section {
    padding: 3rem 0;
  }
}
