/* =======================
   RESET
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =======================
   BASE THEME
======================= */
body {
  font-family: 'Inter', sans-serif; /* readable body */
  color: #6b6b6b;
  line-height: 1.6;
  letter-spacing: 0.2px;

  background-color: #f8f8f6;
  background-image: url("../assets/images/xc-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

/* =======================
   SKETCH TYPOGRAPHY
======================= */
h1, h2, h3,
.logo span,
nav a,
.btn {
    font-family: 'Patrick Hand', cursive;
    letter-spacing: 0.6px;
    color: #38444c;
}

/* Font sizing */
h1 { font-size: 3rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.4rem; }

p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* =======================
   LAYOUT
======================= */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.header {
  border-bottom: 1px solid #222;
  position: relative;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #222;
}

.logo span {
  font-size: 2.4rem;
  margin-left: -0.2rem;   /* ⬅ pulls text closer to logo */
}

.logo img {
  height: 130px;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #38444c;
  font-size: 1.5rem;
  position: relative;
  text-decoration: none;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;

  width: 0;
  height: 2px;
  background: #222;

  transition: width 0.25s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: #de0a0a;
  font-weight: 500;
}

nav a.active::after {
  width: 100%;
}

/* =======================
   HERO
======================= */
.hero {
  padding: 5rem 0;
}

.hero p {
  max-width: 650px;
  margin-bottom: 2rem;
}

/* =======================
   BUTTONS
======================= */
.btn {
  padding: 0.6rem 1.4rem;
  border: 1px solid #222;
  text-decoration: none;
  color: #222;
  margin-right: 1rem;
}

.btn:hover {
  background: #38444c;
  color: #fff;
}

/* =======================
   WHAT WE DO
======================= */
.services {
  padding: 4rem 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  perspective: 1000px;
}

/* Inner wrapper */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.4,.2,.2,1);
}

/* Flip */
.service-card:hover .card-inner {
  transform: rotateY(180deg);
}

/* FRONT stays in normal flow */
.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* BACK overlays the front */
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* Prevent seeing backside */
.card-front,
.card-back {
  backface-visibility: hidden;
}

/* Front stays EXACTLY as before */
.card-front {
  background: inherit;
}

/* Back content */
.card-back {
  transform: rotateY(180deg);
  text-align: center;
  padding: 1rem;
}

.service-card:hover .icon {
  stroke: #222;
}

/* Icons */
.icon {
    width: 250px; /* Increased width */
    height: 168px; /* Adjusted height for rectangle */
    margin-bottom: 0.9rem;
    opacity: 0.95;
}

/* =======================
   PHILOSOPHY & PAGES
======================= */
.philosophy,
.page {
  padding: 4rem 0;
}

.list {
  margin-top: 1.5rem;
  padding-left: 1.2rem;
}

.list li {
  margin-bottom: 0.5rem;
}

/* =======================
   FOOTER
======================= */
.footer {
  position: relative;
  border-top: 1px solid #222;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

/* =======================
   MOBILE
======================= */
@media (max-width: 768px) {

  .nav {
    flex-direction: column;
    gap: 0.8rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .service-grid {
    grid-template-columns: 2fr;
  }

  .logo span {
    font-size: 1.6rem;
  }
}
/* Search tab behaves like nav link */
.search-tab {
  cursor: pointer;
}

/* Hidden search panel */
.search-panel {
  display: none;
  padding: 0.8rem 0;
  border-bottom: 1px solid #9a9a9a;
  text-align: center;
}

/* Input styling */
.search-panel input {
  width: 260px;
  padding: 0.45rem 0.7rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  border: 1px solid #222;
  outline: none;
}

.search-tab.active {
  font-weight: 500;
}

/* =======================
   CONTACT US
======================= */

.contact-intro {
  color: #555;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}

.contact-item i {
  font-size: 22px;
  color: #222;
  margin-top: 4px;
}

.contact-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.contact-item p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.contact-item a {
  color: #222;
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item {
  transition: 
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #ccc;
}

.contact-item i {
  transition: transform 0.2s ease, color 0.2s ease;
}

.contact-item:hover i {
  transform: scale(1.1);
  color: #000;
}

.contact-item:hover a {
  text-decoration: underline;
}

.contact-link {
  color: inherit;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: none;
}

/* =======================
   SERVICE REQUEST FORM
======================= */
.page h1 {
  margin-bottom: 20px;
}

.service-intro {
  max-width: 600px;
  margin: 0 auto 32px;
  color: #555;
}

.service-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
}

.btn-primary {
  padding: 0.6rem 1.4rem;  
  font-size: 14px;       
  font-family: inherit;

  background: #000;
  color: #de0a0a;
  border: none;
  border-radius: 6px;

  cursor: not-allowed;
  opacity: 0.6;

  transition: 
    background 0.2s ease,
    opacity 0.2s ease,
    transform 0.1s ease;
}

/* Enabled state */
.btn-primary:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}

/* Hover ONLY when enabled */
.btn-primary:not(:disabled):hover {
  background: #222;
}

/* Active ONLY when enabled */
.btn-primary:not(:disabled):active {
  transform: scale(0.98);
}

/* ============
   SERVICES
============= */

.services-page .services-intro {
  max-width: 700px;
  margin-bottom: 32px;
  color: #555;
}

.services-page .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.services-page .service-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
}

.services-page .service-card h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.services-page .service-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* =======================
   Request a Service
======================= */

.services-page .service-next {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
}

/* RED, VISIBLE, PROFESSIONAL BUTTON */
.services-page .service-next .btn-primary {
  background: #de0a0a;
  color: #ffffff;

  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 500;

  border: none;
  border-radius: 8px;

  cursor: pointer;
  opacity: 1; /* override disabled look */

  transition:
    background 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.25s ease;
}

/* Hover */
.services-page .service-next .btn-primary:hover {
  background: #3a3a3a;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Active */
.services-page .service-next .btn-primary:active {
  transform: scale(0.98);
}

/* ============
   PROJECTS
============ */

.projects-banner {
  max-width: 700px;
  margin-top: 24px;
  padding: 32px;
}

.banner-title {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.banner-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
}

/* =======================
   DRAWING PAGE REVEAL (FAST)
======================= */

.page-wrap {
  position: relative;
  overflow: hidden;
  animation: drawPage 0.14s linear forwards;
}

/* Hide content initially */
.page-wrap > * {
  opacity: 0;
  animation: contentReveal 0.14s linear forwards;
}

/* Page reveal like quick drawing */
@keyframes drawPage {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Content appears almost immediately */
@keyframes contentReveal {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Exit: fast reset wipe */
.page-wrap.page-exit {
  animation: drawExit 0.12s linear forwards;
}

@keyframes drawExit {
  from {
    clip-path: inset(0 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 100%);
  }
}

/* Header stays fixed */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f8f8f6;
  transform: translateZ(0);
}