/*-----------------------------------*\
  #style.css
\*-----------------------------------*/

/**
 * copyright 2022 codewithsadee
 */





/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {

  /**
   * colors
   */

  --sefety-orange_10: hsla(24, 100%, 50%, 0.1);
  --sefety-orange: hsl(24, 100%, 50%);
  --sonic-silver: hsl(220, 1%, 48%);
  --gunmetal_10: hsla(217, 21%, 16%, 0.1);
  --davys-gray: hsl(220, 2%, 31%);
  --light-gray: hsl(0, 0%, 80%);
  --gunmetal: hsl(217, 21%, 16%);
  --cultured: hsl(0, 0%, 95%);
  --black_40: hsla(0, 0%, 0%, 0.4);
  --black_25: hsla(0, 0%, 0%, 0.25);
  --black_15: hsla(0, 0%, 0%, 0.15);
  --white: hsl(0, 0%, 100%);
  --snow: hsl(345, 20%, 96%);

  /**
   * typography
   */

  --ff-jost: 'Jost', sans-serif;

  --fs-1: 3.8rem;
  --fs-2: 2.2rem;
  --fs-3: 2rem;
  --fs-4: 1.8rem;
  --fs-5: 1.4rem;

  --fw-600: 600;
  --fw-500: 500;

  /**
   * spacing
   */

  --section-padding: 80px;

  /**
   * shadow
   */

  --shadow-1: 0px 2px 15px hsla(0, 0%, 0%, 0.05);
  --shadow-2: -10px 10px 40px -2px hsla(217, 21%, 16%, 0.05);

  /**
   * border radius
   */

  --radius-pill: 500px;
  --radius-circle: 50%;
  --radius-4: 4px;

  /**
   * transition
   */

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
  --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
  --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);

}





/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

li { list-style: none; }

a,
img,
span,
button,
ion-icon { display: block; }

a {
  color: inherit;
  text-decoration: none;
}

img { height: auto; }

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

ion-icon { pointer-events: none; }

html {
  font-family: var(--ff-jost);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  color: var(--davys-gray);
  font-size: 1.6rem;
  line-height: 1.7;
}

body.active { overflow: hidden; }

:focus-visible { outline-offset: 4px; }

::-webkit-scrollbar { width: 10px; }

::-webkit-scrollbar-track { background-color: hsl(0, 0%, 98%); }

::-webkit-scrollbar-thumb { background-color: hsl(0, 0%, 80%); }

::-webkit-scrollbar-thumb:hover { background-color: hsl(0, 0%, 70%); }





/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container { padding-inline: 15px; }

.section { padding-block: var(--section-padding); }

.h1,
.h2,
.h3,
.h4 {
  color: var(--gunmetal);
  line-height: 1.3;
}

.h1,
.h2 { font-size: var(--fs-1); }

.h3 { font-size: var(--fs-2); }

.h3,
.h4 { font-weight: var(--fw-600); }

.h4 { font-size: var(--fs-3); }

.section-title .span {
  display: inline-block;
  color: var(--sefety-orange);
}

.section-text { font-size: var(--fs-3); }

.btn {
  background-color: var(--bg, var(--gunmetal));
  color: var(--color, var(--white));
  padding: var(--padding, 10px 20px);
  border: 2px solid var(--border-color, var(--gunmetal));
  border-radius: var(--radius-4);
  transition: var(--transition-1);
}

.btn-primary {
  --bg: var(--sefety-orange);
  --color: var(--white);
  --border-color: var(--sefety-orange);
}

.btn-primary:is(:hover, :focus) {
  --bg: transparent;
  --color: var(--sefety-orange);
}

.btn-secondary:is(:hover, :focus) {
  --bg: var(--sefety-orange);
  --border-color: var(--sefety-orange);
}

.btn-outline {
  --bg: transparent;
  --color: var(--sefety-orange);
  --border-color: var(--sefety-orange);
  --padding: 10px 28px;
  font-weight: var(--fw-500);
}

.btn-outline:is(:hover, :focus) {
  --color: var(--white);
  --bg: var(--sefety-orange);
}

.has-shape {
  position: relative;
  z-index: 1;
}

.shape {
  position: absolute;
  z-index: -1;
}

.w-100 { width: 100%; }

.title-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-block-end: 60px;
}

.grid-list {
  display: grid;
  gap: 30px;
}

.card-text { font-size: var(--fs-4); }

