/* ==========================================================================
   Falcon Smart Digital Company — site styles
   Single stylesheet, no external requests. Fonts and images are served
   from the assets folder on the same origin.
   ========================================================================== */

/* --- 1. Fonts ------------------------------------------------------------ */

@font-face {
  font-family: 'Fjalla One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/FjallaOne-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/SourceSansPro-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/SourceSans3-600.woff2') format('woff2');
}

/* --- 2. Theme tokens ----------------------------------------------------- */

:root {
  --teal: #5DB1B6;
  --teal-dark: #539FA3;
  --teal-light: #a3eff3;
  --text: #434343;
  --bg-alt: #F5F5F5;
  --rule: #EEEEEE;
  --white: #FFFFFF;
  --font-body: 'Source Sans Pro', sans-serif;
  --font-heading: 'Fjalla One', sans-serif;
}

/* --- 3. Base ------------------------------------------------------------- */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--white);
}

p {
  margin: 0 0 1rem;
}

a {
  font-weight: 400;
  color: var(--teal);
  text-decoration: underline;
}

a:hover,
a:focus {
  color: var(--teal-dark);
}

a:active {
  color: var(--teal-light);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  text-transform: none;
}

h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
}

blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--bg-alt);
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

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

/* Buttons */

.button {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--teal-dark);
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--white);
  background-color: var(--teal);
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}

.button:hover,
.button:focus {
  color: var(--white);
  background-color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button:active {
  color: var(--white);
  background-color: var(--teal-light);
  border-color: var(--teal-light);
}

/* Layout */

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section {
  padding: 60px 20px;
}

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

/* --- 4. Header ----------------------------------------------------------- */

.site-header {
  background-color: var(--white);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 12px;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
}

.site-nav__item {
  display: inline-flex;
  padding: 0 1rem;
}

.site-nav__item--button {
  padding-right: 0;
}

.site-nav__link {
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: #000000;
}

.site-nav__link:active {
  color: #505050;
}

/* Mobile toggle: checkbox is kept in the tab order but hidden from view */

.nav-toggle {
  display: none;               /* на десктопе чекбокса нет вовсе — вне tab-order */
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 8px;
  cursor: pointer;
}

.nav-burger__bar {
  display: block;
  height: 3px;
  background-color: var(--text);
}

.nav-toggle:focus-visible ~ .nav-burger {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Skip-link: виден только при фокусе с клавиатуры */
.skip-link {
  position: absolute;
  left: -1000px;
  top: -1000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  z-index: 10;
}

/* --- 5. Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 132px 20px;
  background-color: var(--text);
  background-image: url('/assets/img/hero.jpg');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
}

.hero__inner {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.hero__title {
  color: var(--white);
}

.hero__text {
  margin: 0;
  color: var(--white);
  text-align: justify;
}

/* --- 6. Intro ------------------------------------------------------------ */

.intro {
  text-align: center;
}

.lead {
  margin: 0;
  font-size: 20px;
}

/* --- 7. Services overview ------------------------------------------------ */

.services {
  padding-top: 0;
}

.service {
  display: grid;
  grid-template-columns: 5fr 1fr 6fr;
  align-items: center;
}

.service + .service {
  margin-top: 44px;
}

.service__media {
  grid-column: 1;
  grid-row: 1;
  line-height: 0;
}

.service__body {
  grid-column: 3;
  grid-row: 1;
  text-align: center;
}

.service--reverse {
  grid-template-columns: 6fr 1fr 5fr;
}

.service--reverse .service__media {
  grid-column: 3;
}

.service--reverse .service__body {
  grid-column: 1;
}

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

.service__body h3 {
  margin-bottom: 0.5rem;
}

.service__body p {
  margin-bottom: 1.25rem;
}

/* --- 8. Detail sections and contact ------------------------------------- */

.detail,
.contact {
  scroll-margin-top: 24px;
}

.tagline {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.contact__address {
  margin-bottom: 1.5rem;
}

/* --- 9. Footer ----------------------------------------------------------- */

.site-footer {
  padding: 48px 20px;
  background-color: var(--bg-alt);
  color: var(--text);
}

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
}

.footer-nav a {
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: #000000;
}

.footer-nav a:active {
  color: #505050;
}

.footer-rule {
  max-width: 1000px;
  margin: 48px auto;
  border-bottom: 1px solid var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-bottom__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.footer-logo img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 10px;
}

.footer-address,
.footer-copy {
  margin: 0;
}

/* --- 10. Small screens (below 768px, matching the original breakpoint) --- */

@media (max-width: 767px) {
  .nav-burger {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 99;
    margin: 0;
    background-color: var(--white);
    border-top: 1px solid var(--rule);
  }

  .nav-toggle {
    display: block;            /* на мобильном чекбокс существует (visually-hidden), бургер им управляет */
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav__list {
    display: block;
  }

  .site-nav__item {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav__link {
    display: block;
    padding: 0.7rem 20px;
  }

  .site-nav__item--button {
    padding: 0.7rem 20px;
    border-bottom: 0;
  }

  .hero {
    padding: 72px 20px;
  }

  .service,
  .service--reverse {
    display: block;
  }

  .service__media {
    margin-bottom: 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
