/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #060e20;
  --bg-mid:     #0b1326;
  --bg-card:    #0d1b32;
  --brand-500:  #e5433c;
  --brand-400:  #ff6059;
  --brand-300:  #ff897e;
  --text-white: #ffffff;
  --text-muted: #7a8fac;
  --text-dim:   #3d5470;
  --text-body:  #b7c8e1;
  --border:     rgba(255,255,255,0.06);
  --radius-xl:  0.875rem;
  --radius-2xl: 1rem;
  --max-w:      72rem;
  --section-py: 7rem;
}

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(229,67,60,.28); color:#fff; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.12); }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width:640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width:1024px) { .container { padding-inline: 2rem; } }

/* ===== TYPOGRAPHY HELPERS ===== */
.font-display { font-family: 'Syne', system-ui, sans-serif; }

.section-label {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-body);
}
.section-label::before {
  content: ''; display: block;
  width: 1.75rem; height: 1px;
  background: currentColor; opacity: 0.45;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(.16,1,.3,1),
              transform 0.55s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== NAVBAR ===== */
#tw-header {
  position: fixed; inset-inline: 0; top: 0;
  z-index: 50; padding: 1.25rem 1rem 0;
}

.nav-inner {
  max-width: var(--max-w); margin-inline: auto;
}

.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem; padding-inline: 1.25rem;
  border-radius: var(--radius-xl);
  background: rgba(6,14,32,0.82);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.05);
}

.nav-logo {
  display: flex; align-items: center; gap: 0.625rem;
  flex-shrink: 0; transition: opacity .2s;
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-img {
  width: 1.75rem; height: 1.75rem;
  overflow: hidden; border-radius: 0.375rem;
  background: #fff; padding: 2px;
}
.nav-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.nav-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 0.875rem; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
}
@media (max-width: 639px) { .nav-logo-text { display: none; } }

.nav-links {
  display: none; align-items: center; gap: 0.125rem;
  list-style: none;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  border-radius: 0.5rem; padding: 0.375rem 0.875rem;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-muted); transition: color .2s;
}
.nav-links a:hover { color: #fff; }

.nav-right { display: flex; align-items: center; gap: 0.5rem; }

.nav-lang {
  display: flex; align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  padding: 2px;
}
.nav-lang a {
  border-radius: 9999px; padding: 0.25rem 0.625rem;
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); transition: all .2s;
}
.nav-lang a.active { background: var(--brand-500); color: #fff; }
.nav-lang a:hover:not(.active) { color: #fff; }

.nav-mobile-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.03);
  border: none; cursor: pointer;
  color: var(--text-muted); transition: background .2s, color .2s;
}
.nav-mobile-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
@media (min-width: 768px) { .nav-mobile-btn { display: none; } }

.nav-mobile-menu {
  display: none; margin-top: 0.5rem;
  border-radius: var(--radius-xl);
  background: rgba(6,14,32,0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu ul { list-style: none; padding: 0.5rem; }
.nav-mobile-menu a {
  display: flex; padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.nav-mobile-menu a:hover { background: rgba(255,255,255,.04); color: #fff; }

/* ===== HERO ===== */
#hero {
  position: relative; min-height: 100vh;
  overflow: hidden; background: var(--bg-deep);
}

.hero-content {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin-inline: auto;
  padding: 9rem 1rem 7rem;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh;
}
@media (min-width:640px)  { .hero-content { padding-inline: 1.5rem; } }
@media (min-width:1024px) { .hero-content { padding-inline: 2rem; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-body);
  animation: fadeUp .6s .05s cubic-bezier(.16,1,.3,1) both;
}
.hero-badge::before {
  content: ''; display: block;
  width: 1.75rem; height: 1px;
  background: currentColor; opacity: 0.45;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -0.02em; color: #fff;
  margin-top: 1.75rem; max-width: 50rem;
  animation: fadeUp .7s .25s cubic-bezier(.16,1,.3,1) both;
}

.hero-subtitle {
  margin-top: 1.5rem; max-width: 36rem;
  font-size: 1rem; line-height: 1.7;
  color: var(--text-muted);
  animation: fadeUp .6s .85s cubic-bezier(.16,1,.3,1) both;
}
@media (min-width:640px) { .hero-subtitle { font-size: 1.125rem; } }

.hero-ctas {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-top: 2.5rem;
  animation: fadeUp .6s 1.05s cubic-bezier(.16,1,.3,1) both;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-xl);
  background: var(--brand-500); color: #fff;
  font-size: 0.875rem; font-weight: 700;
  border: none; cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--brand-400); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-body); background: transparent;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,.2); color: #fff; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 5rem;
  animation: fadeUp .6s 1.25s cubic-bezier(.16,1,.3,1) both;
}
@media (min-width:640px) { .hero-stats { gap: 3.5rem; } }

