*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #0a0a0a;
  --white: #f5f3ef;
  --teal: #116979;
  --gold: #e6b31e;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-fa: 'doran', Tahoma, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  overflow-x: hidden;
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

/* RTL */
html[lang="fa"] {
  direction: rtl;
}

html[lang="fa"] body,
html[lang="fa"] input,
html[lang="fa"] .nav-links a,
html[lang="fa"] .lang-btn,
html[lang="fa"] .hero-title,
html[lang="fa"] .hero-sub,
html[lang="fa"] .contact-address,
html[lang="fa"] .contact-block-label,
html[lang="fa"] .category-card-name,
html[lang="fa"] .category-card-desc,
html[lang="fa"] .footer-copy {
  font-family: var(--font-fa);
  letter-spacing: 0;
}

html[lang="fa"] nav {
  flex-direction: row-reverse;
}

html[lang="fa"] .nav-right {
  flex-direction: row-reverse;
}

html[lang="fa"] .nav-logo,
html[lang="fa"] .contact-grid {
  direction: ltr;
}

html[lang="fa"] .contact-links a {
  font-family: var(--font-fa);
}

html[lang="fa"] .contact-block {
  direction: rtl;
  font-family: 'doran';
}


html[lang="en"] .lang-btn {
  font-family: 'doran';
}

::-webkit-scrollbar {
  width: 2px;
}

::-webkit-scrollbar-track {
  background: var(--white);
}

::-webkit-scrollbar-thumb {
  background: var(--teal);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 105, 121, 0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  top: 0;
  left: 0;
  will-change: transform;
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    height 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 52px;
  height: 52px;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 4rem;
  background: rgba(245, 243, 239, 0.90);
  backdrop-filter: blur(20px);
}

nav.scrolled {
  box-shadow: 0 1px 0 rgba(10, 10, 10, 0.07);
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4rem;
  right: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 10, 10, 0.07), transparent);
}

.nav-logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--black);
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.45);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--black);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid rgba(10, 10, 10, 0.12);
  color: rgba(10, 10, 10, 0.45);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.3s, color 0.3s;
}

.lang-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* HERO */
.hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8rem 4rem 4rem;
  text-align: center;
  border-bottom: 1px solid rgba(10, 10, 10, 0.07);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--black);
  margin-bottom: 1rem;
  visibility: hidden;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: rgba(10, 10, 10, 0.5);
  max-width: 50ch;
  line-height: 1.8;
  visibility: hidden;
}

/* CONTENT */
.content {
  padding: 6rem 4rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(10, 10, 10, 0.07);
  border: 1px solid rgba(10, 10, 10, 0.07);
}

.category-card {
  background: var(--white);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.4s, transform 0.3s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 200px;
  justify-content: center;
}

.category-card:hover {
  background: rgba(17, 105, 121, 0.04);
}


.category-card-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--black);
  line-height: 1.1;
}

.category-card-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(10, 10, 10, 0.7);
  text-align: justify;
  line-height: 1.7;
  font-weight: 300;
}

/* contact */
#contact {
  padding: 6rem 4rem;
  border-top: 1px solid rgba(10, 10, 10, 0.07);
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4rem;
  right: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
}

.contact-block-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-block-label::before {
  content: '';
  width: 1rem;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--black);
  transition: color 0.3s;
}

.contact-email:hover {
  color: var(--teal);
}

.contact-address {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(10, 10, 10, 0.42);
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.4);
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-links a::before {
  content: '';
  width: 1rem;
  height: 1px;
  background: var(--teal);
  transition: width 0.3s;
  flex-shrink: 0;
}

.contact-links a:hover {
  color: var(--black);
}

.contact-links a:hover::before {
  width: 2rem;
}

/* Responsive */
@media (max-width: 900px) {
  nav {
    padding: 1rem 1.5rem 3rem 1.5rem;
    height: fit-content;
  }

  nav::after {
    left: 2rem;
    right: 2rem;
  }

  .nav-links {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .hero {
    padding: 6rem 2rem 3rem;
  }

  .content {
    padding: 4rem 2rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    padding: 2rem;
  }
}

@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}