/* ==========================================================================
   Hazlewood Trailers – coming soon
   One idea runs through the page: the logo's slanted parallelogram.
   ========================================================================== */

:root {
  --orange: #fe6b00;
  --charcoal: #232321;
  --charcoal-glass: rgba(35, 35, 33, 0.92);
  --light: #f4f3f0;
  --white: #fff;

  --skew: -15deg;          /* logo lean; change here and everything follows */
  --unskew: 15deg;
  --track: 0.02em;         /* "20" tracking */
  --slant: 90px;           /* horizontal offset of slanted panel edges */

  --font-head: "Exo", "Arial Black", sans-serif;
  --font-body: "Raleway", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--orange); color: var(--charcoal);
  padding: .6rem 1rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px 130px;   /* room for the cards to overlap */
  background: var(--charcoal);
  overflow: hidden;
  isolation: isolate;
}

.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero__slide.is-active {
  opacity: 1;
  animation: drift 7s linear forwards;
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }

/* soft fade at the bottom so the overlapping cards read cleanly */
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 160px; z-index: -1;
  background: linear-gradient(to top, rgba(35,35,33,.65), transparent);
  pointer-events: none;
}

.hero__inner { width: 100%; max-width: 1240px; }  /* matches .range__grid */

/* Panel: charcoal glass slab with logo-style slanted edges + orange stripes */
.panel-wrap { position: relative; margin-left: 76px; }  /* stripes start at the grid edge */

.panel {
  position: relative;
  padding: 56px calc(var(--slant) + 40px) 60px;
  background: var(--charcoal-glass);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
  text-align: center;
  color: var(--white);
}

/* Two orange stripes, parallel to the panel's left edge (same slant, same height) */
.panel-wrap::before,
.panel-wrap::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  background: var(--orange);
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.panel-wrap::before { left: -50px; width: calc(var(--slant) + 34px); }   /* thick */
.panel-wrap::after  { left: -76px; width: calc(var(--slant) + 14px); }   /* thin  */

.panel__logo { width: min(600px, 100%); height: auto; margin: 0 auto 30px; }

.panel__title,
.heading {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--track);
  line-height: 1.05;
  margin: 0;
}

.panel__title {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);   /* same as .heading */
  padding-bottom: 22px;
  margin-bottom: 26px;
  position: relative;
}
.panel__title span { color: var(--orange); }
.panel__title::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 84px; height: 6px;
  background: var(--orange);
  transform: translateX(-50%) skewX(var(--skew));
}

.panel__blurb {
  max-width: 74ch;
  margin: 0 auto;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.75;
}

/* quick call CTA */
.panel__cta { margin: 34px 0 0; }
.btn.btn--call { font-size: 1.15rem; padding: 1.05rem 2.4rem; }
.btn.btn--call span { display: flex; align-items: center; gap: 1.1rem; }
.btn.btn--call svg {
  width: 1.4em; height: 1.4em; flex: none;
  fill: currentColor; stroke: none;
  position: relative; top: .06em;   /* optical centring against the caps */
}

/* ---------- Trailer cards (skewed squares, overlap the hero) ---------- */
.range {
  position: relative;
  z-index: 2;
  margin-top: -70px;   /* hero ends just below the top of the cards */
  padding: 0 24px 90px;
}

.range__grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}

.card__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 4px solid var(--orange);
  background: var(--charcoal);
  container-type: size;   /* lets the label measure the frame height (cqh) */
  transform: skewX(var(--skew));
  box-shadow: 0 18px 34px rgba(0,0,0,.28);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.card:hover .card__frame,
.card:focus-within .card__frame {
  box-shadow: 0 24px 44px rgba(254,107,0,.32);
  transform: skewX(var(--skew)) translateY(-6px);
}

/* Counter-skew so photo and text stay upright; overhang fills the slanted corners */
.card__inner {
  position: absolute; inset: 0 -18%;
  transform: skewX(var(--unskew));
}

