@import url("variables.css");

/* =========================================
   BASE STYLES & TYPOGRAPHY
   ========================================= */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
  font-size: 16px;
}

*,
*:before,
*:after {
  box-sizing: inherit;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  color: var(--textcolor);
  background-color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* =========================================
   UTILITIES
   ========================================= */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

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

.content {
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
  width: 100%;
  position: relative;
  z-index: 1000;
  background-color: var(--background);
}

/* Sticky Header State */
body.scrolled header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(114, 62, 70, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  animation: slideDownHeader 0.4s ease forwards;
}

/* Closing Header State */
body.header-closing header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(114, 62, 70, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding-top: 0;
  padding-bottom: 0;
  animation: slideUpHeader 0.4s ease forwards;
}

@keyframes slideDownHeader {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideUpHeader {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }
}

.navbar {
  width: 100%;
  max-width: 87vw;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4vh 3.2rem;
}

.logo-container {
  flex: 1;
}

.navlogo {
  max-width: 120px;
  height: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbaritem a {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.navbaritem a:hover {
  transform: translateY(-3px);
  color: var(--primary);
}

.nav-toggle {
  display: none;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  padding: 0 0 0 8rem;
  position: relative;
  overflow: visible;
  z-index: 1;
}

/* Background Curve */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh - 130px);
  background-color: var(--background);
  border-bottom-left-radius: 100px;
  border-bottom-right-radius: 0;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  min-height: calc(100vh - 130px);
  gap: 3rem;
}

.hero-text {
  position: relative;
  z-index: 10;
}

.hero-text h1 {
  font-family: var(--font-secondary);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.05;
  color: var(--white);
  margin: 0;
}

.coloredword {
  color: var(--primary);
}

.hero-image {
  display: flex;
  justify-content: flex-end;
}

.illustration {
  width: 100%;
  max-width: 850px;
  height: auto;
  object-fit: contain;
  transform: rotate(20deg);
}

/* CTA Button */
.cta {
  display: inline-flex;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem 2rem;
  position: relative;
  font-weight: 600;
}

.cta span {
  font-size: 1.2rem;
  margin-right: 10px;
  color: var(--white);
  position: relative;
  z-index: 2;
}

.cta svg {
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  transition: transform 0.3s;
  position: relative;
  z-index: 2;
}

.cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(211, 105, 89, 0.5);
  border-radius: 50px;
  transition: width 0.3s ease, background 0.3s;
  z-index: 1;
}

.cta:hover::before {
  width: 100%;
  background: var(--primary);
}

.cta:hover svg {
  transform: translateX(5px);
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-section {
  display: flex;
  position: relative;
  padding: 4rem 5%;
  gap: 4rem;
  align-items: center;
  justify-content: center;
}

.about-image {
  flex: 0 0 320px;
  position: relative;
  margin-top: 2rem;
}

.infoimg {
  width: 320px;
  max-width: 100%;
  height: auto;
  border-radius: 40px;
  object-fit: cover;
  display: block;
}

.about-seal {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: auto;
  z-index: 10;
}

.infotxt {
  flex: 0 1 600px;
  padding-top: 2rem;
}

.infotxt h2 {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.infotxt h2 span {
  font-family: var(--font-primary);
  color: var(--textcolor);
}

.lineimg {
  width: 80px;
  margin-bottom: 1.5rem;
}

.paragraph {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

.main-btn-container {
  margin-top: 2rem;
}

.btn {
  background-color: transparent;
  color: var(--primary);
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--primary);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--primary);
  z-index: -1;
  transition: width 0.3s ease-in-out;
}

.btn:hover {
  color: white;
}

.btn:hover::before {
  width: 100%;
}

/* =========================================
   BLOG SECTION
   ========================================= */
.blog-section {
  position: relative;
  padding: 4rem 8rem;
  margin-top: 4rem;
  z-index: 1;
}

.blog-section::before {
  content: "";
  height: 100%;
  width: 90vw;
  background-color: var(--primary);
  opacity: 0.9;
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  border-top-right-radius: 100px;
  border-bottom-right-radius: 100px;
}

.maintitle {
  padding-bottom: 2rem;
}

.maintitle h2 {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  line-height: 1.2;
}

.maintitle h2 span {
  font-family: var(--font-primary);
  color: var(--textcolor);
  font-weight: 600;
}

.maintitle p {
  color: var(--white);
  max-width: 600px;
  margin-top: 1rem;
}

.maintitle p b {
  color: var(--textcolor);
}

.coffeebeans-img {
  position: absolute;
  width: 25vw;
  max-width: 300px;
  height: auto;
  right: 5%;
  top: 0;
  z-index: 10;
}

/* =========================================
   ART GRID
   ========================================= */
.artgrid {
  column-count: 3;
  column-gap: 2rem;
  padding-top: 2rem;
  position: relative;
  z-index: 20;
  margin-right: 100px;
}

.griditem {
  position: relative;
  display: inline-block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  background: white;
  margin-bottom: 2rem;
  break-inside: avoid;
}

.griditem:hover {
  transform: translateY(-5px);
}

.previewimage {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: filter 0.3s;
  display: block;
}

.griditem:hover .previewimage {
  filter: brightness(0.8);
}

.arttext {
  background-color: var(--textcolor);
  color: var(--white);
  padding: 1rem;
  opacity: 0.95;
  flex-grow: 1;
}

.arttext h3 {
  margin: 0;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1.1rem;
}

.arttext p {
  margin: 0.5rem 0 0 0;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 300;
}

/* =========================================
   RESPONSIVE QUERIES
   ========================================= */

/* Large Tablets / Small Desktops */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
  .artgrid {
    column-count: 3;
  }
}

/* Tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .artgrid {
    column-count: 2;
  }
}

/* Mobile & Tablet */
@media screen and (max-width: 968px) {
  .hero-section {
    padding: 0 5%;
    padding-bottom: 5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 4rem;
    gap: 2rem;
  }

  .hero-image {
    order: 1;
    justify-content: center;
  }

  .hero-text {
    order: 2;
  }

  .illustration {
    max-width: 400px;
  }

  .hero-section::before {
    width: 100%;
    height: 100%;
    border-radius: 0 0 50px 50px;
  }

  .about-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-image {
    flex: auto;
    width: 300px;
    margin-bottom: 2rem;
  }

  .infotxt {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Mobile Small */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 5%;
    width: 90%;
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
    border-radius: 20px;
    margin-top: 10px;
  }

  .nav-links.active {
    display: flex;
    animation: slideDown 0.3s ease-out forwards;
  }

  .nav-links.closing {
    display: flex;
    animation: slideUp 0.3s ease-in forwards;
    pointer-events: none;
  }

  .nav-links li {
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-links li a {
    color: var(--textcolor);
    display: block;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links li a:hover {
    background-color: rgba(225, 108, 91, 0.08);
    color: var(--primary);
  }

  .nav-toggle {
    display: block;
    cursor: pointer;
    transition: transform 400ms;
    stroke: var(--white);
    margin-right: -15px;
  }

  .nav-toggle.active {
    transform: rotate(45deg);
  }

  .nav-line {
    fill: none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke-width: 5.5;
    stroke-linecap: round;
  }

  .nav-animation .top {
    stroke-dasharray: 40 121;
  }

  .nav-animation .bottom {
    stroke-dasharray: 40 121;
  }

  .nav-animation.active .top {
    stroke-dashoffset: -68px;
  }

  .nav-animation.active .bottom {
    stroke-dashoffset: -68px;
  }

  .navlogo {
    padding-left: 0;
  }

  .navbar {
    padding: 1.2rem;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slideUp {
    from {
      opacity: 1;
      transform: translateY(0);
    }

    to {
      opacity: 0;
      transform: translateY(-10px);
    }
  }

  /* Hero & Other Section Adjustments */
  .hero-section {
    flex-direction: column-reverse;
    padding: 0 5% 2rem 5%;
    justify-content: center;
    text-align: center;
  }

  .hero-text {
    margin-top: -3rem;
  }

  .hero-image {
    margin-bottom: 2rem;
  }

  .illustration {
    max-width: 300px;
  }

  .cta {
    justify-content: center;
  }

  .blog-section {
    padding: 4rem 5%;
  }

  .blog-section::before {
    width: 100%;
    border-radius: 50px 0 0 0;
  }

  .coffeebeans-img {
    display: none;
  }

  .artgrid {
    column-count: 1;
    max-width: 400px;
    margin: 0 auto;
  }
}