.btn-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gunmetal);
  font-weight: var(--fw-500);
  transition: var(--transition-1);
}

.btn-link:is(:hover, :focus) { color: var(--sefety-orange); }

.img-holder {
  aspect-ratio: var(--width) / var(--height);
  background-color: var(--light-gray);
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-2);
}

.hover\:underline {
  display: inline;
  background-image: linear-gradient(to right, var(--gunmetal), var(--gunmetal));
  background-repeat: no-repeat;
  max-width: max-content;
  background-position-y: bottom;
  background-size: 0 2px;
  transition: var(--transition-2);
}

.hover\:underline:is(:hover, :focus) { background-size: 100% 2px; }





/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.logo { display: inline-flex; align-items: center; }

.logo-text {
  font-family: var(--ff-jost, 'Jost', sans-serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #212833;
  line-height: 1;
}

.footer-text {
  color: var(--gunmetal);
  opacity: 0.8;
  margin-block: 20px 15px;
  max-width: 280px;
  line-height: 1.6;
}

.header .btn { display: none; }

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding-block: 25px;
  z-index: 4;
}

.header.active {
  position: fixed;
  background-color: var(--white);
  box-shadow: var(--shadow-1);
  transform: translateY(-100%);
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(0); }
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.nav-open-btn {
  background-color: var(--gunmetal_10);
  color: var(--gunmetal);
  font-size: 20px;
  padding: 10px;
  border-radius: var(--radius-circle);
  transition: var(--transition-1);
}

.nav-open-btn ion-icon { --ionicon-stroke-width: 50px; }

.nav-open-btn:is(:hover, :focus) {
  background-color: var(--sefety-orange);
  color: var(--white);
}

.navbar {
  position: fixed;
  top: 0;
  left: -450px;
  width: calc(100% - 70px);
  max-width: 450px;
  height: 100vh;
  background-color: var(--cultured);
  z-index: 1;
  visibility: hidden;
  transition: 0.25s var(--cubic-in);
}

.navbar.active {
  transform: translate(450px);
  visibility: visible;
  transition: 0.5s var(--cubic-out);
}

.navbar-title {
  color: var(--black_40);
  text-align: center;
  padding: 12px;
  border-block-end: 1px solid var(--black_15);
}

.navbar-item { border-block-end: 1px solid var(--black_15); }

.navbar-link {
  color: var(--gunmetal);
  padding: 15px 30px;
  transition: var(--transition-1);
}

.navbar-link:is(:hover, :focus) { color: var(--sefety-orange); }

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--black_25);
  opacity: 0;
  transition: var(--transition-1);
  pointer-events: none;
}

.overlay.active {
  pointer-events: all;
  opacity: 1;
}





/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero { padding-block-start: calc(var(--section-padding) + 90px); }

.hero .container {
  display: grid;
  gap: 40px;
}

.hero .section-text { margin-block: 25px 40px; }

.hero-banner .w-100 {
  max-width: 70%;
  margin-inline: auto;
}

.hero .shape {
  bottom: -10px;
  left: 10px;
}





/*-----------------------------------*\
  #SERVICE
\*-----------------------------------*/

.service { background-color: var(--snow); }

.service .section-text { margin-block-end: 20px; }

.service .grid-list {
  gap: 28px;
}

.service-card {
  position: relative;
  background-color: var(--white);
  padding: 44px 32px;
  border-radius: var(--radius-4);
  box-shadow: 0 10px 30px -18px rgba(33, 40, 51, 0.18);
  border: 1px solid rgba(33, 40, 51, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  overflow: hidden;
  height: 100%;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sefety-orange), #ffb27d);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px -22px rgba(33, 40, 51, 0.28);
  border-color: rgba(243, 119, 54, 0.25);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card .card-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(243, 119, 54, 0.12), rgba(243, 119, 54, 0.04));
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.4s ease;
}

.service-card .card-icon img {
  width: 40px;
  height: 40px;
  transition: transform 0.4s ease;
}

.service-card:hover .card-icon {
  background: linear-gradient(135deg, rgba(243, 119, 54, 0.22), rgba(243, 119, 54, 0.08));
  transform: rotate(-4deg);
}

.service-card:hover .card-icon img {
  transform: rotate(4deg) scale(1.05);
}

.service-card .card-title {
  margin-block: 28px 14px;
  font-size: 22px;
  transition: var(--transition-1);
}

.service-card .card-text {
  color: rgba(33, 40, 51, 0.7);
  line-height: 1.65;
}

