@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#080a0f;
  --panel:#10141c;
  --panel-soft:rgba(255,255,255,0.06);
  --line:rgba(255,255,255,0.12);
  --text:#f8fafc;
  --muted:#a8b3c5;
  --soft:#d8dee8;
  --gold:#7db7ff;
  --steel:#dce7f3;
  --brand-blue:#5da7f2;
  --teal:#9fb6cc;
  --rose:#7ea7d8;
  --accent-soft:rgba(93,167,242,0.14);
  --accent-line:rgba(125,183,255,0.38);
  --button-gradient:linear-gradient(135deg, #eef6ff, #7db7ff 48%, #2f7fca);
  --shadow:0 24px 80px rgba(0,0,0,0.38);
  --radius:8px;
  --body-bg:
    linear-gradient(180deg, rgba(93,167,242,0.14), transparent 18rem),
    linear-gradient(135deg, #05070c 0%, #111827 48%, #07111d 100%);
  --grid-line:rgba(255,255,255,0.035);
  --nav-bg:rgba(8,10,15,0.76);
  --hero-overlay:
    linear-gradient(90deg, rgba(8,10,15,0.96) 0%, rgba(8,10,15,0.78) 39%, rgba(8,10,15,0.28) 72%, rgba(8,10,15,0.68) 100%),
    linear-gradient(180deg, transparent 0%, #080a0f 98%);
  --hero-mobile-overlay:linear-gradient(180deg, rgba(8,10,15,0.86), rgba(8,10,15,0.96));
  --hero-image:url('assets/krylance-hero.png');
  --solid-surface:rgba(16,20,28,0.9);
  --solid-surface-hover:rgba(24,30,40,0.96);
  --glass-surface:rgba(255,255,255,0.045);
  --field-bg:rgba(8,10,15,0.72);
  --field-bg-focus:rgba(8,10,15,0.92);
  --auth-overlay:linear-gradient(90deg, rgba(8,10,15,0.94), rgba(8,10,15,0.64));
  --auth-card-bg:rgba(9,12,18,0.82);
  --button-text:#080a0f;
  color-scheme:dark;
}

:root[data-theme="light"]{
  --bg:#f8fbff;
  --panel:#ffffff;
  --panel-soft:rgba(14,20,29,0.045);
  --line:rgba(18,24,33,0.13);
  --text:#10141c;
  --muted:#5f6877;
  --soft:#2d3543;
  --gold:#1d6fb8;
  --steel:#253040;
  --brand-blue:#1d6fb8;
  --teal:#5f7894;
  --rose:#4f7ead;
  --accent-soft:rgba(29,111,184,0.11);
  --accent-line:rgba(29,111,184,0.24);
  --button-gradient:linear-gradient(135deg, #f8fbff, #d7e8fb 42%, #4b9be0);
  --shadow:0 24px 70px rgba(29,57,89,0.14);
  --body-bg:
    linear-gradient(180deg, rgba(29,111,184,0.14), transparent 18rem),
    linear-gradient(135deg, #f8fbff 0%, #eef5fb 48%, #ffffff 100%);
  --grid-line:rgba(16,24,33,0.055);
  --nav-bg:rgba(248,251,255,0.84);
  --hero-overlay:
    linear-gradient(90deg, rgba(248,251,255,0.96) 0%, rgba(248,251,255,0.84) 44%, rgba(248,251,255,0.36) 76%, rgba(248,251,255,0.78) 100%),
    linear-gradient(180deg, transparent 0%, #f8fbff 98%);
  --hero-mobile-overlay:linear-gradient(180deg, rgba(248,251,255,0.86), rgba(248,251,255,0.98));
  --hero-image:url('assets/krylance-hero-light.png');
  --solid-surface:rgba(255,255,255,0.86);
  --solid-surface-hover:rgba(255,255,255,0.98);
  --glass-surface:rgba(255,255,255,0.68);
  --field-bg:rgba(255,255,255,0.72);
  --field-bg-focus:rgba(255,255,255,0.96);
  --auth-overlay:linear-gradient(90deg, rgba(248,251,255,0.94), rgba(248,251,255,0.7));
  --auth-card-bg:rgba(255,255,255,0.84);
  --button-text:#10141c;
  color-scheme:light;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:'Inter', Arial, sans-serif;
  background:var(--body-bg);
  color:var(--text);
  transition:background 220ms ease, color 220ms ease;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 72%);
  z-index:-1;
}

a{
  color:inherit;
}

.navbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding:20px clamp(20px, 5vw, 72px);
  background:var(--nav-bg);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(18px);
}

.logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  width:min(310px, 58vw);
  min-width:210px;
  padding:5px 8px;
  border-radius:var(--radius);
  background:linear-gradient(90deg, rgba(5,8,14,0.72), rgba(5,8,14,0.24));
}

:root[data-theme="light"] .logo{
  background:linear-gradient(90deg, rgba(255,255,255,0.82), rgba(255,255,255,0.28));
}

.logo img{
  display:block;
  width:100%;
  height:auto;
  filter:drop-shadow(0 10px 30px rgba(93,167,242,0.18));
}

.logo .logo-light{
  display:none;
}

:root[data-theme="light"] .logo .logo-dark{
  display:none;
}

:root[data-theme="light"] .logo .logo-light{
  display:block;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:10px;
}

.site-controls{
  display:flex;
  align-items:center;
  gap:8px;
}

.nav-links a{
  color:var(--muted);
  text-decoration:none;
  padding:10px 12px;
  font-size:15px;
  font-weight:600;
  transition:color 180ms ease, background 180ms ease;
}

.nav-links a:hover{
  color:var(--text);
}

.nav-links .nav-cta{
  color:var(--text);
  border:1px solid var(--accent-line);
  background:var(--accent-soft);
  border-radius:var(--radius);
}

.control-button{
  min-width:44px;
  min-height:40px;
  padding:0 12px;
  color:var(--text);
  border-color:var(--line);
  background:var(--panel-soft);
  box-shadow:none;
}

.hero{
  min-height:calc(100vh - 78px);
  display:flex;
  align-items:center;
  padding:88px clamp(20px, 6vw, 88px) 64px;
  background:
    var(--hero-overlay),
    var(--hero-image) center right / cover no-repeat;
}

.hero-content{
  width:min(680px, 100%);
}

.eyebrow{
  margin:0 0 16px;
  color:var(--brand-blue);
  font-size:12px;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}

h1,
h2,
h3,
p{
  margin-top:0;
}

.hero h1{
  margin-bottom:24px;
  font-size:clamp(34px, 5.2vw, 66px);
  line-height:1.04;
  font-weight:800;
  max-width:720px;
}

.hero-copy{
  max-width:650px;
  margin-bottom:34px;
  color:var(--soft);
  font-size:clamp(18px, 2vw, 22px);
  line-height:1.65;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-bottom:54px;
}

.button,
button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:0 22px;
  border:1px solid transparent;
  border-radius:var(--radius);
  font:inherit;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
button:hover{
  transform:translateY(-2px);
}

.primary,
button{
  color:var(--button-text);
  background:var(--button-gradient);
  box-shadow:0 18px 50px rgba(93,167,242,0.22);
}

.secondary{
  color:var(--text);
  border-color:var(--line);
  background:rgba(255,255,255,0.07);
}

.site-controls .control-button{
  min-width:44px;
  min-height:40px;
  padding:0 12px;
  color:var(--text);
  border-color:var(--line);
  background:var(--panel-soft);
  box-shadow:none;
}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:1px;
  max-width:720px;
  border:1px solid var(--line);
  background:var(--line);
  box-shadow:var(--shadow);
}

.hero-stats div{
  padding:20px;
  background:var(--solid-surface);
  backdrop-filter:blur(14px);
}

.hero-stats strong{
  display:block;
  margin-bottom:6px;
  color:var(--brand-blue);
  font-size:28px;
}

.hero-stats span{
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

main{
  overflow:hidden;
}

.intro,
.services,
.pricing,
.process,
.contact,
.dashboard{
  padding:96px clamp(20px, 6vw, 88px);
}

.intro{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(320px, 0.68fr);
  gap:44px;
  align-items:end;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:var(--panel-soft);
}

.intro h2,
.section-heading h2,
.contact h2,
.dashboard h1{
  margin:0;
  font-size:clamp(32px, 4.5vw, 58px);
  line-height:1.03;
}

.intro > p,
.contact-copy p,
.dashboard-heading p{
  color:var(--muted);
  font-size:18px;
  line-height:1.75;
}

.section-heading{
  max-width:780px;
  margin-bottom:42px;
}

.cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  border:1px solid var(--line);
  background:var(--line);
  box-shadow:var(--shadow);
}

.card{
  min-height:330px;
  padding:34px;
  background:var(--solid-surface);
  transition:transform 180ms ease, background 180ms ease;
}

.card:hover{
  transform:translateY(-6px);
  background:var(--solid-surface-hover);
}

.featured-card{
  background:linear-gradient(180deg, var(--accent-soft), var(--solid-surface-hover));
}

.card-number{
  display:block;
  margin-bottom:84px;
  color:var(--brand-blue);
  font-size:13px;
  font-weight:800;
}

.card h3,
.timeline h3{
  margin-bottom:12px;
  font-size:24px;
}

.card p,
.price-card p,
.timeline p,
.message-card p{
  color:var(--muted);
  line-height:1.7;
}

.pricing{
  background:linear-gradient(180deg, transparent, var(--panel-soft));
}

.pricing-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}