.card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .8s var(--ease);
}
.card:hover .card__img,
.card:focus-within .card__img { transform: scale(1.1); }

.card__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(35,35,33,.92) 0%, rgba(35,35,33,.15) 45%, transparent 70%);
  transition: background .4s var(--ease);
}
.card:hover .card__veil,
.card:focus-within .card__veil { background: rgba(35,35,33,.62); }

.card__label {
  /* The frame leans, so its visual centre drifts left towards the bottom.
     Nudge the label back by tan(15deg) x its distance below the middle. */
  --nudge: calc(0.268 * (50cqh - 60px));
  position: absolute; left: calc(var(--nudge) * -1); right: var(--nudge); bottom: 0;
  margin: 0;
  padding: 0 14px 16px;
  text-wrap: balance;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-size: clamp(.95rem, 1.35vw, 1.2rem);
  line-height: 1.2;
  color: var(--white);
  transition: transform .45s var(--ease);
}
.card__label::before {
  content: "";
  display: block;
  width: 46px; height: 4px;
  margin: 0 auto 10px;
  background: var(--orange);
  transform: skewX(var(--skew));
}
.card:hover .card__label,
.card:focus-within .card__label { transform: translateY(-14px); }

/* enquiry button reveal */
.btn--card {
  position: absolute; left: 50%; top: 42%;
  opacity: 0;
  transform: translate(-50%, 18px) skewX(var(--skew));
  transition: opacity .35s var(--ease), transform .45s var(--ease), background .2s, color .2s;
}
.card:hover .btn--card,
.card:focus-within .btn--card {
  opacity: 1;
  transform: translate(-50%, 0) skewX(var(--skew));
}

/* ---------- Buttons (skewed parallelograms) ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.9rem;
  background: var(--orange);
  color: var(--charcoal);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  transform: skewX(var(--skew));
  transition: background .2s, color .2s, transform .2s;
}
.btn span { display: block; transform: skewX(var(--unskew)); }
.btn:hover { background: var(--charcoal); color: var(--orange); box-shadow: inset 0 0 0 2px var(--orange); }
.btn--card:hover { transform: translate(-50%, 0) skewX(var(--skew)); }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: 40px 24px 110px;
  background: var(--light);
  overflow: hidden;
}

/* faint oversized stripes echoing the logo */
.contact::before {
  content: "";
  position: absolute; top: -20px; bottom: -20px; right: -140px;
  width: 300px;
  background: linear-gradient(90deg,
    rgba(254,107,0,.10) 0 28%, transparent 28% 46%, rgba(254,107,0,.10) 46% 100%);
  transform: skewX(var(--skew));
  pointer-events: none;
}

.contact__inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 70px;
  align-items: start;
}

.heading { font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--charcoal); padding-bottom: 20px; margin-bottom: 30px; position: relative; }
.heading span { color: var(--orange); }
.heading::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 84px; height: 6px;
  background: var(--orange);
  transform: skewX(var(--skew));
  transform-origin: left bottom;
}

address { font-style: normal; }
.contact__name {
  margin: 0 0 18px;
  font-family: var(--font-head); font-weight: 800; letter-spacing: var(--track);
  text-transform: uppercase; font-size: 1.15rem;
}
.contact__row {
  display: flex; gap: 16px; align-items: flex-start;
  margin: 0 0 16px;
  font-size: 1.1rem;
}
.contact__row svg {
  flex: none; width: 26px; height: 26px; margin-top: 3px;
  fill: var(--orange); stroke: none;
}
.contact__row a { text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .2s; word-break: break-word; }
.contact__row a:hover { border-color: var(--orange); }

/* Form card + Gravity Forms.
   Selectors are scoped to .form so they win over GF's own theme CSS
   (gravity-theme / orbital) without needing to dequeue it. */
.form {
  background: var(--white); padding: 40px;
  box-shadow: 0 0 0 rgba(35,35,33,0);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease);
}
/* added by main.js once the form scrolls into view */
.form.is-lifted { transform: translateY(-10px); box-shadow: 0 18px 44px rgba(35,35,33,.16); }

