/* ==========================================================================
   Pacific Hawk Ventures — Main Stylesheet
   styles/main.css
   Version 1.0 | April 2026
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS — All values defined once, used everywhere
   ========================================================================== */

:root {

  /* --- Color Palette --- */
  --color-base:          #f7f4ef;   /* Warm off-white — page background */
  --color-base-subtle:   #f0ece4;   /* Slightly deeper warm white — alternate section bg */
  --color-base-wash:     #e8e3da;   /* Warm wash — borders, dividers, card backgrounds */

  --color-navy:          #1b2f4b;   /* Deep navy — primary text, headings */
  --color-navy-mid:      #2c4163;   /* Mid navy — hover states, secondary headings */
  --color-navy-light:    #3d5478;   /* Light navy — supporting text on dark backgrounds */

  --color-green:         #2d5a3d;   /* Deep pine green — primary accent */
  --color-green-mid:     #3d7a54;   /* Mid green — hover states */
  --color-green-light:   #4e9a6b;   /* Light green — supporting accents */
  --color-green-pale:    #d4e8db;   /* Pale green — backgrounds, subtle highlights */

  --color-text:          #2a2a28;   /* Near-black warm — primary body text */
  --color-text-muted:    #6b6b63;   /* Warm mid-grey — captions, metadata, supporting copy */
  --color-text-light:    #9a9a90;   /* Warm light-grey — placeholders, disabled states */
  --color-text-inverse:  #f7f4ef;   /* Inverse text on dark backgrounds */

  --color-border:        #e2ddd5;   /* Warm border — cards, dividers, table rules */
  --color-border-mid:    #cdc7bc;   /* Mid border — stronger visual separators */

  --color-white:         #ffffff;
  --color-black:         #000000;

  /* Semantic intent aliases */
  --color-surface:       var(--color-base);
  --color-surface-raised: var(--color-white);
  --color-primary:       var(--color-navy);
  --color-accent:        var(--color-green);
  --color-link:          var(--color-green);
  --color-link-hover:    var(--color-green-mid);
  --color-focus:         var(--color-green);


  /* --- Typography --- */
  --font-sans:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-fallback: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --font-weight-regular:   400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;

  /* Type Scale — fluid between 375px and 1440px using clamp()
     Base: 16px (1rem). Scale ratio: ~1.25 Major Third */
  --text-xs:    clamp(0.688rem, 0.65rem + 0.19vw,  0.75rem);    /*  11–12px */
  --text-sm:    clamp(0.813rem, 0.77rem + 0.22vw,  0.875rem);   /*  13–14px */
  --text-base:  clamp(0.9375rem, 0.89rem + 0.24vw, 1rem);       /*  15–16px */
  --text-md:    clamp(1rem, 0.93rem + 0.34vw,      1.125rem);   /*  16–18px */
  --text-lg:    clamp(1.125rem, 1.02rem + 0.53vw,  1.375rem);   /*  18–22px */
  --text-xl:    clamp(1.25rem, 1.09rem + 0.83vw,   1.75rem);    /*  20–28px */
  --text-2xl:   clamp(1.5rem,  1.24rem + 1.3vw,    2.25rem);    /*  24–36px */
  --text-3xl:   clamp(1.875rem, 1.46rem + 2.06vw,  3rem);       /*  30–48px */
  --text-4xl:   clamp(2.25rem,  1.64rem + 3.05vw,  4rem);       /*  36–64px */
  --text-5xl:   clamp(2.75rem,  1.83rem + 4.6vw,   5.5rem);     /*  44–88px */

  --line-height-tight:    1.15;
  --line-height-snug:     1.3;
  --line-height-normal:   1.5;
  --line-height-relaxed:  1.65;
  --line-height-loose:    1.8;

  --letter-spacing-tight:   -0.03em;
  --letter-spacing-snug:    -0.02em;
  --letter-spacing-normal:   0em;
  --letter-spacing-wide:     0.04em;
  --letter-spacing-wider:    0.08em;
  --letter-spacing-widest:   0.14em;


  /* --- Spacing Scale — 4px base unit --- */
  --space-1:    0.25rem;   /*  4px */
  --space-2:    0.5rem;    /*  8px */
  --space-3:    0.75rem;   /* 12px */
  --space-4:    1rem;      /* 16px */
  --space-5:    1.25rem;   /* 20px */
  --space-6:    1.5rem;    /* 24px */
  --space-8:    2rem;      /* 32px */
  --space-10:   2.5rem;    /* 40px */
  --space-12:   3rem;      /* 48px */
  --space-14:   3.5rem;    /* 56px */
  --space-16:   4rem;      /* 64px */
  --space-20:   5rem;      /* 80px */
  --space-24:   6rem;      /* 96px */
  --space-28:   7rem;      /* 112px */
  --space-32:   8rem;      /* 128px */
  --space-40:   10rem;     /* 160px */
  --space-48:   12rem;     /* 192px */

  /* Fluid section padding — shrinks on mobile */
  --section-pad-y:  clamp(var(--space-16), 8vw, var(--space-40));
  --section-pad-x:  clamp(var(--space-6),  5vw, var(--space-20));


  /* --- Layout --- */
  --container-max:       1280px;
  --container-wide:      1440px;
  --container-narrow:    720px;
  --container-prose:     640px;

  --grid-gutter:         clamp(var(--space-4), 2.5vw, var(--space-10));

  --nav-height:          72px;
  --nav-height-scrolled: 60px;


  /* --- Border Radius --- */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    20px;
  --radius-full:  9999px;


  /* --- Shadows --- */
  --shadow-xs:   0 1px 2px rgba(27, 47, 75, 0.06);
  --shadow-sm:   0 2px 8px rgba(27, 47, 75, 0.08);
  --shadow-md:   0 4px 16px rgba(27, 47, 75, 0.10);
  --shadow-lg:   0 8px 32px rgba(27, 47, 75, 0.12);
  --shadow-xl:   0 16px 56px rgba(27, 47, 75, 0.14);

  /* Elevation — contextual aliases */
  --shadow-card:    var(--shadow-sm);
  --shadow-nav:     0 1px 0 var(--color-border);
  --shadow-nav-scrolled: 0 2px 12px rgba(27, 47, 75, 0.08);


  /* --- Transitions --- */
  --duration-fast:    150ms;
  --duration-base:    250ms;
  --duration-slow:    400ms;
  --duration-slower:  600ms;

  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --transition-base:   var(--duration-base) var(--ease-default);
  --transition-fast:   var(--duration-fast) var(--ease-out);
  --transition-slow:   var(--duration-slow) var(--ease-out);


  /* --- Z-Index Scale --- */
  --z-below:    -1;
  --z-base:      0;
  --z-raised:    10;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
}


