/* ============================================================
   3pMaster — hand-written stylesheet
   Clean port of the Webflow site. No framework, no build step.
   Replaces: normalize.css, components.css, webflow.css and the
   generated tripmaster/triprally stylesheets.
   ============================================================ */

/* ---- Fonts: self-hosted, no Google Fonts request, no cookies ---- */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Light.ttf") format("truetype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("../fonts/PTSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---- Design tokens (extracted from the original site) ---- */
:root {
  --accent: #489fd9;          /* links and hovers */
  --hero-blue: #007aff;       /* hero / .section.main background */
  --text: #333;
  --section-alt: #dde7ed;     /* "Our Apps" section background (.section.purple) */
  --footer-bg: #2b2c2e;
  --footer-text: #e4e8eb;
  --footer-link: #939596;
  --copyright-bg: #1c1d1f;
  --flic-red: #ec383b;        /* Flic button (.button-2) */
  --container: 940px;
  --nav-height: 75px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
ul { padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height); /* keep anchors clear of the fixed nav */
}

body {
  font-family: Roboto, sans-serif;
  font-size: 16px;
  line-height: 22px;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 38px; line-height: 44px; font-weight: 500; text-align: center; }
h3 { font-size: 22px; line-height: 30px; font-weight: 500; margin-bottom: 15px; }
p  { font-size: 18px; line-height: 25px; font-weight: 300; }
strong { font-weight: 500; }
a { color: inherit; }

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}
.section { padding: 70px 0; }

