/* tnhec.com - Vintage Luxury Editorial Technology */
/* Colors: #e8b84b (gold), #4a90d9 (blue), #1a1a2e (deep base), #6c757d (gray), #f5f0e8 (warm off-white) */
/* Fonts: Inter (body), Caveat (handwritten), Playfair Display (serif) */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #1a1a2e;
  color: #f5f0e8;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Navigation ===== */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 40px;
  transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#main-nav.nav-scrolled {
  background-color: rgba(26, 26, 46, 0.95);
  padding: 12px 40px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

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

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: #e8b84b;
  letter-spacing: 4px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: #e8b84b;
  border-radius: 50%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: #f5f0e8;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #e8b84b;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #e8b84b;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== Hero Section ===== */
#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 60%, #1a1a2e 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, rgba(232, 184, 75, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(74, 144, 217, 0.05) 0%, transparent 50%);
  opacity: 0.5;
}

.hero-watercolor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(232, 184, 75, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 184, 75, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(74, 144, 217, 0.03) 0%, transparent 60%);
  animation: watercolorShift 12s ease-in-out infinite alternate;
}

@keyframes watercolorShift {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.hero-ornament {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.ornament-svg {
  width: 200px;
  height: 20px;
}

.hero-title {
  font-family: 'Caveat', cursive;
  font-size: 72px;
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1.1;
  margin: 16px 0;
  letter-spacing: 1px;
}

.hero-title-accent {
  color: #e8b84b;
  display: block;
  font-size: 80px;
}

.hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 20px;
  color: #6c757d;
  margin: 8px 0 24px;
  letter-spacing: 1px;
}

.hero-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 16px 40px;
  border: 1.5px solid #e8b84b;
  color: #e8b84b;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.hero-cta:hover {
  background-color: #e8b84b;
  color: #1a1a2e;
  box-shadow: 0 4px 30px rgba(232, 184, 75, 0.3);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.hero-scroll-indicator span {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #6c757d;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #e8b84b, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Gold Rule Dividers ===== */
.gold-rule {
  padding: 20px 0;
  display: flex;
  justify-content: center;
  background: #1a1a2e;
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gold-rule.visible {
  opacity: 1;
  transform: scaleX(1);
}

.gold-rule-svg {
  width: 60%;
  max-width: 600px;
  height: 30px;
}

/* ===== Section Shared Styles ===== */
section {
  position: relative;
  padding: 100px 20px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-heading {
  text-align: center;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-heading.revealed {
  opacity: 1;
  transform: translateY(0);
}

.handwritten {
  font-family: 'Caveat', cursive;
  font-size: 52px;
  font-weight: 700;
  color: #e8b84b;
}

.section-subheading {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 60px;
}

/* ===== Watercolor Backgrounds ===== */
.watercolor-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.about-watercolor {
  background:
    radial-gradient(ellipse at 10% 50%, rgba(232, 184, 75, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 30%, rgba(232, 184, 75, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(74, 144, 217, 0.03) 0%, transparent 50%);
}

.heritage-watercolor {
  background:
    radial-gradient(ellipse at 80% 60%, rgba(232, 184, 75, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 40%, rgba(74, 144, 217, 0.04) 0%, transparent 40%);
}

/* ===== About Section ===== */
#about {
  background: #1a1a2e;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.about-card {
  text-align: center;
  padding: 40px 30px;
  border: 1px solid rgba(232, 184, 75, 0.15);
  background: rgba(245, 240, 232, 0.03);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, opacity 0.7s ease;
  opacity: 0;
  transform: translateY(40px);
}

.about-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about-card:hover {
  border-color: rgba(232, 184, 75, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(232, 184, 75, 0.08);
}

.about-icon {
  margin-bottom: 24px;
}

.about-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #e8b84b;
  margin-bottom: 16px;
}

.about-card-text {
  font-size: 15px;
  line-height: 1.8;
  color: #6c757d;
}

/* ===== Tutorials Section - Card Flip ===== */
#tutorials {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f20 100%);
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.flip-card {
  perspective: 1000px;
  height: 280px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  text-align: center;
}

.flip-card-front {
  background: linear-gradient(145deg, rgba(232, 184, 75, 0.08) 0%, rgba(26, 26, 46, 0.95) 100%);
  border: 1px solid rgba(232, 184, 75, 0.2);
}

.flip-card-back {
  background: linear-gradient(145deg, #e8b84b 0%, #d4a43a 100%);
  color: #1a1a2e;
  transform: rotateY(180deg);
  border: 1px solid #e8b84b;
}

.card-number {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: rgba(232, 184, 75, 0.2);
  margin-bottom: 12px;
  line-height: 1;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #f5f0e8;
  margin-bottom: 16px;
}

.card-flip-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6c757d;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: auto;
}

.card-back-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.card-back-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(26, 26, 46, 0.8);
  margin-bottom: 20px;
}

.card-back-meta {
  display: flex;
  gap: 12px;
}

.meta-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  background: rgba(26, 26, 46, 0.15);
  border-radius: 2px;
  color: #1a1a2e;
}

/* ===== Heritage Timeline ===== */
#heritage {
  background: #1a1a2e;
}

.heritage-timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #e8b84b, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  padding: 20px 0;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 14px;
  height: 14px;
  background: #1a1a2e;
  border: 2px solid #e8b84b;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: background-color 0.3s ease;
}

.timeline-item.revealed .timeline-marker {
  background: #e8b84b;
}

.timeline-content {
  width: 42%;
  padding: 24px;
  border: 1px solid rgba(232, 184, 75, 0.15);
  background: rgba(245, 240, 232, 0.03);
  transition: border-color 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: auto;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  text-align: left;
}

.timeline-content:hover {
  border-color: rgba(232, 184, 75, 0.4);
}

.timeline-year {
  font-family: 'Caveat', cursive;
  font-size: 32px;
  font-weight: 700;
  color: #e8b84b;
}

.timeline-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #f5f0e8;
  margin: 8px 0;
}

.timeline-content p {
  font-size: 14px;
  line-height: 1.7;
  color: #6c757d;
}

/* ===== Contact Section ===== */
#contact {
  background: linear-gradient(180deg, #0f0f20 0%, #1a1a2e 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-item.revealed {
  opacity: 1;
  transform: translateX(0);
}

.contact-icon {
  flex-shrink: 0;
  margin-top: 4px;
}

.contact-item h4 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: #e8b84b;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 14px;
  color: #6c757d;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-form.revealed {
  opacity: 1;
  transform: translateY(0);
}

.form-group {
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(245, 240, 232, 0.05);
  border: 1px solid rgba(232, 184, 75, 0.2);
  color: #f5f0e8;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: #6c757d;
}

.form-input:hover,
.form-input:focus {
  border-color: #e8b84b;
  background: rgba(245, 240, 232, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  padding: 16px 40px;
  background: transparent;
  border: 1.5px solid #e8b84b;
  color: #e8b84b;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  align-self: flex-start;
}

.form-submit:hover {
  background-color: #e8b84b;
  color: #1a1a2e;
  box-shadow: 0 4px 30px rgba(232, 184, 75, 0.3);
}

.form-submit.sent {
  background-color: #4a90d9;
  border-color: #4a90d9;
  color: #f5f0e8;
}

/* ===== Footer ===== */
#footer {
  background: #0d0d1a;
  padding: 60px 20px 40px;
  text-align: center;
}

.footer-ornament {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.footer-text {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: #6c757d;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-tagline {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: #e8b84b;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .tutorials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 48px;
  }
  .hero-title-accent {
    font-size: 56px;
  }
  .handwritten {
    font-size: 40px;
  }
  .timeline-line { display: none; }
  .timeline-marker { display: none; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }
  .timeline-content {
    width: 100%;
    text-align: left;
  }
  .timeline-item:nth-child(odd) .timeline-content {
    text-align: left;
    margin-right: 0;
  }
}

@media (max-width: 600px) {
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 36px;
  }
  .hero-title-accent {
    font-size: 42px;
  }
  section {
    padding: 60px 16px;
  }
}