.hero-stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem; font-weight: 800;
  color: #fff; font-variant-numeric: tabular-nums;
}
@media (min-width:640px) { .hero-stat-value { font-size: 3rem; } }

.hero-stat-label {
  margin-top: 0.375rem;
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ===== ABOUT + SERVICES ===== */
#services { background: var(--bg-mid); }

.section-wrap {
  max-width: var(--max-w); margin-inline: auto;
  padding: var(--section-py) 1rem;
}
@media (min-width:640px)  { .section-wrap { padding-inline: 1.5rem; } }
@media (min-width:1024px) { .section-wrap { padding-inline: 2rem; } }

.about-split {
  display: grid; gap: 2rem; margin-bottom: 6rem;
}
@media (min-width:1024px) {
  .about-split { grid-template-columns: 1fr 1.35fr; gap: 5rem; }
}

.section-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em;
  color: #fff; margin-top: 1.25rem;
}

.section-body { font-size: 0.9375rem; line-height: 1.75; color: var(--text-muted); }
@media (min-width:1024px) { .section-body { padding-top: 0.75rem; } }

.services-grid {
  margin-top: 2.5rem;
  display: grid; gap: 0.75rem;
}
@media (min-width:768px) { .services-grid { grid-template-columns: repeat(3,1fr); } }

.service-card {
  border-radius: var(--radius-xl);
  background: var(--bg-deep); padding: 1.75rem;
  transition: background .3s;
}
.service-card:hover { background: var(--bg-card); }

.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(229,67,60,.1);
}
.service-icon svg { width: 1rem; height: 1rem; color: var(--brand-300); }

.service-title {
  font-size: 0.9375rem; font-weight: 700; color: #fff;
  margin-top: 1.25rem; line-height: 1.4;
}
.service-desc { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); }

/* ===== PROJECTS ===== */
#projects { background: var(--bg-deep); }

.featured-card {
  margin-top: 2.5rem;
  border-radius: var(--radius-2xl);
  background: var(--bg-mid); padding: 2rem;
}
@media (min-width:640px) { .featured-card { padding: 3rem; } }

.featured-inner {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 2rem;
}

.featured-badge {
  display: inline-block;
  border-radius: 9999px;
  background: rgba(229,67,60,.1);
  padding: 0.25rem 0.75rem;
  font-size: 0.5625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--brand-300);
}

.featured-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 800; color: #fff; margin-top: 1.25rem;
}
.featured-desc { margin-top: 1rem; font-size: 0.9375rem; line-height: 1.7; color: var(--text-muted); max-width: 40rem; }

.btn-primary-sm {
  display: inline-flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0; padding: 0.875rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--brand-500); color: #fff;
  font-size: 0.875rem; font-weight: 700;
  transition: background .2s;
}
.btn-primary-sm:hover { background: var(--brand-400); }

.projects-grid {
  margin-top: 0.75rem;
  display: grid; gap: 0.75rem;
}
@media (min-width:640px) { .projects-grid { grid-template-columns: repeat(3,1fr); } }

