/* ============================================
   ORDO LEGATUM — Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --gold: #b0956b;
  --gold-light: #c8ad85;
  --gold-dark: #8a7452;
  --black: #0a0a0a;
  --black-soft: #111111;
  --black-card: #141414;
  --white: #fcfcfc;
  --white-muted: #b0b0b0;
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --max-width: 1200px;
  --section-padding: clamp(80px, 12vw, 160px);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- HEADER ---- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100;
  padding: 18px 0;
  transition: background .4s, padding .4s, backdrop-filter .4s;
}
.site-header.scrolled {
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(16px);
  padding: 12px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { height: 42px; width: auto; transition: opacity .3s; }
.site-header:hover .header-logo { opacity: .85; }
.btn-nav { padding: 10px 28px; font-size: .72rem; }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--white);
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(10,10,10,.96); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a {
  font-family: var(--font-display); font-size: 1.8rem;
  color: var(--white-muted); transition: color .3s;
}
.mobile-menu a:hover { color: var(--gold); }

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg video, .hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.5) 0%, rgba(10,10,10,.7) 50%, rgba(10,10,10,.9) 100%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 0 20px;
  animation: fadeUp 1.2s ease-out;
}
.hero-logo { width: clamp(280px, 40vw, 520px); opacity: .95; }
.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(.75rem, 1.2vw, .9rem);
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold);
}
.hero-subtitle {
  font-size: clamp(.85rem, 1.2vw, 1.05rem);
  color: var(--white-muted); max-width: 560px;
  font-weight: 300; line-height: 1.7;
}
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  transition: background .4s, color .4s, transform .3s;
  cursor: pointer; background: transparent;
}
.btn-gold:hover {
  background: var(--gold); color: var(--black);
  transform: translateY(-2px);
}
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--white-muted); font-size: .65rem;
  letter-spacing: .2em; text-transform: uppercase;
  animation: pulse 2s infinite;
}
.scroll-hint .line { width: 1px; height: 40px; background: var(--gold-dark); }

/* ---- ABOUT SECTION ---- */
.about {
  padding: var(--section-padding) 0;
  background: var(--black-soft);
  position: relative;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.about-image-wrapper {
  position: relative; overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16/10;
}
.about-image-wrapper img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 8s ease;
}
.about-image-wrapper:hover img { transform: scale(1.05); }
.about-image-wrapper::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(176,149,107,.15);
  pointer-events: none;
}
.brasao-wrapper {
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.brasao-wrapper::after { display: none; }
.brasao-img {
  width: 65% !important; height: auto !important;
  object-fit: contain !important;
  animation: slowSpin 60s linear infinite;
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.section-label {
  font-family: var(--font-body);
  font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before {
  content: ''; width: 32px; height: 1px; background: var(--gold);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400; line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.section-text {
  color: var(--white-muted);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.8; font-weight: 300;
  max-width: 600px;
}
.highlight-words {
  font-family: var(--font-display);
  font-style: italic; color: var(--gold);
  font-size: 1.1em;
}

/* ---- FEATURES / HOW IT WORKS ---- */
.features {
  padding: var(--section-padding) 0;
  position: relative;
  background: var(--black);
}
.features-header {
  text-align: center; margin-bottom: clamp(40px, 6vw, 72px);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--black-card);
  border: 1px solid rgba(176,149,107,.08);
  padding: clamp(28px, 3vw, 40px);
  transition: border-color .4s, transform .4s;
  position: relative;
}
.feature-card:hover {
  border-color: rgba(176,149,107,.3);
  transform: translateY(-4px);
}
.feature-icon {
  width: 44px; height: 44px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-dark); border-radius: 50%;
  color: var(--gold); font-size: 1.1rem;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 400;
  margin-bottom: 12px; color: var(--white);
}
.feature-card p {
  color: var(--white-muted); font-size: .88rem;
  line-height: 1.7; font-weight: 300;
}
.feature-number {
  position: absolute; top: 16px; right: 20px;
  font-family: var(--font-display); font-size: 2.8rem;
  font-weight: 300; color: rgba(176,149,107,.08);
  line-height: 1;
}

/* ---- PILLARS / MOTORS ---- */
.pillars {
  padding: var(--section-padding) 0;
  position: relative; overflow: hidden;
}
.pillars-bg {
  position: absolute; inset: 0; z-index: 0;
}
.pillars-bg img { width: 100%; height: 100%; object-fit: cover; }
.pillars-overlay {
  position: absolute; inset: 0;
  background: rgba(10,10,10,.82);
  z-index: 1;
}
.pillars-content { position: relative; z-index: 2; }
.pillars-header { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar-card {
  text-align: center;
  padding: clamp(32px, 4vw, 48px) clamp(20px, 2vw, 32px);
  border: 1px solid rgba(176,149,107,.12);
  background: rgba(20,20,20,.5);
  backdrop-filter: blur(8px);
  transition: border-color .4s, transform .4s;
}
.pillar-card:hover {
  border-color: rgba(176,149,107,.35);
  transform: translateY(-4px);
}
.pillar-emblem {
  width: 56px; height: 56px; margin: 0 auto 20px;
  fill: var(--gold); opacity: .8;
}
.pillar-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 400; margin-bottom: 12px;
  color: var(--gold-light);
}
.pillar-card p {
  color: var(--white-muted); font-size: .88rem;
  line-height: 1.7; font-weight: 300;
}

/* ---- EXPERIENCE VIDEO ---- */
.experience {
  padding: var(--section-padding) 0;
  background: var(--black);
}
.experience-header { text-align: center; margin-bottom: 48px; }
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border: 1px solid rgba(176,149,107,0.15);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ---- MENTORS ---- */
.mentors {
  padding: var(--section-padding) 0;
  background: var(--black-soft);
}
.mentors-header { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.mentors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.mentor-card { text-align: center; }
.mentor-photo {
  width: 100%; aspect-ratio: 3/4;
  overflow: hidden; margin-bottom: 20px;
  position: relative;
}
.mentor-photo img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 28%;
  filter: grayscale(30%);
  transition: filter .6s, transform .6s;
}
.mentor-card:hover .mentor-photo img {
  filter: grayscale(0%); transform: scale(1.04);
}
.mentor-photo::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(176,149,107,.1);
  pointer-events: none;
}
.mentor-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 400; margin-bottom: 4px;
}
.mentor-card .role {
  color: var(--gold); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  font-weight: 400;
}

