/*--------------------------------------------------------------
# Square Construction — design system · base
# Typography, section rhythm, navigation, hero, buttons.
--------------------------------------------------------------*/
@import url("tokens.css");

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h4,
h5,
h6 {
  font-family: var(--font-body);
}

section {
  padding: 88px 0;
  overflow: hidden;
}

.section-bg {
  background-color: var(--tint);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 2000;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

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

:focus-visible {
  outline: 3px solid var(--safety);
  outline-offset: 3px;
  border-radius: 6px;
}

/*--------------------------------------------------------------
# Section titles — one eyebrow, one title. No extra rules.
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 40px;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin-bottom: 12px;
}

/* The signature hazard tick, used sparingly */
.eyebrow::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
  background: repeating-linear-gradient(
    -45deg,
    var(--safety) 0 3px,
    var(--safety-ink) 3px 6px
  );
}

.section-title h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 12px;
}

.section-title p {
  margin: 0;
  font-size: 1.06rem;
  color: var(--muted);
}

/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/
.navbar {
  padding: 14px 0;
  background-color: var(--nav-bg);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(35, 30, 18, 0.06);
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 64px;
}

.navbar.navbar-scrolled {
  padding: 8px 0;
  box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(35, 30, 18, 0.1);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.navbar-brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.navbar-light .navbar-nav .nav-link {
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  border-radius: 8px;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--ember-deep);
  text-decoration: none;
}

.navbar-light .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 6px;
  left: 14px;
  background-color: var(--safety);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
  width: calc(100% - 28px);
}

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
.hero {
  width: 100%;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background:
    var(--grid-tile),
    radial-gradient(1100px 500px at 85% 10%, var(--hero-glow) 0%, transparent 60%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  background-size: 48px 48px, auto, auto;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  background: var(--pill-bg);
  border: 1px solid var(--line);
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-eyebrow .tick {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex: none;
  background: repeating-linear-gradient(
    -45deg,
    var(--safety) 0 3px,
    var(--safety-ink) 3px 6px
  );
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 5.4vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-sub {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

/* Primary action: safety-orange fill, dark text (4.8:1). One per view. */
.btn-primary {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  color: var(--safety-ink);
  background: var(--safety);
  border: none;
  box-shadow: 0 8px 22px rgba(232, 89, 12, 0.38);
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary:hover {
  color: var(--safety-ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 89, 12, 0.46);
}

/* Secondary action: quiet outline, never competes with primary. */
.btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  color: var(--steel);
  background: transparent;
  border: 2px solid var(--steel);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  color: var(--on-steel);
  background: var(--steel);
  text-decoration: none;
  transform: translateY(-2px);
}

.hero .hero-img {
  text-align: right;
  position: relative;
}

.hero .hero-img img {
  border-radius: 28px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--img-ring);
}

/* Hazard-stripe accent echoing the eyebrow, behind the photo */
.hero .hero-img::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 132px;
  right: -24px;
  top: -28px;
  background: var(--stripe-tile);
  background-size: 24px 24px;
  border-radius: 24px;
  z-index: -0;
  opacity: 0.9;
  pointer-events: none;
}

@media (max-width: 991px) {
  .hero {
    min-height: 0;
    padding: 120px 0 60px;
    text-align: center;
  }
  .hero .hero-img {
    text-align: center;
    margin-top: 44px;
  }
  .hero .hero-img::before {
    display: none;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
}

/* One orchestrated entrance: hero content rises once on load.
   Disabled entirely under prefers-reduced-motion (see components.css). */
@media (prefers-reduced-motion: no-preference) {
  .hero .col-lg-6:first-child {
    animation: hero-rise 0.7s ease both;
  }
  .hero .col-lg-6:last-child {
    animation: hero-rise 0.7s ease 0.12s both;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
