/**
 * Metomos Website - Main Stylesheet
 * Premium, modern design with responsive layout
 */

/* ==================== CSS Variables ==================== */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #2a2a2a;
  --accent-color: #d4af37;
  --text-color: #333;
  --light-text: #666;
  --white: #ffffff;
  --light-bg: #f5f5f5;
  --border-color: #e0e0e0;
  
  --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-family-display: 'Georgia', 'Times New Roman', serif;
  
  --transition: all 0.3s ease;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==================== Reset & Base ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: 2px;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: 1px;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--light-text);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #e5c158;
}

/* ==================== Container ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==================== Header ==================== */
.header {
  background-color: rgba(26, 26, 26, 0.95);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.scrolled {
  background-color: rgba(26, 26, 26, 0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Header Top */
.header-top {
  background-color: rgba(42, 42, 42, 0.8);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.header-contact {
  display: flex;
  gap: 2rem;
}

.contact-link {
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--accent-color);
}

.icon {
  font-size: 1rem;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.auth-link {
  color: var(--white);
  font-size: 0.9rem;
  transition: var(--transition);
}

.auth-link:hover {
  color: var(--accent-color);
}

.language-toggle {
  display: flex;
  gap: 0.5rem;
  border-left: 1px solid rgba(212, 175, 55, 0.3);
  padding-left: 1.5rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--accent-color);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  border-radius: 3px;
}

.lang-btn:hover,
.lang-btn.active {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* Navbar */
.navbar {
  background-color: var(--primary-color);
  padding: 1rem 0;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.logo:hover .logo-img {
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 3rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--accent-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== Hero Section ==================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../img/port_list_04.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
  margin-top: 120px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.5) 0%, rgba(26, 26, 26, 0.3) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.2rem;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  color: var(--accent-color);
  text-transform: uppercase;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  text-transform: uppercase;
}

.cta-button:hover {
  background-color: transparent;
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* ==================== Sections ==================== */
section {
  padding: 6rem 0;
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

section.fade-in {
  opacity: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.section-subtitle-ko {
  text-align: center;
  font-size: 0.95rem;
  color: var(--light-text);
  margin-bottom: 2rem;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 2rem auto;
  line-height: 1.8;
}

/* xD BIM Section */
.xd-bim-section {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.xd-bim-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.03) 35px, rgba(212, 175, 55, 0.03) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.03) 35px, rgba(212, 175, 55, 0.03) 70px);
  pointer-events: none;
}

.xd-bim-section .container {
  position: relative;
  z-index: 1;
}

/* WEB3 BIM Section */
.web3-bim-section {
  background-color: var(--white);
  padding: 6rem 0;
}

.web3-image {
  margin-top: 3rem;
  text-align: center;
}

.web3-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--box-shadow-lg);
  transition: var(--transition);
}

.web3-image img:hover {
  transform: scale(1.02);
}

/* Technology Section */
.technology-section {
  background-color: var(--light-bg);
  padding: 6rem 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.tech-item {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border-left: 4px solid var(--accent-color);
}

.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.tech-item h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.tech-item p {
  color: var(--light-text);
  font-size: 0.95rem;
}

/* Portfolio Gallery */
.portfolio-section {
  margin-top: 4rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  cursor: pointer;
}

.portfolio-gallery img:hover {
  transform: scale(1.05);
  box-shadow: var(--box-shadow-lg);
}

/* World First Section */
.world-first-section {
  background-color: var(--white);
  padding: 6rem 0;
}

.world-first-image {
  margin-top: 3rem;
  text-align: center;
}

.world-first-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--box-shadow-lg);
}

.section-date {
  text-align: center;
  font-size: 0.95rem;
  color: var(--light-text);
  margin-bottom: 1rem;
}

/* Quote Section */
.quote-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.quote-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 10 L90 10 L90 90 L10 90 Z" fill="none" stroke="rgba(212,175,55,0.05)" stroke-width="0.5"/></svg>');
  pointer-events: none;
}

.quote-text {
  text-align: center;
  font-size: 1.8rem;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

.quote-text::before {
  content: '"';
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.3;
  position: absolute;
  left: -40px;
  top: -20px;
}

/* ==================== Footer ==================== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section {
  padding: 0 1rem;
}

.footer-title {
  color: var(--accent-color);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.footer-link {
  color: var(--white);
  transition: var(--transition);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-link:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-phone {
  color: var(--white);
  margin-top: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: var(--white);
  border: 1px solid var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-block;
}

.social-link:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .header-contact {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .header-auth {
    width: 100%;
    justify-content: space-between;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding-top: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 180px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--primary-color);
    padding: 2rem 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.active {
    max-height: 500px;
  }

  .nav-link {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  }

  .nav-link::after {
    display: none;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero {
    height: 70vh;
    margin-top: 140px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  section {
    padding: 3rem 0;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-text {
    font-size: 1.3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .hero {
    height: 60vh;
    margin-top: 140px;
  }

  .hero-title {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
  }

  section {
    padding: 2rem 0;
  }

  .portfolio-gallery {
    grid-template-columns: 1fr;
  }

  .quote-text {
    font-size: 1rem;
  }

  .quote-text::before {
    font-size: 2rem;
    left: -20px;
  }

  .tech-item {
    padding: 1.5rem;
  }
}

/* ==================== Accessibility ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: more) {
  :root {
    --accent-color: #ffd700;
  }

  .nav-link {
    font-weight: 800;
  }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e0e0e0;
    --light-text: #b0b0b0;
    --light-bg: #2a2a2a;
  }

  body {
    background-color: var(--primary-color);
  }

  .tech-item,
  .web3-image img {
    background-color: var(--secondary-color);
  }
}