.project-card {
  display: flex; flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--bg-mid); padding: 1.75rem;
  transition: background .2s; height: 100%;
}
a.project-card:hover { background: var(--bg-card); }

.project-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 0.75rem;
}
.project-name { font-family: 'Syne', sans-serif; font-size: 0.9375rem; font-weight: 700; color: #fff; }
.project-arrow { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--text-dim); transition: color .2s; }
a.project-card:hover .project-arrow { color: var(--brand-400); }
.project-badge {
  flex-shrink: 0;
  border-radius: 9999px;
  background: #1a2a40;
  padding: 0.125rem 0.625rem;
  font-size: 0.5625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted);
}
.project-desc { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); flex: 1; }

/* ===== TEAM ===== */
#team { background: var(--bg-mid); }

.team-grid {
  margin-top: 3.5rem;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width:768px)  { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width:1024px) { .team-grid { grid-template-columns: repeat(6, 1fr); } }

.team-card { }
.team-photo-wrap {
  position: relative; aspect-ratio: 3/4;
  overflow: hidden; border-radius: var(--radius-xl);
  background: var(--bg-deep);
}
.team-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  transition: transform .5s ease;
}
.team-photo-wrap:hover img { transform: scale(1.04); }
.team-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,19,38,.55) 0%, transparent 60%);
}
.team-name { margin-top: 0.75rem; font-size: 0.875rem; font-weight: 700; color: #fff; }
.team-role { margin-top: 0.125rem; font-size: 0.75rem; font-weight: 500; color: var(--brand-400); }

/* ===== CONTACT ===== */
#contact { background: var(--bg-deep); }

.contact-card {
  border-radius: var(--radius-2xl);
  background: var(--bg-mid); padding: 2rem;
}
@media (min-width:640px) { .contact-card { padding: 3rem; } }

.contact-grid { display: grid; gap: 3rem; }
@media (min-width:768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-email-link {
  display: inline-flex; align-items: center; gap: 0.375rem;
  margin-top: 1.75rem; font-size: 0.875rem; font-weight: 600;
  color: var(--brand-300); transition: color .2s;
}
.contact-email-link:hover { color: var(--brand-400); }

.contact-location {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-muted);
}
.contact-location svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; color: rgba(229,67,60,.5); }

.contact-form { display: flex; flex-direction: column; gap: 0.75rem; }

.form-input, .form-textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,.06);
  background: var(--bg-deep);
  padding: 0.875rem 1rem;
  font-size: 0.875rem; color: #fff;
  font-family: inherit;
  outline: none; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input:focus, .form-textarea:focus {
  border-color: rgba(229,67,60,.35);
  box-shadow: 0 0 0 3px rgba(229,67,60,.08);
}

.btn-submit {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--brand-500); color: #fff;
  font-size: 0.875rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer; transition: background .2s;
}
.btn-submit:hover { background: var(--brand-400); }

/* ===== FOOTER ===== */
#tw-footer {
  border-top: 1px solid rgba(255,255,255,.04);
  background: var(--bg-deep);
}

.footer-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding: 2.5rem 1rem;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: space-between; gap: 1.5rem;
}
@media (min-width:640px)  { .footer-inner { flex-direction: row; align-items: center; padding-inline: 1.5rem; } }
@media (min-width:1024px) { .footer-inner { padding-inline: 2rem; } }

.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo {
  width: 1.5rem; height: 1.5rem;
  overflow: hidden; border-radius: 0.25rem;
  background: #fff; padding: 2px;
}
.footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.footer-copy { font-size: 0.75rem; color: var(--text-dim); }
.footer-email { font-size: 0.75rem; color: var(--text-dim); transition: color .2s; }
.footer-email:hover { color: var(--text-muted); }

/* ===== SVG ICON HELPERS ===== */
.icon { display: inline-block; vertical-align: middle; }