.service-card .card-title:is(:hover, :focus) { color: var(--sefety-orange); }

.service .shape-2 { display: none; }

.service .shape-1 {
  bottom: 0;
  left: -50px;
}





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about .container {
  display: grid;
  gap: 50px;
}

.about-banner .w-100 { max-width: 90%; }

.about .shape {
  top: -25px;
  right: -5px;
}

.about .section-text {
  font-size: unset;
  margin-block: 30px 40px;
}

.about .btn { max-width: max-content; }





/*-----------------------------------*\
  #PROJECT
\*-----------------------------------*/

.project { background-color: var(--snow); }

.project .section-title { margin-block-end: 30px; }

.project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
}

.project-card .card-banner { margin-block-end: 35px; }

.project-card .img-holder { overflow: hidden; }

.project-card:is(:hover, :focus-within) .img-cover { transform: scale(1.2); }

.project-card .card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.project-card .h3 {
  --fs-2: 2.4rem;
  margin-block-end: 4px;
}

.project-card .card-tag { font-size: var(--fs-4); }

.project-card .card-link {
  color: var(--gunmetal);
  font-size: 22px;
  padding: 14px;
  border-radius: var(--radius-circle);
  transform: rotate(-45deg);
  transition: var(--transition-1);
}

.project-card .card-link:is(:hover, :focus) { 
  background-color: var(--sefety-orange_10);
  color: var(--sefety-orange);
}





/*-----------------------------------*\
  #BLOG
\*-----------------------------------*/

.blog .grid-list { gap: 50px; }

.blog-card .card-banner {
  position: relative;
  overflow: hidden;
}

.blog-card .card-banner:is(:hover, :focus) .img-cover { transform: scale(1.2); }

.blog-card .card-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: var(--white);
  color: var(--gunmetal);
  font-size: var(--fs-5);
  font-weight: var(--fw-500);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: var(--transition-1);
}

.blog-card .card-tag:is(:hover, :focus) {
  background-color: var(--sefety-orange);
  color: var(--white);
}

.blog-card :is(.meta-list, .meta-item) {
  display: flex;
  align-items: center;
}

.blog-card .meta-list {
  column-gap: 20px;
  flex-wrap: wrap;
  margin-block: 25px 15px;
}

.blog-card .meta-item { column-gap: 5px; }

.blog-card .meta-item-text { color: var(--sonic-silver); }

.blog-card .h3 { --fs-2: 2.8rem; }

.blog-card .btn-link {
  font-size: var(--fs-4);
  margin-block-start: 20px;
}





/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer { color: var(--gunmetal); }

.footer-top {
  display: grid;
  gap: 30px;
  border-block: 1px solid var(--light-gray);
}

.footer-link {
  font-size: var(--fs-4);
  transition: var(--transition-1);
}

.footer-link:is(:hover, :focus) { color: var(--sefety-orange); }

.footer-brand .footer-link:not(:last-of-type) { margin-block: 30px 15px; }

.social-list {
  display: flex;
  gap: 15px;
  margin-block-start: 25px;
}

.social-link {
  font-size: 20px;
  transition: var(--transition-1);
}

.social-link:is(:hover, :focus) { color: var(--sefety-orange); }

.footer-list .footer-link { padding-block: 5px; }

.footer-list-title { margin-block-end: 20px; }

.copyright {
  padding-block: 35px;
  text-align: center;
}





/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for large than 575px screen
 */

@media (min-width: 575px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 5rem;

  }



  /**
   * REUSED STYLE
   */

  .container {
    max-width: 540px;
    width: 100%;
    margin-inline: auto;
  }



  /**
   * HERO
   */

  .hero-banner .w-100 { max-width: 100%; }

  .hero .shape {
    bottom: 0;
    left: -50px;
  }



  /**
   * SERVICE
   */

  .service .grid-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
  }



  /**
   * PROJECT
   */

  .project-list > * { min-width: 100%; }



  /**
   * FOOTER
   */

  .footer-top { grid-template-columns: 1fr 1fr; }

}





/**
 * responsive for large than 768px screen
 */

@media (min-width: 768px) {

  /**
   * REUSED STYLE
   */

  .container { max-width: 720px; }

  .grid-list { grid-template-columns: 1fr 1fr; }



  /**
   * HERO
   */

  .hero .container {
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
  }



  /**
   * SERVICE
   */

  .service .title-wrapper > * {
    max-width: calc(50% - 30px);
    align-items: flex-start;
  }

  .service .section-text { margin-block: 0; }



  /**
   * ABOUT
   */

  .about .container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }



  /**
   * PROJECT
   */

  .project-list > * {
    min-width: calc(50% - 30px);
    width: calc(50% - 30px);
  }

}