/* ---- QUOTE / PHILOSOPHY ---- */
.philosophy {
  padding: var(--section-padding) 0;
  position: relative; overflow: hidden;
  min-height: 70vh; display: flex; align-items: center;
}
.philosophy-bg {
  position: absolute; inset: 0; z-index: 0;
}
.philosophy-bg img { width: 100%; height: 100%; object-fit: cover; }
.philosophy-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.75), rgba(10,10,10,.85));
  z-index: 1;
}
.philosophy-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 720px; margin: 0 auto;
}
.quote-latin {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--gold); margin-bottom: 24px;
  font-weight: 300;
}
.quote-text {
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  color: var(--white-muted); line-height: 1.8;
  font-weight: 300; margin-bottom: 12px;
}
.quote-author {
  font-size: .8rem; color: var(--gold-dark);
  letter-spacing: .1em; margin-top: 20px;
}

/* ---- MEMBERS GALLERY ---- */
.members-gallery {
  padding: var(--section-padding) 0;
  background: var(--black-soft);
}
.gallery-wrapper {
  position: relative;
  overflow: hidden;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid var(--gold-dark);
  box-shadow: 
    inset 0 0 0 1px var(--gold),
    0 20px 50px rgba(0,0,0,0.6);
  max-width: 1000px;
  margin: 0 auto;
}
.gallery-wrapper::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-dark);
  pointer-events: none;
  z-index: 1;
}
.full-gallery-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.5s ease;
  filter: sepia(20%) contrast(1.05);
}
.gallery-wrapper:hover .full-gallery-img {
  transform: scale(1.03);
}
.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 40px 30px 20px;
  background: linear-gradient(0deg, rgba(10,10,10,0.9) 0%, transparent 100%);
  text-align: center;
  z-index: 2;
}
.gallery-overlay p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  color: var(--gold-light);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ---- FORM SECTION ---- */
.form-section {
  padding: var(--section-padding) 0;
  background: var(--black);
  border-top: 1px solid rgba(176,149,107,.08);
}
.form-wrapper {
  max-width: 680px; margin: 0 auto;
}
.form-header {
  text-align: center; margin-bottom: 40px;
}
.form-emblem {
  width: 72px; margin: 0 auto 20px; opacity: .7;
}
.interest-form {
  display: flex; flex-direction: column; gap: 20px;
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.form-group label {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-dark);
}
.form-group input, .form-group textarea {
  background: var(--black-card);
  border: 1px solid rgba(176,149,107,.15);
  color: var(--white);
  padding: 14px 16px;
  font-family: var(--font-body); font-size: .9rem;
  transition: border-color .3s;
  outline: none; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--gold);
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: rgba(255,255,255,.2);
}
.btn-submit {
  align-self: center; margin-top: 8px;
}
.form-success {
  text-align: center;
  padding: 48px 20px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.bitrix-form-container {
  min-height: 400px;
  width: 100%;
}
.bitrix-form-container iframe {
  width: 100% !important;
}

/* ---- FOOTER ---- */
.site-footer {
  padding: 40px 0 28px;
  border-top: 1px solid rgba(176,149,107,.08);
  background: var(--black);
}
.footer-copyright {
  font-size: .72rem; color: rgba(255,255,255,.25);
  letter-spacing: .15em; text-transform: uppercase;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .btn-nav { display: none; }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .brasao-wrapper { max-width: 280px; margin: 0 auto; }
  .pillars-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 20px; }
  .mentors-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; gap: 30px; }
  .features-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-logo { width: clamp(200px, 80vw, 380px); }
  .hero-subtitle { font-size: 0.95rem; }
  .section-padding { padding: 80px 0; }
}

@media (max-width: 480px) {
  :root { --section-padding: 48px; }
  .hero-title { font-size: 1.8rem; }
}
