/* ==========================================================================
   Dhanushka Perera Associates — Brand stylesheet
   Colors: brand red #D80001, ink #14110F, paper #FAF8F5
   ========================================================================== */

:root {
  --brand: #d80001;
  --brand-700: #a80000;
  --ink: #14110f;
  --paper: #faf8f5;
  --line: #e7e3dd;
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ---- Display type -------------------------------------------------------- */
.font-display {
  font-family: 'Archivo', system-ui, sans-serif;
}

.display-xl {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-transform: uppercase;
}

.display-lg {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-transform: uppercase;
}

.eyebrow {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

/* ---- Layered background textures ---------------------------------------- */
.bg-grain {
  position: relative;
}
.bg-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.hero-wash {
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(216, 0, 1, 0.14), transparent 60%),
    radial-gradient(900px 600px at 8% 8%, rgba(216, 0, 1, 0.06), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(20, 17, 15, 0.05), transparent 60%);
}

.ink-wash {
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(216, 0, 1, 0.34), transparent 60%),
    radial-gradient(700px 500px at 5% 100%, rgba(255, 255, 255, 0.06), transparent 55%),
    #14110f;
}

/* ---- Image treatments ---------------------------------------------------- */
.img-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-spring);
}
.img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(20, 17, 15, 0.55) 0%, rgba(20, 17, 15, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
.img-frame.tint::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--brand);
  mix-blend-mode: multiply;
  opacity: 0.1;
  pointer-events: none;
}
.group:hover .img-frame img,
.img-hover:hover img {
  transform: scale(1.05);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring),
    background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn:focus-visible {
  outline: 3px solid rgba(216, 0, 1, 0.4);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(216, 0, 1, 0.7);
}
.btn-primary:hover {
  background: #c10001;
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -16px rgba(216, 0, 1, 0.75);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #241f1c;
  transform: translateY(-2px);
}
.btn-dark:active {
  transform: translateY(0);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.btn-ghost:active {
  transform: translateY(0);
}

/* ---- Links --------------------------------------------------------------- */
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--brand);
  transition: width 0.3s var(--ease-spring);
}
.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---- Cards --------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20, 17, 15, 0.04), 0 14px 30px -18px rgba(20, 17, 15, 0.16);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring),
    border-color 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 1px 2px rgba(20, 17, 15, 0.04), 0 30px 60px -24px rgba(20, 17, 15, 0.28);
  border-color: rgba(216, 0, 1, 0.25);
}

/* ---- FAQ (details/summary) ---------------------------------------------- */
.faq {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq .faq-icon {
  flex: none;
  transition: transform 0.3s var(--ease-spring), color 0.3s ease;
  color: var(--brand);
}
.faq[open] .faq-icon {
  transform: rotate(45deg);
}
.faq .faq-body {
  overflow: hidden;
  color: var(--ink);
  opacity: 0.82;
  max-height: 0;
  transition: max-height 0.4s var(--ease-spring), opacity 0.3s ease, padding 0.3s ease;
}
.faq[open] .faq-body {
  max-height: 400px;
  opacity: 0.82;
  padding-bottom: 1.25rem;
}

/* ---- Forms --------------------------------------------------------------- */
.field {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.field::placeholder {
  color: #a9a099;
}
.field:hover {
  border-color: #cfc9c1;
}
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(216, 0, 1, 0.1);
}
.field-label {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* ---- Reveal on scroll ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card,
  .img-frame img {
    transition: none !important;
  }
}

/* ---- Floating action buttons -------------------------------------------- */
.fab-stack {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 9999px;
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(20, 17, 15, 0.5);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
}
.fab:hover {
  transform: translateY(-3px) scale(1.04);
}
.fab:active {
  transform: translateY(0) scale(1);
}
.fab:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}
.fab-whatsapp {
  background: #25d366;
}
.fab-call {
  background: var(--brand);
}

/* ---- Marquee / logo ticker ---------------------------------------------- */
.divider-dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--brand);
  margin-right: 0.6rem;
  vertical-align: middle;
}

/* header */
.site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(20, 17, 15, 0.4);
}

/* mobile menu */
.mobile-menu {
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
}
.mobile-menu.hidden-menu {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