/* ---- Navigation (fixed) ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px rgba(0, 0, 0, 0.13);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 75px; width: auto; }
.nav-menu { display: flex; }
.nav-link {
  display: block;
  padding: 26px 17px;
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 3px transparent;
  transition: box-shadow 0.5s, color 0.3s;
}
.nav-link:hover { box-shadow: inset 0 3px rgba(181, 181, 181, 0.5); }

.nav-toggle {
  display: none;
  padding: 0;
  background: none;
  border: 0;
  color: #000;
  cursor: pointer;
}

/* ---- Hero (.section.main) ---- */
.hero {
  margin-top: var(--nav-height);
  padding: 70px 0;
  color: #fff;
  text-shadow: 0 1px rgba(0, 0, 0, 0.23);
  background: var(--hero-blue) url("../images/3pMaster_Tripmaster_offroad.webp") 0 0 / 1788px;
}
.hero-grid {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hero-text { flex: 0 0 42%; }
.hero-image { flex: 1; text-align: center; }
.hero-image img { margin: 0 auto; }
.hero h1 { color: #fff; text-align: left; margin-bottom: 20px; }
.hero-subtitle {
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  margin-bottom: 26px;
}
.appstore { display: inline-block; }
.appstore img { width: 135px; height: 40px; }

/* ---- Section heading (h2-top-page style) ---- */
.section-heading {
  font-size: 30px;
  line-height: 36px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  margin-bottom: 0;
}
.additional-contact {
  font-size: 19px;
  font-weight: 300;
  text-align: center;
  margin: 20px 0 30px;
}

/* ---- Features ---- */
.feature-row {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 70px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row > * { flex: 1 1 50%; }
.feature-icon { margin-bottom: 12px; }
.feature-text p { margin-bottom: 5px; }
.feature-img--shadow {
  border-radius: 1px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ---- Flic button (.button-2) ---- */
.flic-button-wrap { margin-top: 15px; }
.flic-button {
  display: inline-block;
  color: #fff;
  text-align: center;
  background: var(--flic-red);
  border-radius: 3px;
  padding: 9px 15px;
  text-decoration: none;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.12);
}
.flic-button:hover { background: #cc242e; }

/* ---- Small features row (4-up) ---- */
.small-features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 71px;
}
.small-feature .feature-icon { margin-bottom: 4px; }

/* ---- Our Apps (.section.purple) ---- */
.apps { background: var(--section-alt); text-align: center; }
.apps-title {
  font-size: 30px;
  line-height: 36px;
  font-weight: 400;
  color: var(--text);
}
.apps-subtitle {
  font-size: 19px;
  line-height: 22px;
  font-weight: 300;
  margin: 8px 0 30px;
}
.app-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 0 auto;
}
.card {
  flex: 1 1 33.33%;
  background: #fff;
  padding: 17px;
}
.card h3 { text-align: center; color: var(--text); }
.card-subtitle { padding-bottom: 20px; }
.divider {
  height: 1px;
  background: #dbdbdb;
  margin: 13px 0 12px;
}
.card-feature {
  font-size: 14px;
  line-height: 18px;
  margin-bottom: 14px;
}
.card .appstore { margin-top: 19px; }

/* ---- Links ---- */
.link-accent {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.link-accent:hover { border-bottom-color: var(--accent); }

/* ---- Footer ---- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 42px 0;
}
.footer-grid {
  display: flex;
  gap: 30px;
}
.footer-social { flex: 1 1 50%; display: flex; gap: 14px; }
.social-icon {
  display: inline-flex;
  color: var(--footer-text);
  opacity: 0.41;
  transition: opacity 0.3s;
}
.social-icon:hover { opacity: 1; }
.footer-col { flex: 0 0 22%; }
.footer-title {
  font-family: "PT Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-link {
  display: block;
  min-height: 48px;
  line-height: 48px;
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-link:hover { color: #d2d7d9; }

/* ---- Copyright bar ---- */
.copyright {
  background: var(--copyright-bg);
  color: var(--footer-link);
  padding: 19px 0;
  font-size: 14px;
}
.copyright-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.copyright p { font-size: 14px; font-weight: 300; }
.credit { font-style: italic; font-size: 13px; font-weight: 300; }
.credit a { color: #fff; text-decoration: none; }

/* ---- Privacy policy ---- */
.policy { margin-top: var(--nav-height); padding: 40px 0; }
.policy-doc { max-width: 760px; margin: 0 auto; }
.policy-doc h1 { font-size: 30px; line-height: 38px; text-align: left; margin-bottom: 24px; }
.policy-doc h2 { font-size: 22px; line-height: 28px; font-weight: 500; margin: 34px 0 12px; }
.policy-doc h3 { font-size: 18px; line-height: 24px; font-weight: 500; margin: 24px 0 10px; }
.policy-doc h4 { font-size: 16px; line-height: 22px; font-weight: 500; margin: 20px 0 8px; }
.policy-doc p { font-size: 16px; line-height: 25px; margin-bottom: 12px; }
.policy-doc ul { margin: 0 0 12px; padding-left: 22px; list-style: disc; }
.policy-doc li { font-size: 16px; line-height: 25px; margin-bottom: 6px; }
.policy-doc a { color: var(--accent); }
.policy-doc strong { font-weight: 500; }
.policy-doc hr { border: 0; border-top: 1px solid #e3e3e3; margin: 26px 0; }
.policy-doc details { margin: 8px 0 12px; }
.policy-doc summary { cursor: pointer; }

/* ---- 404 ---- */
.notfound {
  margin-top: var(--nav-height);
  padding: 120px 0;
  text-align: center;
}
.notfound p { margin-top: 15px; }

/* ============================================================
   Responsive — breakpoints kept from the original (991/767/479)
   ============================================================ */
@media (max-width: 991px) {
  .container, .nav-inner { max-width: 728px; }

  /* nav collapses into a dropdown */
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #000;
    padding: 13px 15px;
  }
  .nav-menu.open { display: flex; }
  .nav-link { color: #fff; padding: 18px 0; }
  .nav-link:hover { box-shadow: inset 0 3px transparent; }

  .small-features-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .container, .nav-inner { max-width: none; }
  .section { padding: 43px 0; text-align: center; }

  .hero { text-align: center; }
  .hero-grid { flex-direction: column; align-items: stretch; }
  .hero-text { flex: none; }
  .hero h1 { text-align: center; }

  .feature-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 32px;
  }
  .feature-icon { margin-left: auto; margin-right: auto; }

  .small-features-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 32px;
  }
  .small-feature { margin-bottom: 32px; }

  .app-cards {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
  }

  .footer-grid { flex-direction: column; gap: 0; }
  .footer-col { margin-top: 35px; }
  .footer-social { justify-content: center; }

  .copyright-inner { flex-direction: column; }
}

@media (max-width: 479px) {
  .nav-logo img { height: 60px; }
}
