/* ===== Global Reset & Fonts ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #0a1016;
  color: #e6edf6;
  font-family: "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Medium.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ===== Theme Vars ===== */
:root{
  --ocean-900:#071018;
  --ocean-800:#0d1a24;
  --ocean-700:#0f2431;
  --teal-400:#18c3c8;
  --teal-300:#63e1e4;
  --sky-200:#a6e0ff;
  --ink-100:#cfe3f3;
  --ink-300:#9fb4c9;
  --radius-xl:24px;
  --radius-lg:16px;
  --radius-md:12px;
  --shadow-soft:0 10px 30px rgba(6, 29, 39, .35);
}

/* ===== Layout ===== */
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ===== Header ===== */
.site-header{
  position: fixed; inset: 0 0 auto 0; height: 64px; z-index: 1000;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(10,16,22,.85), rgba(10,16,22,.35) 70%, rgba(10,16,22,0));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner{ height: 64px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.logo{
  font-weight: 700; letter-spacing:.5px; color:#fff; text-decoration:none;
  font-size: 1.2rem;
}

/* ===== Nav ===== */
.site-nav { display: flex; align-items: center; }
.site-nav ul{ display:flex; gap:20px; align-items:center; margin:0; padding:0; list-style:none; }
.site-nav a{
  color:#e6edf6; text-decoration:none; padding:8px 10px; border-radius:10px;
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.site-nav a:hover{ background:#0f2431; color:var(--teal-300); transform: translateY(-1px); }

/* Burger */
.nav-toggle{ display:none; width:44px; height:44px; border:0; background:transparent; cursor:pointer; border-radius:12px; }
.nav-toggle .bar{ display:block; width:24px; height:2px; margin:5px auto; background:#e6edf6; transition:transform .25s ease, opacity .25s ease; }

/* ===== Main ===== */
.site-main{ padding-top: 84px; }

/* ===== Footer ===== */
.site-footer{ padding: 28px 0 44px; background: var(--ocean-800); border-top: 1px solid rgba(255,255,255,.06); margin-top: 40px; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.foot-brand{ margin:0; color:var(--ink-300); }
.foot-nav{ display:flex; gap:16px; list-style:none; margin:0; padding:0; }
.foot-nav a{ color:var(--ink-100); text-decoration:none; }
.foot-nav a:hover{ color: var(--teal-300); }

/* ===== Utilities ===== */
.reveal{ opacity:0; transform: translateY(18px) scale(.995); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform: none; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px; border-radius:14px; text-decoration:none; font-weight:600;
  border:1px solid transparent; box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn-primary{ background: linear-gradient(135deg, var(--teal-400), var(--sky-200)); color:#06202a; }
.btn-primary:hover{ transform: translateY(-2px); }
.btn-ghost{ background: transparent; color: var(--teal-300); border-color: rgba(99,225,228,.35); }
.btn-ghost:hover{ background: rgba(99,225,228,.1); }

/* Back to top */
.to-top{
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(10,16,22,.75); color:#e6edf6;
  display:grid; place-items:center; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease;
}
.to-top.is-on{ opacity:1; pointer-events:auto; }
.to-top:hover{ transform: translateY(-2px); }

/* ===== Responsive ===== */
@media (max-width: 992px){
  .nav-toggle{ display:block; }
  .site-nav ul{ position:absolute; top:64px; right:0; background:rgba(10,16,22,.98);
    border-left:1px solid rgba(255,255,255,.06); border-bottom:1px solid rgba(255,255,255,.06);
    padding:16px; gap:8px; flex-direction:column; min-width: 220px; transform: translateY(-10px); opacity:0; pointer-events:none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .site-nav[data-open="true"] ul{ opacity:1; transform:none; pointer-events:auto; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2){ opacity:0; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}
/* ===== Footer (global) ===== */
.footer{
  padding: 28px 0 44px;
  background: var(--ocean-800);
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-container{
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 16px;
  align-items: start;
}
.footer-column a{
  color: var(--ink-100);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-column a:hover{ color: var(--teal-300); }
.footer-brand{
  margin: 0 0 6px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
}
.footer-contact p{ margin: 6px 0; }
.footer-links{
  display: grid;
  gap: 8px;
  justify-items: end;
}

/* анимация появления в унисон с .animate-on-scroll */
.footer.animate-on-scroll{ opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.footer.animate-on-scroll.is-visible{ opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 768px){
  .footer-container{
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer-links{ justify-items: start; }
}
/* ===== Thank You Page (Castline) ===== */
.thankyou-section{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 56px);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(24,195,200,.12), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(166,224,255,.08), transparent 60%),
    linear-gradient(180deg, #071018, #0b1b27);
  overflow: hidden;
}

.thankyou-container{
  width: min(760px, 100%);
  text-align: center;
  padding: clamp(18px, 3.2vw, 28px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl, 20px);
  background: linear-gradient(180deg, rgba(15,36,49,.55), rgba(7,16,24,.55));
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  position: relative;
  isolation: isolate;
  animation: ty-float .9s ease-out both;
}

.thankyou-title{
  margin: 0 0 10px;
  font-size: clamp(24px, 4.5vw, 40px);
  line-height: 1.15;
  background: linear-gradient(90deg, var(--teal-400, #4ad9d9), var(--sky-200, #a6e0ff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.thankyou-message{
  margin: 0 0 16px;
  color: var(--ink-100, #c8d4e3);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.6;
}

/* Стили кнопки — локально скоупим, чтобы не влиять на другие страницы */
.thankyou-section .cta-button{
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius-lg, 14px);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(24,195,200,.10);
  color: #e6edf6;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.thankyou-section .cta-button:hover{
  transform: translateY(-1px);
  border-color: rgba(99,225,228,.35);
  background: linear-gradient(135deg, var(--teal-400, #4ad9d9), var(--sky-200, #a6e0ff));
  color: #06202a;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.thankyou-section .cta-button:focus-visible{
  outline: 2px solid var(--teal-400, #4ad9d9);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99,225,228,.25);
}

/* Декор: мягкие «блики» вокруг карточки */
.thankyou-container::before,
.thankyou-container::after{
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(99,225,228,.25), transparent 60%);
  filter: blur(18px);
  z-index: -1;
  animation: ty-orb 7s ease-in-out infinite alternate;
}
.thankyou-container::after{
  inset: auto auto -22% -10%;
  width: 260px; height: 260px;
  background: radial-gradient(circle at 70% 70%, rgba(166,224,255,.22), transparent 60%);
  animation-duration: 8.5s;
}

/* Анимации */
@keyframes ty-float{
  from{ opacity: 0; transform: translateY(18px) scale(.985); }
  to  { opacity: 1; transform: none; }
}
@keyframes ty-orb{
  from{ transform: translateY(0) translateX(0) scale(1); opacity: .9; }
  to  { transform: translateY(10px) translateX(-8px) scale(1.03); opacity: 1; }
}

/* Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .thankyou-container,
  .thankyou-container::before,
  .thankyou-container::after{
    animation: none !important;
  }
}

/* Мобайл */
@media (max-width: 540px){
  .thankyou-container{ padding: 16px; }
  .thankyou-section .cta-button{ width: 100%; }
}
