/* ==========================================================================
   424 Apartments — Colors & Type
   Historic preservation meets modern urban living.
   ==========================================================================

   Fonts are loaded from Google Fonts. The PDF brand guide specifies:
     - Playfair Display Regular  → headings, announcements, large type
     - Montserrat Regular        → logo text, subheadings, body

   Note on "custom font" for 424 numerals: the brand guide labels the "424"
   numerals as a custom cut. In digital use we substitute Playfair Display
   (the same serif used for headings), which shares the tall, high-contrast
   proportions seen in the logo. Flag for the brand owner if a true custom
   file exists.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  /* --------------------------------------------------------------------
     CORE PALETTE — Only three brand colors, plus white/cream for breathing room.
     Navy + Gold are primary. Green is ACCENTS ONLY, never dominant.
     -------------------------------------------------------------------- */
  --navy: #0F213B;          /* Dark Blue — primary bg/text/logo */
  --gold: #E4C47B;          /* Gold/Tan — primary bg/text/logo */
  --green: #0C5F38;         /* Dark Green — ACCENTS ONLY */

  --white: #FFFFFF;
  --cream: #F5EFE3;         /* warm off-white, paired with gold */
  --bone:  #EDE6D6;         /* slightly deeper cream, card/section */

  /* Tonal ramps — stay inside the 3-color palette; used sparingly
     for hovers, strokes, subtle surfaces. Never introduce hues outside these. */
  --navy-900: #070F1D;
  --navy-800: #0A1729;
  --navy-700: #0F213B;      /* = --navy */
  --navy-600: #1B3254;
  --navy-500: #2A4774;
  --navy-400: #6E84A4;      /* muted navy for secondary type on light */
  --navy-300: #A9B5C8;
  --navy-200: #D3DAE4;
  --navy-100: #E9ECF2;

  --gold-900: #7A631E;
  --gold-800: #A0853A;
  --gold-700: #C4A65A;
  --gold-600: #E4C47B;      /* = --gold */
  --gold-500: #EBD094;
  --gold-400: #F1DDAE;
  --gold-300: #F6E9C9;
  --gold-200: #FAF1DC;
  --gold-100: #FCF7EB;

  --green-900: #073421;
  --green-800: #0C5F38;     /* = --green */
  --green-700: #157A4B;

  /* --------------------------------------------------------------------
     SEMANTIC COLOR TOKENS
     Light surface = cream/bone/white; dark surface = navy.
     -------------------------------------------------------------------- */

  /* Surfaces */
  --surface-primary: var(--cream);    /* default page on light mode */
  --surface-raised:  var(--white);    /* cards on cream */
  --surface-sunken:  var(--bone);     /* subtle inset */
  --surface-inverse: var(--navy);     /* dark sections */

  /* Foreground on light surfaces */
  --fg-1: var(--navy);                /* primary text */
  --fg-2: var(--navy-600);            /* secondary text */
  --fg-3: var(--navy-400);            /* tertiary / meta */
  --fg-muted: var(--navy-300);        /* placeholder / disabled */

  /* Foreground on dark (navy) surfaces */
  --fg-on-dark-1: var(--cream);
  --fg-on-dark-2: var(--gold);
  --fg-on-dark-3: var(--gold-400);
  --fg-on-dark-muted: var(--navy-300);

  /* Foreground on gold surfaces */
  --fg-on-gold-1: var(--navy);
  --fg-on-gold-2: var(--navy-600);

  /* Accents (use GREEN sparingly — small type, pips, underlines, a single detail) */
  --accent: var(--green);

  /* Borders & rules */
  --rule-1: var(--navy);              /* strong hairline, used editorially */
  --rule-2: var(--navy-200);          /* subtle divider on light */
  --rule-gold: var(--gold);           /* gold hairline for editorial dividers */
  --rule-on-dark: var(--gold);        /* hairline on navy surfaces */

  /* Focus ring (accessibility) */
  --focus-ring: 0 0 0 2px var(--cream), 0 0 0 4px var(--gold);

  /* --------------------------------------------------------------------
     TYPOGRAPHY — Family tokens
     -------------------------------------------------------------------- */
  --font-display: 'Playfair Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-body:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Body base */
  --body-size: 16px;
  --body-line: 1.65;
  --body-weight: 400;

  /* Letter-spacing tokens — Montserrat all-caps requires generous tracking.
     Brand guide specifies letter-spacing 0 for Montserrat in the LOGO. For
     UI labels we widen slightly for legibility. */
  --track-tight: -0.01em;
  --track-normal: 0;
  --track-wide: 0.12em;       /* default Montserrat uppercase */
  --track-wider: 0.22em;      /* editorial caps (tagline, eyebrow) */
  --track-widest: 0.35em;     /* address-line style, very editorial */

  /* --------------------------------------------------------------------
     SPACING — 4px base grid
     -------------------------------------------------------------------- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;

  /* Editorial rhythm — vertical section padding */
  --section-y: clamp(64px, 10vw, 160px);
  --section-x: clamp(24px, 6vw, 96px);

  /* --------------------------------------------------------------------
     RADII — Restrained. The logo uses clipped-corner octagonal geometry;
     in UI we echo that with minimal radii, plus a token for the clipped
     octagon as a path-clip utility.
     -------------------------------------------------------------------- */
  --radius-0: 0;               /* default — editorial, hard corners */
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-3: 8px;             /* max radius in most UI — avoid softer */
  --radius-pill: 999px;        /* rare; only for tiny status pips */

  /* Clipped-corner octagon — matches logo frame geometry */
  --clip-octagon: polygon(
    14px 0, calc(100% - 14px) 0,
    100% 14px, 100% calc(100% - 14px),
    calc(100% - 14px) 100%, 14px 100%,
    0 calc(100% - 14px), 0 14px
  );

  /* --------------------------------------------------------------------
     SHADOWS — Restrained. The aesthetic is editorial/architectural,
     not "floating card." Shadows are subtle and warm, never gray.
     -------------------------------------------------------------------- */
  --shadow-1: 0 1px 0 rgba(15, 33, 59, 0.06);
  --shadow-2: 0 8px 24px -12px rgba(15, 33, 59, 0.18);
  --shadow-3: 0 20px 48px -20px rgba(15, 33, 59, 0.28);
  --shadow-inset-rule: inset 0 -1px 0 var(--navy-200);

  /* --------------------------------------------------------------------
     MOTION — Quiet, deliberate. No bounces.
     -------------------------------------------------------------------- */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --dur-fast: 140ms;
  --dur-base: 260ms;
  --dur-slow: 480ms;

  /* --------------------------------------------------------------------
     LAYOUT
     -------------------------------------------------------------------- */
  --container-max: 1280px;
  --container-wide: 1440px;
  --measure: 68ch;             /* body paragraph max width */
  --measure-narrow: 52ch;      /* editorial pull quotes, eyebrows */
}