.form .gform_wrapper { margin: 0; max-width: none; }
.form .gform_wrapper form { margin: 0; }
.form .gform_heading { display: none; }

.form .gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px 24px;
  margin: 0; padding: 0; list-style: none;
}
.form .gform_wrapper .gfield { grid-column: 1 / -1; margin: 0; padding: 0; min-width: 0; }
.form .gform_wrapper .gfield--width-half,
.form .gform_wrapper .gfield.gf_left_half,
.form .gform_wrapper .gfield.gf_right_half { grid-column: span 6; }

.form .gform_wrapper .gfield_label,
.form .gform_wrapper legend.gfield_label {
  display: block; margin: 0 0 6px; padding: 0;
  font-family: var(--font-body);
  font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--charcoal);
}
.form .gform_wrapper .gfield_required { color: var(--orange); font-size: inherit; margin-left: 2px; }
.form .gform_wrapper .gfield_required_text { display: none; }

.form .gform_wrapper .ginput_container { margin: 0; }
.form .gform_wrapper input[type="text"],
.form .gform_wrapper input[type="email"],
.form .gform_wrapper input[type="tel"],
.form .gform_wrapper select,
.form .gform_wrapper textarea {
  width: 100%; max-width: 100%; inline-size: 100%;
  padding: .8rem .9rem;
  font: inherit; font-weight: 300; color: var(--charcoal);
  background: var(--light);
  border: 2px solid transparent;
  border-bottom-color: var(--charcoal);
  border-radius: 0; box-shadow: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.form .gform_wrapper textarea { resize: vertical; min-height: 130px; }
.form .gform_wrapper input:focus,
.form .gform_wrapper select:focus,
.form .gform_wrapper textarea:focus {
  outline: none; background: var(--white);
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(254,107,0,.2);
}

/* validation */
.form .gform_wrapper .gfield_error input,
.form .gform_wrapper .gfield_error select,
.form .gform_wrapper .gfield_error textarea { border-color: #c62828; background: #fdf3f3; }
.form .gform_wrapper .gfield_validation_message,
.form .gform_wrapper .validation_message {
  margin: 6px 0 0; padding: 0; background: none; border: 0;
  color: #c62828; font-weight: 600; font-size: .9rem;
}
.form .gform_wrapper .gform_validation_errors {
  margin: 0 0 24px; padding: 14px 18px;
  background: #fdf3f3; border: 0; border-left: 4px solid #c62828; box-shadow: none;
}
.form .gform_wrapper .gform_submission_error {
  margin: 0; font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: #c62828;
}
.form .gform_wrapper .gform_submission_error .gform-icon { display: none; }

.form .gform_confirmation_message {
  margin: 0; padding: 8px 0;
  font-size: 1.15rem; font-weight: 600; color: var(--charcoal);
  border-left: 4px solid var(--orange); padding-left: 18px;
}
.form .gform_ajax_spinner, .form .gform-loader { margin-left: 14px; vertical-align: middle; }

/* ---- Hardening against Gravity Forms' own theme CSS ----
   GF sets heights, backgrounds and chevrons with variables and :hover rules,
   so the controls below are pinned with !important. */
.form .gform_wrapper input[type="text"],
.form .gform_wrapper input[type="email"],
.form .gform_wrapper input[type="tel"],
.form .gform_wrapper select,
.form .gform_wrapper textarea {
  box-sizing: border-box !important;
  height: auto !important;
  block-size: auto !important;
  min-height: 3.4rem !important;
  padding: .8rem .9rem !important;
  font-family: var(--font-body) !important;
  font-size: 1.0625rem !important;
  font-weight: 300 !important;
  line-height: 1.5 !important;
  color: var(--charcoal) !important;
  background-color: var(--light) !important;
  border: 2px solid transparent !important;
  border-bottom-color: var(--charcoal) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.form .gform_wrapper textarea { height: 180px !important; min-height: 130px !important; }

/* select: own chevron, never repeated, same on hover/focus */
.form .gform_wrapper select,
.form .gform_wrapper select:hover,
.form .gform_wrapper select:focus {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 2.6rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23232321' stroke-width='2'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: .8rem auto !important;
}

.form .gform_wrapper input:hover,
.form .gform_wrapper textarea:hover,
.form .gform_wrapper select:hover { border-color: transparent !important; border-bottom-color: var(--charcoal) !important; }
.form .gform_wrapper input:focus,
.form .gform_wrapper textarea:focus,
.form .gform_wrapper select:focus {
  background-color: var(--white) !important;
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px rgba(254,107,0,.2) !important;
}

/* submit: orange parallelogram. clip-path (not skew) so the label stays
   upright whether GF outputs <input> or <button>. */
.form .gform_wrapper .gform_footer input[type="submit"],
.form .gform_wrapper .gform_footer button,
.form .gform_wrapper .gform_page_footer input[type="submit"],
.form .gform_wrapper .gform_page_footer button {
  display: inline-block !important;
  width: auto !important;
  inline-size: auto !important;
  height: auto !important;
  block-size: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 1rem 3rem !important;
  background: var(--orange) !important;
  color: var(--charcoal) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-head) !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  letter-spacing: var(--track) !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
  cursor: pointer;
  clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
  transition: background .2s, color .2s;
}
.form .gform_wrapper .gform_footer input[type="submit"]:hover,
.form .gform_wrapper .gform_footer input[type="submit"]:focus,
.form .gform_wrapper .gform_footer button:hover,
.form .gform_wrapper .gform_footer button:focus {
  background: var(--charcoal) !important;
  color: var(--orange) !important;
}

.form-missing { margin: 0; padding: 14px 18px; background: #fff3cd; color: #664d03; font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  background: var(--charcoal); color: var(--white);
  text-align: center; padding: 22px 24px;
  border-top: 5px solid var(--orange);
  font-size: .9rem;
}
.footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .range__grid { grid-template-columns: repeat(2, 1fr); max-width: 640px; gap: 36px 34px; }
  .contact__inner { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 720px) {
  :root { --slant: 34px; }
  .hero { padding: 60px 16px 110px; }
  .panel-wrap { margin-left: 0; }
  .panel__title span { display: block; }   /* stacked on phones */
  .panel-wrap::before, .panel-wrap::after { display: none; }
  /* phones: square containers, no skew */
  .panel { clip-path: none; padding: 40px 22px 44px; }
  /* call button: match the card enquiry buttons so it never overflows */
  .btn.btn--call { font-size: .8rem; padding: .6rem 1.2rem; max-width: 100%; }
  .btn.btn--call span { gap: .6rem; }
  .card__frame,
  .card:hover .card__frame,
  .card:focus-within .card__frame { transform: none; }
  .card:hover .card__frame,
  .card:focus-within .card__frame { transform: translateY(-6px); }
  .card__inner { inset: 0; transform: none; }
  .card__label { --nudge: 0px; }
  .range { margin-top: -60px; padding: 0 28px 60px; }
  .range__grid { grid-template-columns: 1fr; max-width: 340px; gap: 40px; }
  .form { padding: 26px 20px; }
  .form .gform_wrapper .gfield--width-half,
  .form .gform_wrapper .gfield.gf_left_half,
  .form .gform_wrapper .gfield.gf_right_half { grid-column: 1 / -1; }
  .contact { padding: 20px 20px 80px; }
}

/* touch: no hover, so keep the enquiry button visible */
@media (hover: none) {
  .btn--card { opacity: 1; top: auto; bottom: 74px; transform: translate(-50%, 0) skewX(var(--skew)); padding: .6rem 1.2rem; font-size: .8rem; }
  .card__veil { background: linear-gradient(to top, rgba(35,35,33,.95) 0%, rgba(35,35,33,.35) 60%, transparent 85%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