.price-card{
  display:flex;
  flex-direction:column;
  min-height:280px;
  padding:30px;
  border:1px solid var(--line);
  background:var(--solid-surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.featured-price{
  border-color:var(--accent-line);
  background:linear-gradient(180deg, var(--accent-soft), var(--solid-surface-hover));
}

.price-label{
  margin-bottom:52px;
  color:var(--brand-blue);
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
}

.price-card h3{
  margin-bottom:14px;
  color:var(--text);
  font-size:clamp(42px, 5vw, 64px);
  line-height:1;
}

.price-card h3 span{
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:16px;
  line-height:1.3;
}

.price-button{
  width:100%;
  margin-top:auto;
}

.process{
  background:linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}

.timeline{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}

.timeline div{
  padding:26px;
  border:1px solid var(--line);
  background:var(--glass-surface);
  border-radius:var(--radius);
}

.timeline span{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  margin-bottom:28px;
  color:#091016;
  background:linear-gradient(135deg, #dcecff, var(--brand-blue));
  border-radius:50%;
  font-weight:800;
}

.contact-panel{
  display:grid;
  grid-template-columns:minmax(0, 0.85fr) minmax(320px, 0.65fr);
  gap:36px;
  align-items:stretch;
  padding:42px;
  border:1px solid var(--accent-line);
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 42%),
    var(--glass-surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.contact-copy a,
.message-card a{
  color:var(--brand-blue);
  font-weight:800;
  text-decoration:none;
}

.contact-form{
  display:grid;
  gap:14px;
}

.contact-form.is-locked input,
.contact-form.is-locked textarea{
  opacity:0.62;
  cursor:not-allowed;
}

.contact-auth-note{
  margin:2px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.contact-form:not(.is-locked) .contact-auth-note{
  display:none;
}

input,
textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--field-bg);
  color:var(--text);
  font:inherit;
  outline:none;
  padding:17px 18px;
  transition:border-color 180ms ease, background 180ms ease;
}

input:focus,
textarea:focus{
  border-color:var(--brand-blue);
  background:var(--field-bg-focus);
}

textarea{
  min-height:150px;
  resize:vertical;
}

.auth-page,
.dashboard-page{
  min-height:100vh;
}

.auth-shell{
  min-height:calc(100vh - 78px);
  display:grid;
  place-items:center;
  padding:52px 20px;
  background:
    var(--auth-overlay),
    var(--hero-image) center / cover no-repeat;
}

.auth-card{
  width:min(520px, 100%);
  padding:42px;
  border:1px solid var(--line);
  background:var(--auth-card-bg);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter:blur(20px);
}

.auth-card h1{
  margin-bottom:6px;
  font-size:44px;
}

.auth-card h2{
  margin-bottom:28px;
  color:var(--muted);
  font-size:20px;
  font-weight:600;
}

.auth-card input{
  margin-bottom:12px;
}

.auth-card button{
  width:100%;
  margin-top:10px;
}

#switch-text{
  margin:24px 0 0;
  color:var(--muted);
  text-align:center;
}

#switch-text span{
  color:var(--brand-blue);
  cursor:pointer;
  font-weight:800;
}

.dashboard{
  max-width:1180px;
  margin:0 auto;
}

.dashboard-heading{
  max-width:720px;
  margin-bottom:34px;
}

.messages-grid{
  display:grid;
  gap:16px;
}

.message-card,
.empty-state{
  padding:24px;
  border:1px solid var(--line);
  background:var(--glass-surface);
  border-radius:var(--radius);
}

.message-topline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
}