/* ==========================================================================
   ELEMENT DEFAULTS — Semantic styles map onto the tokens above
   ========================================================================== */

html {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--fg-1);
  background: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { margin: 0; }

/* Display — Playfair. Always generous line-height; no tight tracking. */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 104px);
  line-height: 1.02;
  letter-spacing: var(--track-tight);
  margin: 0 0 var(--space-6);
  color: var(--fg-1);
  text-wrap: balance;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.08;
  letter-spacing: var(--track-tight);
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.18;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h4, .h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: var(--track-normal);
  margin: 0 0 var(--space-3);
}

/* Eyebrow — the signature Montserrat all-caps label used throughout the brand */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Address-line — very wide tracking, editorial */
.address-line {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: var(--track-widest);
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Body paragraphs */
p, .body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--fg-1);
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
  text-wrap: pretty;
}

.body-sm {
  font-size: 14px;
  line-height: 1.6;
}

.body-lg {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
}

/* Lead paragraph (intro) — Playfair italic, editorial */
.lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--fg-1);
  max-width: var(--measure-narrow);
}

/* Pull-quote display */
.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.18;
  color: var(--fg-1);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}

/* Numerals — when using a huge "424"-style number display */
.numeral {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(96px, 14vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* Links — restrained, underline on hover. No blue. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  transition: color var(--dur-fast) var(--ease-standard),
              text-decoration-color var(--dur-fast) var(--ease-standard);
}
a:hover { text-decoration-color: var(--gold); }

/* Horizontal rule — a 1px navy hairline by default */
hr {
  border: 0;
  height: 1px;
  background: var(--rule-1);
  margin: var(--space-10) 0;
}

/* Selection — gold on navy */
::selection { background: var(--gold); color: var(--navy); }

/* Focus — gold ring */
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Utility: dark section */
.on-dark {
  background: var(--surface-inverse);
  color: var(--fg-on-dark-1);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark p { color: inherit; }
.on-dark .eyebrow, .on-dark .address-line { color: var(--fg-on-dark-2); }

/* Utility: gold section */
.on-gold {
  background: var(--gold);
  color: var(--fg-on-gold-1);
}