/* ==========================================================================
   2. MODERN CSS RESET
   ========================================================================== */

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

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Document */
html {
  font-size: 100%; /* 16px base — enables rem calculations */
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

/* Body */
body {
  min-height: 100dvh;
  background-color: var(--color-base);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typography reset */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-snug);
}

/* Inherit fonts for form elements */
input, button, textarea, select {
  font: inherit;
}

/* Remove list styles on ul, ol elements with list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Remove list styles for nav lists */
nav ul,
nav ol {
  list-style: none;
}

/* Media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  font-style: italic; /* Styles broken image alt text */
}

/* Avoid text overflow */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Balanced headlines */
h1, h2, h3 {
  text-wrap: balance;
}

/* Nicer paragraph wrapping */
p {
  text-wrap: pretty;
  max-width: 72ch; /* Optimal reading line length */
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

/* Buttons */
button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  color: inherit;
}

/* Remove spinner on number inputs */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* SVG fill inheritance */
svg {
  fill: currentColor;
}

/* Remove animation for users who prefer it */
@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;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

/* Skip to main content — hidden until focused */
.skip-link {
  position: absolute;
  top: -999px;
  left: -999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  z-index: 9999;
  padding: 12px 24px;
  background: #1b2f4b;
  color: #f7f4ef;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Focus styles — visible, consistent, branded */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove default focus for non-keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Screen reader only — visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Allow sr-only elements to become visible on focus */
.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* ==========================================================================
   4. TYPOGRAPHY — Semantic classes for the PHV type system
   ========================================================================== */

/* Display headlines */
.text-display {
  font-family: var(--font-sans);
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-navy);
}

.text-h1 {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-navy);
}

.text-h2 {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-snug);
  color: var(--color-navy);
}

.text-h3 {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-snug);
  color: var(--color-navy);
}

.text-h4 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-navy);
}

/* Section label — the small uppercase tag above a section headline */
.text-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--color-green);
}

/* Body variants */
.text-lead {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.text-body {
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.text-small {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-muted);
}

.text-caption {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-muted);
}

/* Stat display — large number in stat cards */
.text-stat {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-navy);
}

