/* ==========================================================================
   THE DALY GROUP  -  Base styles
   Atlantic navy + brushed brass + sand. Editorial, restrained, luxury broker.
   ========================================================================== */

:root {
  /* Type scale  -  fluid */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* Spacing  -  4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Brand color tokens */
  --atlantic: #0E2A3A;          /* primary navy */
  --atlantic-deep: #081A26;     /* deeper for shadows */
  --channel: #1B3D4F;            /* mid navy */
  --brass: #B5895A;              /* signature accent */
  --brass-deep: #936B41;         /* hover */
  --brass-soft: #D4B58E;         /* tint */
  --sand: #EFE8DC;               /* warm off-white */
  --sand-2: #F6F2E9;             /* lighter sand */
  --ink: #2A2A2A;                /* charcoal text */
  --mist: #8A8F94;               /* secondary text */
  --line: #D7CFC1;               /* hairline divider */
  --white: #FFFFFF;

  /* Light mode (default) */
  --color-bg: var(--sand-2);
  --color-surface: var(--white);
  --color-surface-2: var(--sand);
  --color-text: var(--ink);
  --color-text-muted: var(--mist);
  --color-text-faint: #B0AFA9;
  --color-accent: var(--brass);
  --color-accent-hover: var(--brass-deep);
  --color-dark: var(--atlantic);
  --color-divider: var(--line);

  /* Radius  -  restrained */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows  -  subtle, warm */
  --shadow-sm: 0 1px 2px rgba(14, 42, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 42, 58, 0.08);
  --shadow-lg: 0 24px 48px rgba(14, 42, 58, 0.14);

  /* Content widths */
  --content-narrow: 720px;
  --content-default: 1100px;
  --content-wide: 1400px;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Garamond', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme='dark'] {
  --color-bg: var(--atlantic);
  --color-surface: var(--channel);
  --color-surface-2: #14334A;
  --color-text: var(--sand);
  --color-text-muted: #9DB1BC;
  --color-text-faint: #6E848F;
  --color-divider: rgba(181, 137, 90, 0.25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-dark);
}

[data-theme='dark'] h1, [data-theme='dark'] h2,
[data-theme='dark'] h3, [data-theme='dark'] h4,
[data-theme='dark'] h5, [data-theme='dark'] h6 {
  color: var(--sand);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent); }

::selection { background: var(--brass-soft); color: var(--atlantic); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* Eyebrow / Kicker  -  small caps brass label above headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.eyebrow--inverse { color: var(--brass-soft); }

/* Brass thin divider */
.brass-rule {
  width: 64px;
  height: 1px;
  background: var(--color-accent);
  border: 0;
  margin: var(--space-6) 0;
}

.brass-rule--center { margin-left: auto; margin-right: auto; }

/* Container */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-12));
}

.container--narrow { max-width: var(--content-default); }
.container--reading { max-width: var(--content-narrow); }

/* Sections */
section { padding-block: clamp(var(--space-16), 8vw, var(--space-32)); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--atlantic);
  color: var(--sand);
  border: 1px solid var(--atlantic);
}
.btn--primary:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--atlantic);
}
.btn--ghost {
  background: transparent;
  color: var(--atlantic);
  border: 1px solid var(--atlantic);
}
.btn--ghost:hover {
  background: var(--atlantic);
  color: var(--sand);
}
.btn--brass {
  background: var(--brass);
  color: var(--atlantic);
  border: 1px solid var(--brass);
}
.btn--brass:hover {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: var(--sand);
}
.btn--inverse {
  background: transparent;
  color: var(--sand);
  border: 1px solid var(--brass);
}
.btn--inverse:hover {
  background: var(--brass);
  color: var(--atlantic);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 242, 233, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition: all var(--transition);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-header__brand img {
  height: 44px;
  width: auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--atlantic);
  position: relative;
  padding-block: var(--space-2);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width var(--transition);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { width: 100%; }
.site-nav a[aria-current="page"] { color: var(--brass-deep); }
.site-header__contact {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--atlantic);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.site-header__contact strong { color: var(--brass-deep); letter-spacing: 0.04em; }

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--atlantic);
  border-radius: var(--radius-sm);
  color: var(--atlantic);
}

@media (max-width: 880px) {
  .site-nav, .site-header__contact { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sand-2);
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-divider);
    gap: var(--space-4);
  }
}

/* Footer */
.site-footer {
  background: var(--atlantic);
  color: var(--sand);
  padding-block: var(--space-20) var(--space-8);
}
.site-footer h4 {
  color: var(--brass-soft);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(181, 137, 90, 0.25);
}
@media (max-width: 880px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer__brand img { height: 60px; width: auto; margin-bottom: var(--space-5); }
.site-footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--brass-soft);
  margin-bottom: var(--space-4);
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer ul a { font-size: var(--text-sm); color: var(--sand); }
.site-footer ul a:hover { color: var(--brass-soft); }
.site-footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: rgba(239, 232, 220, 0.6);
  letter-spacing: 0.04em;
}

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.social-links a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(181, 137, 90, 0.4);
  border-radius: var(--radius-sm);
  color: var(--brass-soft);
  transition: all var(--transition);
}
.social-links a:hover {
  background: var(--brass);
  color: var(--atlantic);
  border-color: var(--brass);
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brass);
}
.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--atlantic);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: var(--space-6); }
.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--atlantic);
}
.card__meta {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.card__price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--brass-deep);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-2);
}
.card__location {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--atlantic);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.card__cta::after {
  content: '→';
  transition: transform var(--transition);
}
.card:hover .card__cta::after { transform: translateX(4px); }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