/**
 * responsive for large than 992px screen
 */

@media (min-width: 992px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 6.5rem;

    /**
     * spacing
     */

    --section-padding: 120px;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 960px; }

  .h2 { --fs-1: 5.5rem; }

  .section-text { --fs-3: 2.4rem; }

  .btn {
    --padding: 10px 32px;
    font-weight: var(--fw-500);
  }

  .btn-secondary { --padding: 14px 32px; }



  /**
   * FOOTER
   */

  .footer-top { grid-template-columns: 1fr 0.7fr 0.7fr 0.7fr; }

}





/**
 * responsive for large than 1200px screen
 */

@media (min-width: 1200px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 8rem;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 1140px; }

  .h2 { --fs-1: 7.2rem; }

  .grid-list { grid-template-columns: repeat(3, 1fr); }



  /**
   * HEADER
   */

  .nav-open-btn,
  .navbar-title { display: none; }

  .header .btn { display: block; }

  .navbar,
  .navbar.active {
    all: unset;
    margin-inline-start: auto;
  }

  .navbar-list { display: flex; }

  .navbar-item { border: none; }

  .navbar-link {
    text-transform: uppercase;
    font-weight: var(--fw-500);
  }



  /**
   * SERVICE
   */

  .service .grid-list { grid-template-columns: repeat(4, 1fr); }



  /**
   * PROJECT
   */

  .project .title-wrapper > div { width: 75%; }

  .project-list > * {
    min-width: calc(33.33% - 40px);
    width: calc(33.33% - 40px);
  }

  .project-list > *:is(:first-child, :nth-child(2)) {
    width: calc(50% - 30px);
  }

}



/*-----------------------------------*\
  #ANIMATIONS
\*-----------------------------------*/

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes pulseShape {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50%      { transform: scale(1.08) rotate(6deg); opacity: 1; }
}

@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Header / navbar entrance */
.header {
  animation: fadeInDown 0.7s ease-out both;
}

.header .logo {
  animation: fadeInLeft 0.7s ease-out 0.15s both;
}

.header .navbar-list .navbar-item {
  opacity: 0;
  animation: fadeInDown 0.55s ease-out forwards;
}
.header .navbar-list .navbar-item:nth-child(1) { animation-delay: 0.25s; }
.header .navbar-list .navbar-item:nth-child(2) { animation-delay: 0.35s; }
.header .navbar-list .navbar-item:nth-child(3) { animation-delay: 0.45s; }
.header .navbar-list .navbar-item:nth-child(4) { animation-delay: 0.55s; }

.header .btn-primary {
  animation: fadeInDown 0.7s ease-out 0.65s both;
}

/* Navbar link hover underline (desktop) */
@media (min-width: 768px) {
  .navbar-link {
    position: relative;
  }
  .navbar-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background-color: var(--sefety-orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
  }
  .navbar-link:is(:hover, :focus)::after {
    transform: scaleX(1);
  }
}

/* Logo subtle hover lift */
.logo { transition: transform 0.3s ease; }
.logo:hover { transform: translateY(-2px); }

/* Hero content staggered entrance */
.hero-content > .section-title {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}
.hero-content > .section-text {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}
.hero-content > .btn {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

/* Hero banner: fade-in then continuous float */
.hero-banner .w-100 {
  opacity: 0;
  animation:
    fadeInUp 0.9s ease-out 0.5s forwards,
    float 5s ease-in-out 1.4s infinite;
}

/* Hero decorative shape: gentle pulse */
.hero .shape {
  animation: pulseShape 4s ease-in-out infinite;
}

/* Buttons: subtle hover lift */
.btn { transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease; }
.btn:hover { transform: translateY(-3px); }

/* Scroll-triggered section reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"]  { transform: scale(0.92); }

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger children when parent reveals */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal-stagger].is-revealed > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.45s; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: 0.55s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .header,
  .header .logo,
  .header .navbar-list .navbar-item,
  .header .btn-primary,
  .hero-content > .section-title,
  .hero-content > .section-text,
  .hero-content > .btn,
  .hero-banner .w-100,
  .hero .shape,
  [data-reveal],
  [data-reveal-stagger] > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}