/* Color modifiers */
.text-navy   { color: var(--color-navy); }
.text-green  { color: var(--color-green); }
.text-muted  { color: var(--color-text-muted); }
.text-light  { color: var(--color-text-light); }
.text-inverse { color: var(--color-text-inverse); }

/* Weight modifiers */
.font-regular  { font-weight: var(--font-weight-regular); }
.font-medium   { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }

/* Alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }


/* ==========================================================================
   5. LAYOUT — Container and grid system
   ========================================================================== */

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

.container--wide {
  max-width: var(--container-wide);
}

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

.container--prose {
  max-width: var(--container-prose);
}

/* Full bleed — breaks out of container */
.full-bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* Section wrapper */
.section {
  padding-block: var(--section-pad-y);
}

.section--flush-top {
  padding-top: 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

/* Section backgrounds */
.section--base    { background-color: var(--color-base); }
.section--subtle  { background-color: var(--color-base-subtle); }
.section--navy    { background-color: var(--color-navy); color: var(--color-text-inverse); }
.section--green   { background-color: var(--color-green); color: var(--color-text-inverse); }

/* Grid — flexible column system */
.grid {
  display: grid;
  gap: var(--grid-gutter);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Auto-responsive grid — no media queries needed */
.grid--auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.grid--auto-md {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid--auto-lg {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
}

/* Flex helpers */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }


/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* PHV Breakpoint Map:
   xs:  0–479px    (small phones)
   sm:  480–767px  (large phones)
   md:  768–1023px (tablets)
   lg:  1024–1279px (small desktops)
   xl:  1280px+    (wide desktops)
*/

/* Collapse 2-col grids to single column on small screens */
@media (max-width: 767px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* 3 and 4-col grids go to 2 on tablet */
@media (min-width: 480px) and (max-width: 1023px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 4-col goes to 3 on desktop */
@media (min-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Show/hide utilities */
.hide-mobile { display: none; }

@media (min-width: 768px) {
  .hide-mobile { display: revert; }
  .hide-desktop { display: none; }
}

/* Project page — hide decorative subhead dots on mobile to prevent orphaned layout */
@media (max-width: 767px) {
  .project-hero__subhead-dot {
    display: none;
  }
}


/* ==========================================================================
   7. BASE ELEMENT STYLES
   ========================================================================== */

/* Headings — semantic defaults */
h1 { font-size: var(--text-4xl); font-weight: var(--font-weight-semibold); letter-spacing: var(--letter-spacing-tight); line-height: var(--line-height-tight); }
h2 { font-size: var(--text-3xl); font-weight: var(--font-weight-semibold); letter-spacing: var(--letter-spacing-snug); line-height: var(--line-height-snug); }
h3 { font-size: var(--text-2xl); font-weight: var(--font-weight-medium); letter-spacing: var(--letter-spacing-snug); line-height: var(--line-height-snug); }
h4 { font-size: var(--text-xl);  font-weight: var(--font-weight-medium); letter-spacing: var(--letter-spacing-normal); }
h5 { font-size: var(--text-lg);  font-weight: var(--font-weight-medium); }
h6 { font-size: var(--text-base); font-weight: var(--font-weight-semibold); letter-spacing: var(--letter-spacing-wide); text-transform: uppercase; }

/* Paragraph spacing in prose contexts */
.prose p + p {
  margin-top: var(--space-5);
}

.prose p {
  max-width: 65ch;
  line-height: var(--line-height-relaxed);
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--color-green);
  padding-left: var(--space-6);
  margin-inline: 0;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* Strong / Bold */
strong, b {
  font-weight: var(--font-weight-semibold);
}

/* Inline code */
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background-color: var(--color-base-wash);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  color: var(--color-navy);
}

/* Figure / Caption */
figure {
  margin: 0;
}

figcaption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  text-align: center;
}

/* Tables */
table {
  width: 100%;
  font-size: var(--text-sm);
}

thead th {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

tbody td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}


/* ==========================================================================
   8. DIVIDER & DECORATION UTILITIES
   ========================================================================== */

.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  margin-block: var(--space-10);
}

.divider--short {
  width: 48px;
  height: 2px;
  background-color: var(--color-green);
  margin-block: var(--space-6);
}

/* Section eyebrow — green rule + label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-green);
  flex-shrink: 0;
}


/* ==========================================================================
   9. SPACING UTILITY CLASSES
   ========================================================================== */

.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.pt-0  { padding-top: 0; }
.pb-0  { padding-bottom: 0; }


/* ==========================================================================
   EOF — styles/main.css
   Component styles will be added in subsequent build phases.
   Next: Navigation + Header component styles.
   ========================================================================== */