.message-topline h3{
  margin:0;
  font-size:22px;
}

.message-topline span,
.empty-state{
  color:var(--muted);
}

.site-footer{
  padding:28px clamp(20px, 6vw, 88px);
  border-top:1px solid var(--line);
  background:var(--nav-bg);
  color:var(--muted);
  text-align:center;
}

.site-footer p{
  margin:0;
  font-size:14px;
  font-weight:700;
}

@media (max-width:900px){
  .navbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .nav-links{
    width:100%;
    flex-wrap:wrap;
  }

  .site-controls{
    position:absolute;
    top:18px;
    right:20px;
  }

  .hero{
    min-height:auto;
    padding-top:74px;
  }

  .hero-stats,
  .intro,
  .cards,
  .pricing-grid,
  .timeline,
  .contact-panel{
    grid-template-columns:1fr;
  }

  .card{
    min-height:auto;
  }

  .card-number{
    margin-bottom:42px;
  }
}

@media (max-width:1180px) and (min-width:901px){
  .cards,
  .pricing-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:560px){
  .nav-links a{
    padding:9px 8px;
    font-size:14px;
  }

  .hero{
    background:
      var(--hero-mobile-overlay),
      var(--hero-image) center / cover no-repeat;
  }

  .hero-actions,
  .button{
    width:100%;
  }

  .intro,
  .services,
  .pricing,
  .process,
  .contact,
  .dashboard{
    padding:68px 20px;
  }

  .contact-panel,
  .auth-card{
    padding:26px;
  }

  .message-topline{
    display:block;
  }
}
