/* ============================================================
   BASE — Ridgeline Land Clearing
   Design tokens, reset, typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;1,700&family=Barlow:wght@300;400;500;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Custom Properties ───────────────────────────────────── */
:root {
  /* Core palette */
  --ink:          #0C1A0C;
  --ink-mid:      #1B3A1B;
  --ink-light:    #2C4A2C;
  --amber:        #D4891A;
  --amber-dark:   #A86A0F;
  --amber-light:  #F0B048;
  --rust:         #8B3D1A;
  --sage:         #5A7A4A;
  --cream:        #F4EFE6;
  --cream-dark:   #EAE2D4;
  --paper:        #FAF8F4;
  --body-text:    #2A2A2A;
  --body-muted:   #5C5C5C;
  --white:        #FFFFFF;
  --border:       rgba(0,0,0,.10);
  --border-light: rgba(255,255,255,.15);

  /* Typography */
  --font-display:  'Barlow Condensed', sans-serif;
  --font-body:     'Barlow', sans-serif;
  --font-reading:  'DM Sans', sans-serif;

  /* Sizing scale */
  --step--1: clamp(.8rem,   1.5vw, .9rem);
  --step-0:  clamp(.95rem,  1.8vw, 1.05rem);
  --step-1:  clamp(1.1rem,  2vw,   1.25rem);
  --step-2:  clamp(1.3rem,  2.5vw, 1.6rem);
  --step-3:  clamp(1.7rem,  3.5vw, 2.2rem);
  --step-4:  clamp(2.2rem,  5vw,   3.2rem);
  --step-5:  clamp(3rem,    7vw,   5rem);
  --step-6:  clamp(4rem,    10vw,  7.5rem);

  /* Spacing */
  --space-xs:  .5rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --container:  1240px;
  --gutter:     clamp(1.75rem, 5vw, 2.5rem);
  --radius-s:   4px;
  --radius-m:   8px;
  --radius-l:   16px;

  /* Shadows */
  --shadow-s: 0 2px 8px rgba(0,0,0,.08);
  --shadow-m: 0 6px 24px rgba(0,0,0,.12);
  --shadow-l: 0 16px 56px rgba(0,0,0,.18);
  --shadow-amber: 0 8px 28px rgba(212,137,26,.35);

  /* Transitions */
  --ease: cubic-bezier(.25,.46,.45,.94);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --dur-s: 180ms;
  --dur-m: 300ms;
  --dur-l: 500ms;
}

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

html, body {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  color: var(--body-text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

::selection {
  background: var(--amber);
  color: var(--white);
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--ink);
}

h1 { font-size: var(--step-5); font-weight: 800; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); font-weight: 600; }
h5 { font-size: var(--step-1); font-weight: 600; }
h6 { font-size: var(--step-0); font-weight: 600; }

p {
  font-family: var(--font-reading);
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--body-muted);
  line-height: 1.75;
  max-width: 68ch;
}

strong { font-weight: 600; color: var(--body-text); }

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

.container--narrow {
  max-width: 860px;
}

.container--wide {
  max-width: 1400px;
}

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

.text-center { text-align: center; }
.text-left   { text-align: left; }

.label-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
}

.label-tag::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--amber);
  flex-shrink: 0;
}

.label-tag--light {
  color: var(--amber-light);
}
.label-tag--light::before {
  background: var(--amber-light);
}

/* ── Scroll reveal ───────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-l) var(--ease),
              transform var(--dur-l) var(--ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-32px);
}
[data-reveal="left"].revealed {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(32px);
}
[data-reveal="right"].revealed {
  transform: translateX(0);
}

/* On mobile, replace horizontal reveals with vertical to prevent overflow */
@media (max-width: 768px) {
  [data-reveal="left"],
  [data-reveal="right"] {
    transform: translateY(20px);
  }
  [data-reveal="left"].revealed,
  [data-reveal="right"].revealed {
    transform: translateY(0);
  }
}

[data-delay="1"] { transition-delay: .1s; }
[data-delay="2"] { transition-delay: .2s; }
[data-delay="3"] { transition-delay: .3s; }
[data-delay="4"] { transition-delay: .4s; }
[data-delay="5"] { transition-delay: .5s; }

/* ── Section spacing ─────────────────────────────────────── */
.section {
  padding-block: var(--space-3xl);
}

.section--tight {
  padding-block: var(--space-2xl);
}

@media (max-width: 1024px) {
  .section { padding-block: 4rem; }
  .section--tight { padding-block: 3rem; }
}

.section--dark {
  background: var(--ink);
  color: var(--white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--dark p {
  color: rgba(255,255,255,.7);
}

.section--cream {
  background: var(--cream);
}

.section--paper {
  background: var(--paper);
}

.section--ink-mid {
  background: var(--ink-mid);
  color: var(--white);
}

/* ── Clip shapes ─────────────────────────────────────────── */
.clip-bottom {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  padding-bottom: calc(var(--space-3xl) + 4vw);
}

.clip-top {
  clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
  padding-top: calc(var(--space-3xl) + 4vw);
  margin-top: -3vw;
}

.clip-both {
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  padding-block: calc(var(--space-3xl) + 3vw);
  margin-block: -2vw;
}

/* ── Phone link ──────────────────────────────────────────── */
.phone-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--amber);
  letter-spacing: .02em;
  transition: color var(--dur-s);
}

.phone-link:hover { color: var(--amber-dark); }
