/* ==========================================================================
   SoilMoisture Equipment Corp. — Global styles
   Clean corporate layout with a classic touch: serif headings, the brand's
   soil-brown and water-blue, and a "soil horizon" stripe as the signature.
   Page-specific styles live in their own files (home.css, …).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours (from the logo and the current site) */
  --soil: #8a4820;
  --soil-dark: #6b3716;
  --clay: #c79a6b;        /* lighter soil tone for stripes */
  --sand: #f3ede4;        /* warm paper background */
  --water: #00a0dc;
  --deep: #023c43;
  --deep-2: #03535c;
  --teal: #0b6b7a;
  --teal-dark: #08525e;

  /* Neutrals */
  --ink: #1f2a2c;
  --text: #4f585b;
  --muted: #868d8f;
  --line: #e2dfd9;
  --white: #ffffff;

  /* Type */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --container: 1170px;
  --gutter: 20px;
  --section-y: 96px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.section {
  padding: var(--section-y) 0;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 1000;
  padding: 8px 14px;
  background: var(--deep);
  color: var(--white);
}

.skip-link:focus {
  left: 10px;
}

/* ---------- Signature: soil horizon stripe ---------- */
.strata {
  display: block;
  height: 6px;
  background: linear-gradient(
    to bottom,
    var(--soil) 0 2px,
    var(--clay) 2px 4px,
    var(--water) 4px 6px
  );
}

/* ---------- Headings ---------- */
.accent {
  font-style: italic;
  font-weight: 500;
  color: var(--soil);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.kicker::before {
  content: "";
  width: 28px;
  height: 6px;
  background: linear-gradient(to bottom, var(--soil) 0 2px, var(--clay) 2px 4px, var(--water) 4px 6px);
}

.kicker--light {
  color: #9fd9ef;
}

.h2 {
  font-size: clamp(32px, 1.9rem + 1.3vw, 46px);
}

/* Section heading with a short intro on the right */
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px 60px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.head__intro {
  max-width: 440px;
  margin: 0;
  font-size: 15px;
}

/* ---------- Buttons (square corners, round arrow chip) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 14px 0 24px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.btn__arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: transform 0.25s;
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--soil {
  background: var(--soil);
  border-color: var(--soil);
}

.btn--soil:hover {
  background: var(--soil-dark);
  border-color: var(--soil-dark);
}

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--outline:hover {
  background: transparent;
  border-color: var(--ink);
}

.btn--light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn--light:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  border-bottom: 1px solid currentColor;
}

.text-link:hover {
  color: var(--soil);
}

/* ---------- Gentle fade-up on scroll (main.js adds .is-in) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 991px) {
  :root {
    --section-y: 70px;
  }
}
