/* ============================================
   SLATE WEB CO. — Stylesheet
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --bg-raised: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --text: #e4e4e7;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --accent-glow: rgba(14,165,233,0.15);
  --accent-glow-strong: rgba(14,165,233,0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.text-accent { color: var(--accent-light); }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: inline; } }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 0.9rem;
  padding: 12px 28px; border-radius: 50px; border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn--sm { padding: 8px 20px; font-size: 0.85rem; }
.btn--lg { padding: 16px 36px; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 12px rgba(0,0,0,0.3);
}
.btn--primary:hover {
  background: var(--accent-light); transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow-strong), 0 8px 24px rgba(0,0,0,0.4);
}
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-light);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-light); }

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0; transition: all var(--transition);
}
.nav--scrolled {
  background: rgba(10,10,15,0.85); backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border); padding: 12px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.nav__logo-icon {
  width: 36px; height: 36px; background: var(--accent); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff;
}
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); font-weight: 500; }
.nav__links a:hover { color: var(--text); }
.nav__links .btn { color: #fff; }
.nav__toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 1001;
}
.nav__toggle span {
  display: block; width: 100%; height: 2px; background: var(--text);
  position: absolute; left: 0; transition: all var(--transition); border-radius: 2px;
}
.nav__toggle span:nth-child(1) { top: 2px; }
.nav__toggle span:nth-child(2) { top: 11px; }
.nav__toggle span:nth-child(3) { top: 20px; }
.nav__toggle.active span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
    background: var(--bg-raised); flex-direction: column; padding: 100px 40px 40px;
    gap: 24px; transform: translateX(100%); transition: transform var(--transition);
    border-left: 1px solid var(--border);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.1rem; }
}

/* --- Hero --- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}
.hero__glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4;
}
.hero__glow--1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -100px; opacity: 0.08; }
.hero__glow--2 { width: 400px; height: 400px; background: #6366f1; bottom: -100px; left: -50px; opacity: 0.06; }

.hero__content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 500;
  color: var(--accent-light); border: 1px solid rgba(14,165,233,0.2);
  background: rgba(14,165,233,0.05); margin-bottom: 28px;
}
.hero__badge-dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.1;
  letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero__title-accent {
  background: linear-gradient(135deg, var(--accent-light) 0%, #6366f1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 40px; line-height: 1.7;
}
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  padding-top: 48px; border-top: 1px solid var(--border);
}
.hero__stat { text-align: center; }
.hero__stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.hero__stat-plus { font-size: 1.5rem; font-weight: 700; color: var(--accent-light); }
.hero__stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.hero__stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
}
.hero__scroll-line {
  width: 1px; height: 48px; background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s infinite;
}
@keyframes scroll-line {
  0% { opacity: 1; transform: scaleY(1); } 50% { opacity: 0.3; } 100% { opacity: 1; transform: scaleY(1); }
}

/* --- Sections Common --- */
.section { padding: 120px 0; }
.section__header { text-align: center; max-width: 600px; margin: 0 auto 64px; }
.section__tag {
  display: inline-block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-light); margin-bottom: 16px;
}
.section__title {
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.section__desc { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; }

/* --- Services --- */
.services { background: var(--bg); }
.services__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.service-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.service-card:hover::before { opacity: 1; }
.service-card__icon {
  width: 48px; height: 48px; background: var(--accent-glow); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
  color: var(--accent-light);
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.service-card__desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.service-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-card__tags li {
  font-size: 0.75rem; padding: 4px 12px; border-radius: 50px;
  background: rgba(255,255,255,0.04); color: var(--text-dim); font-weight: 500;
  border: 1px solid var(--border);
}

/* --- About --- */
.about { background: var(--bg-raised); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; gap: 48px; } }

.about__visual-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; position: relative; overflow: hidden;
}
.about__visual-code { font-family: var(--mono); font-size: 0.85rem; line-height: 2; }
.code-line { display: block; }
.code-indent { padding-left: 24px; }
.code-indent2 { padding-left: 48px; }
.code-tag { color: var(--accent-light); }
.code-attr { color: #a78bfa; }
.code-str { color: #34d399; }
.about__visual-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.about__content .section__tag { text-align: left; }
.about__content .section__title { text-align: left; }
.about__text { color: var(--text-muted); margin-bottom: 16px; font-size: 1.02rem; line-height: 1.7; }
.about__values { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.about__value {
  display: flex; align-items: flex-start; gap: 12px;
}
.about__value-icon { color: var(--accent); font-size: 0.6rem; margin-top: 6px; flex-shrink: 0; }
.about__value strong { display: block; font-weight: 600; font-size: 0.95rem; }
.about__value span { font-size: 0.9rem; color: var(--text-muted); }

/* --- Work / Portfolio --- */
.work { background: var(--bg); }
.work__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.work-card--wide { grid-column: 1 / -1; }
@media (max-width: 768px) { .work__grid { grid-template-columns: 1fr; } }

.work-card {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--transition); cursor: pointer;
}
.work-card:hover {
  border-color: var(--border-light); transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.work-card__img {
  padding: 40px 40px 0; display: flex; justify-content: center;
  min-height: 220px; position: relative;
}
.work-card--wide .work-card__img { min-height: 300px; }
.work-card__mockup { width: 100%; max-width: 500px; }
.work-card--wide .work-card__mockup { max-width: 700px; }

.work-card__browser {
  background: rgba(0,0,0,0.4); border-radius: 8px 8px 0 0; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.work-card__dots { display: flex; gap: 6px; }
.work-card__dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.work-card__url { font-size: 0.7rem; color: rgba(255,255,255,0.3); font-family: var(--mono); }
.work-card__screen { padding: 20px; border-radius: 0 0 0 0; min-height: 80px; }
.work-card__block { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.2); }

.work-card__info { padding: 28px 32px; }
.work-card__cat {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-light); margin-bottom: 8px; display: block;
}
.work-card__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.work-card__desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* --- Contact --- */
.contact {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
}
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; gap: 48px; } }

.contact__info .section__tag { text-align: left; }
.contact__info .section__title { text-align: left; }
.contact__text { color: var(--text-muted); margin-bottom: 32px; font-size: 1.02rem; line-height: 1.7; }
.contact__details { display: flex; flex-direction: column; gap: 16px; }
.contact__detail {
  display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.95rem;
}
.contact__detail svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.contact__detail a { color: var(--text); transition: color var(--transition); }
.contact__detail a:hover { color: var(--accent-light); }

.contact__form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .form__row { grid-template-columns: 1fr; } }
.form__group { margin-bottom: 20px; }
.form__label {
  display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
  margin-bottom: 8px;
}
.form__input {
  width: 100%; padding: 14px 18px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: var(--font); font-size: 0.95rem;
  transition: all var(--transition); outline: none;
}
.form__input::placeholder { color: var(--text-dim); }
.form__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form__select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.form__textarea { resize: vertical; min-height: 100px; }

/* --- Footer --- */
.footer {
  background: var(--bg); border-top: 1px solid var(--border); padding: 64px 0 32px;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__tagline { color: var(--text-muted); margin-top: 16px; font-size: 0.9rem; max-width: 280px; }
.footer__links h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 16px; }
.footer__links a, .footer__links span {
  display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--text); }
.footer__bottom {
  padding-top: 32px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-dim); text-align: center;
}

/* --- Animations --- */
.anim-fade, .anim-slide {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.anim-fade.visible, .anim-slide.visible {
  opacity: 1; transform: translateY(0);
}

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
