/* ============================================
   MELISA KARAYILAN - Premium Legal Design
   Dark Luxe × Authority × Trust
   ============================================ */

:root {
  --bg: #070809;
  --bg-elevated: #0f1113;
  --bg-card: rgba(15, 17, 19, 0.8);
  --gold: #c9a227;
  --gold-light: #e0c76b;
  --gold-dim: rgba(201, 162, 39, 0.3);
  --text: #e8e4df;
  --text-muted: #8a8580;
  --border: rgba(201, 162, 39, 0.15);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

img, iframe {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
  position: relative;
}

::selection {
  background: var(--gold-dim);
  color: var(--gold-light);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

/* ========== MOBILE FOUNDATION ========== */
section,
header,
footer {
  max-width: 100%;
  overflow-x: hidden;
  min-width: 0;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }
  .about {
    padding: 4rem 0;
  }
  .about__grid {
    min-width: 0;
    overflow: hidden;
    gap: 1.5rem;
  }
  .about__card {
    max-width: 100%;
    min-width: 0;
  }
  .about__visual {
    max-width: 100%;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .about__card-inner {
    flex-direction: column;
    gap: 0.75rem;
  }
  .about__card p {
    text-align: center;
  }
}

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  transition: background 0.5s var(--ease-out-expo), backdrop-filter 0.5s;
}

@media (max-width: 768px) {
  .nav { padding: 1rem; }
  .nav__logo-title { font-size: 0.6rem; letter-spacing: 0.1em; }
}

.nav.scrolled {
  background: rgba(7, 8, 9, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav__logo-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav__logo-title {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out-expo);
}

.nav__links a:hover {
  color: var(--gold);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s;
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    max-width: 280px;
    z-index: 1001;
    background: var(--bg-elevated);
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  }
  .nav__links.open {
    transform: translateX(0);
  }
  .nav__links a {
    font-size: 1.1rem;
  }
  .nav__toggle {
    display: flex;
    z-index: 1001;
  }
  .nav__toggle span {
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

.nav__overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100%;
  background: rgba(7, 8, 9, 0.95);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

body.nav-open .nav__overlay {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.nav__overlay {
  pointer-events: none;
}

@media (min-width: 769px) {
  .nav__overlay { display: none !important; }
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 1rem 5rem;
  text-align: center;
}

@media (min-width: 480px) {
  .hero { padding: 7rem clamp(1.25rem, 5vw, 2rem) 5rem; }
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(201, 162, 39, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(201, 162, 39, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(201, 162, 39, 0.04) 0%, transparent 50%);
}

/* Floating Legal Symbols */
.hero__symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__symbol {
  position: absolute;
  color: var(--gold);
  opacity: 0.12;
  animation: symbolFloat 8s ease-in-out infinite;
  font-size: 3.5rem;
}

.hero__symbol--1 { top: 15%; left: 12%; font-size: 4rem; animation-delay: 0s; }
.hero__symbol--2 { top: 25%; right: 15%; font-size: 3rem; animation-delay: -2s; animation-duration: 10s; }
.hero__symbol--3 { bottom: 20%; left: 18%; font-size: 3.25rem; animation-delay: -4s; animation-duration: 9s; }

.hero__symbol--gavel { animation-name: symbolFloatRotate; }
.hero__symbol--scale { animation-name: symbolFloat; }

@keyframes symbolFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.02); }
}

@keyframes symbolFloatRotate {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__label {
  font-size: 0.8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 0.4s forwards;
}

.hero__title span {
  display: inline-block;
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
  min-width: 180px;
}

@media (max-width: 480px) {
  .hero__title span { min-width: 0; }
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 0.6s forwards;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  color: var(--gold);
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.hero__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.hero__cta:hover {
  gap: 1rem;
  color: var(--gold-light);
  border-color: var(--gold-dim);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
  transform: translateY(-2px);
}

.hero__cta:hover::before {
  opacity: 1;
}

.hero__cta-arrow {
  transition: transform 0.4s var(--ease-out-expo);
}

.hero__cta:hover .hero__cta-arrow {
  transform: translateY(4px);
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========== SECTION DECORATIVE SYMBOLS ========== */
.section__symbol {
  position: absolute;
  color: var(--gold);
  opacity: 0.08;
  pointer-events: none;
}

.section__symbol i {
  font-size: 2.5rem;
}

.section__symbol--center i {
  font-size: 3rem;
}

.section__symbol--left { top: 4rem; left: 1.5rem; }
.section__symbol--right { top: 4rem; right: 1.5rem; }
.section__symbol--center { top: 2rem; left: 50%; transform: translateX(-50%); }

@media (max-width: 768px) {
  .section__symbol { display: none; }
}

/* ========== SECTIONS ========== */
.testimonial.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.testimonial.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ========== SERVICES ========== */
.services {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .services {
    padding: 4rem 0;
  }
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 2rem;
}

@media (max-width: 400px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    padding: 1.5rem;
  }
}

.service-card {
  padding: 2.5rem;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.5s, box-shadow 0.5s;
  opacity: 0;
  transform: translateY(40px);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(201, 162, 39, 0.15);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1.5rem;
  color: var(--gold);
  transition: transform 0.5s var(--ease-out-expo);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card:hover .service-card__icon {
  transform: scale(1.1);
  color: var(--gold-light);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ========== ABOUT ========== */
.about {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__content {
  max-width: 560px;
  min-width: 0;
}

.about__title,
.about__text,
.section-desc {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.about__text {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.about__text strong {
  color: var(--gold);
  font-weight: 500;
}

.about__stat {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.about__stat-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.about__stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.about__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about__card {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s, box-shadow 0.5s;
}

.about__card:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 30px 80px -30px rgba(201, 162, 39, 0.2);
}

.about__card-inner {
  text-align: center;
  padding: 2rem;
}

.about__scale {
  font-size: 4rem;
  margin: 0 auto 1.5rem;
  color: var(--gold);
  opacity: 0.9;
  display: block;
  animation: scaleBalance 4s ease-in-out infinite;
}

@keyframes scaleBalance {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.about__card p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
  }
  .about__content {
    max-width: 100%;
    order: 2;
  }
  .about__visual {
    order: 1;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    justify-content: center;
  }
  .about__card {
    max-width: 100%;
    width: 100%;
    aspect-ratio: auto;
    min-height: 0;
    padding: 1.25rem 1rem;
  }
  .about__card-inner {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .about__scale {
    font-size: 2.5rem;
    margin: 0;
    flex-shrink: 0;
  }
  .about__card p {
    font-size: 1rem;
    margin: 0;
    text-align: left;
  }
}

/* ========== TESTIMONIALS ========== */
.testimonials {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .testimonials {
    padding: 4rem 0;
  }
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.testimonial {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.testimonial:hover {
  transform: translateY(0) translateX(4px);
  box-shadow: 0 20px 50px -20px rgba(201, 162, 39, 0.2);
}

.testimonial__quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 2rem;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.testimonial__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
  background-image: linear-gradient(135deg, var(--gold-dim) 0%, var(--bg-elevated) 100%);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.testimonial__author cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.testimonial__author span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .testimonial {
    padding: 1.5rem 1.25rem;
  }
  .testimonial__quote {
    font-size: 1.15rem;
  }
}

/* Tawk.to chat widget - prevent overlap on mobile */
@media (max-width: 768px) {
  body { padding-bottom: 5rem; }
  .footer { padding-bottom: 6rem; }
}

/* ========== FOOTER ========== */
.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer__logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: color 0.3s;
}

.footer__logo:hover {
  color: var(--gold-light);
}

.footer__logo:hover .footer__logo-title {
  color: var(--gold-light);
}

.footer__logo-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer__logo-title {
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== ANIMATIONS ========== */
.service-card[data-delay="0"].visible { transition-delay: 0.1s; }
.service-card[data-delay="1"].visible { transition-delay: 0.15s; }
.service-card[data-delay="2"].visible { transition-delay: 0.2s; }
.service-card[data-delay="3"].visible { transition-delay: 0.25s; }
.service-card[data-delay="4"].visible { transition-delay: 0.3s; }
.service-card[data-delay="5"].visible { transition-delay: 0.35s; }
