/*
 * Author: Manoj Mathangadeera
 * Contact: aivotandra@gmail.com / www.aivotandra.com
 * Company: Adeon Bridge Technology - Dubai, UAE / www.adeon.ae
 * Copyright (c) 2026 Manoj Mathangadeera. All rights reserved.
 *
 * Project: JJ Prime Properties
 * Client: ATTESTAR Private Limited - Sri Lanka
 *
 * File Name: assets/css/base.css
 * File Description: Base styles: CSS reset, design tokens (color, typography, spacing), and foundational typography rules.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[class], ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Design tokens ---- */
:root {
  /* Color — drawn from the JJ Prime logo */
  --color-ink: #0f0f0f;          /* primary text / near-black */
  --color-charcoal: #2b2b2b;     /* secondary dark */
  --color-slate: #565656;        /* muted text */
  --color-mist: #d1d1d1;         /* light neutral / borders */
  --color-paper: #f7f5f2;        /* warm off-white background */
  --color-white: #ffffff;

  --color-gold-deep: #b17c41;
  --color-gold-mid: #e0b37b;
  --color-gold-light: #ffcf3f;
  --gradient-gold: linear-gradient(120deg, var(--color-gold-deep) 0%, var(--color-gold-mid) 55%, var(--color-gold-light) 100%);

  --color-success: #3a6b4c;
  --color-error: #a53b3b;

  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-h1: clamp(2.5rem, 1.9rem + 2.6vw, 4.5rem);
  --fs-h2: clamp(1.9rem, 1.55rem + 1.6vw, 3rem);
  --fs-h3: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
  --fs-h4: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  --fs-body-lg: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8rem;

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --container-max: 1240px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 2px;
  --radius-md: 4px;
  --border-hairline: 1px solid rgba(15, 15, 15, 0.12);

  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 180ms;
  --duration-med: 320ms;
}

/* ---- Base typography ---- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; }

p {
  max-width: 62ch;
}

p.lead {
  font-size: var(--fs-body-lg);
  color: var(--color-slate);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gradient-gold);
}

/* ---- Focus visibility (dark/gold palette needs a clear ring) ---- */
:focus-visible {
  outline: 2px solid var(--color-gold-deep);
  outline-offset: 3px;
}

/* ---- Selection ---- */
::selection {
  background: var(--color-gold-light);
  color: var(--color-ink);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-sm);
}
