/* ==========================================================================
   Aswini Diagnostics — Shared Stylesheet
   Tailwind handles layout/spacing/typography-sizing/hover/shadows/gradients.
   This file: design tokens + genuinely-custom behavior only.
   ========================================================================== */

:root {
  /* Brand colours */
  --color-primary: #0F5C57;
  --color-secondary: #0B3D57;
  --color-accent: #D98E33;
  --color-neutral-dark: #12201E;
  --color-neutral-light: #F6F4EF;

  /* Semantic aliases */
  --color-bg: var(--color-neutral-light);
  --color-text: var(--color-neutral-dark);
  --color-surface: #FFFFFF;
  --color-border: #E4E0D6;
  --color-link: var(--color-accent);

  /* Fonts */
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  /* Type scale (desktop) */
  --h1-size: 56px;
  --h1-mobile: 34px;
  --h1-line: 1.1;

  --h2-size: 40px;
  --h2-mobile: 28px;
  --h2-line: 1.15;

  --h3-size: 28px;
  --h3-mobile: 22px;
  --h3-line: 1.2;

  --body-size: 17px;
  --body-mobile: 16px;
  --body-line: 1.65;

  --small-size: 14px;
  --small-mobile: 13px;
  --small-line: 1.6;

  /* Spacing scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  --section-padding-desktop: 96px;
  --section-padding-mobile: 56px;
  --container-max: 1200px;

  /* Card */
  --card-radius: 16px;
  --card-shadow: 0 4px 16px rgba(15, 92, 87, 0.10);
  --card-padding: 32px;
  --card-border: 1px solid #E4E0D6;

  /* Breakpoints (reference only, used in media queries below) */
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--body-mobile);
  line-height: var(--body-line);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body {
    font-size: var(--body-size);
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin: 0;
  color: var(--color-neutral-dark);
}

h1 { font-size: var(--h1-mobile); line-height: var(--h1-line); }
h2 { font-size: var(--h2-mobile); line-height: var(--h2-line); }
h3 { font-size: var(--h3-mobile); line-height: var(--h3-line); }

@media (min-width: 768px) {
  h1 { font-size: var(--h1-size); }
  h2 { font-size: var(--h2-size); }
  h3 { font-size: var(--h3-size); }
}

small { font-size: var(--small-mobile); line-height: var(--small-line); }
@media (min-width: 768px) {
  small { font-size: var(--small-size); }
}

p { margin: 0 0 1em; }

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

a {
  color: var(--color-link);
  text-decoration: none;
}

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

input, textarea {
  font-family: inherit;
  font-size: var(--body-size);
}

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

/* ==========================================================================
   Site Header — sticky, scroll-aware
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-neutral-light);
  border-bottom: 1px solid transparent;
  transition: box-shadow 200ms ease, padding 200ms ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: padding 200ms ease;
}

.site-header.is-scrolled .header-inner {
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Nav list base (desktop shows inline via Tailwind utilities in markup) */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-neutral-dark);
  font-weight: 500;
  transition: color 150ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-primary);
}

/* ==========================================================================
   Mobile nav toggle — hamburger to X
   ========================================================================== */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-neutral-dark);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--color-neutral-light);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
    z-index: 45;
  }

  .site-nav.is-open {
    max-height: 600px;
  }

  .site-nav .nav-list {
    display: flex;
    flex-direction: column;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
  }

  .site-nav .btn {
    margin: var(--space-1) var(--space-3) var(--space-3);
  }
}

@media (min-width: 1024px) {
  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }

  .site-nav .nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
  }
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: transparent;
  border: none;
  text-align: left;
  padding: var(--space-3) 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-neutral-dark);
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-primary);
  top: 50%;
  left: 50%;
  transition: transform 250ms ease;
}

.faq-icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq-item.is-open .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding-bottom: var(--space-3);
  color: #3a4644;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

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

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

/* ==========================================================================
   Buttons — base contract (Tailwind adds most of this, kept minimal here
   to guarantee radius/transition even if a utility is missed)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  min-height: 44px;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease, background-color 200ms ease, color 200ms ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-neutral-dark);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: var(--color-neutral-light);
}

.btn-ghost {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* ==========================================================================
   Form fields — base
   ========================================================================== */

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  background-color: #ffffff;
  color: var(--color-neutral-dark);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 92, 87, 0.15);
}

/* ==========================================================================
   Decorative motif watermark helper
   ========================================================================== */

.motif-watermark {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.motif-watermark svg {
  position: absolute;
  opacity: 0.08;
}