/* ===== RainbowPainting — stylesheet ===== */
:root {
  --c-ink: #1c2230;
  --c-body: #4a5163;
  --c-muted: #8a90a0;
  --c-line: #e8eaf0;
  --c-bg: #ffffff;
  --c-bg-soft: #f7f8fb;
  --c-primary: #2f7bff;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(28, 34, 48, 0.10);
  --shadow-sm: 0 6px 20px rgba(28, 34, 48, 0.08);
  --rainbow: linear-gradient(90deg, #e74c3c, #e67e22, #f1c40f, #2ecc71, #3498db, #9b59b6);
  --max: 1140px;
  --font-head: "Jost", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--font-head); color: var(--c-ink); line-height: 1.1; margin: 0 0 .4em; font-weight: 600; }
.grad-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-sub { color: var(--c-muted); font-size: 1.05rem; margin: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 8px 22px rgba(47,123,255,.32); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(47,123,255,.42); }
.btn-ghost { border-color: var(--c-line); color: var(--c-ink); background: #fff; }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-logo { height: 22px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-family: var(--font-head); font-weight: 500; color: var(--c-ink); font-size: .98rem; transition: color .15s; }
.nav a:hover { color: var(--c-primary); }
.nav .nav-cta { background: var(--c-primary); color: #fff; padding: 9px 20px; border-radius: 999px; }
.nav .nav-cta:hover { color: #fff; opacity: .92; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero { position: relative; background: radial-gradient(1200px 500px at 80% -10%, #eef4ff 0%, #fff 60%); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; padding: 72px 24px 84px; }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 600; color: var(--c-primary); margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); font-weight: 700; }
.lead { font-size: 1.14rem; max-width: 30em; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art img { margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(28,34,48,.16)); max-height: 420px; width: auto; }
.rainbow-bar { height: 8px; background: var(--rainbow); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.about-text p { margin: 0 0 16px; }
.claim { font-size: 1.15rem; color: var(--c-ink); }

/* ===== Projects ===== */
.projects { background: var(--c-bg-soft); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.project-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-img { aspect-ratio: 4/3; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-img img { transform: scale(1.06); }
.project-body { padding: 18px 20px 22px; display: flex; align-items: baseline; gap: 12px; }
.project-body .num { font-family: var(--font-head); font-weight: 700; color: transparent; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; font-size: 1.1rem; }
.project-body h3 { font-size: 1.15rem; margin: 0; font-weight: 500; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-intro p { font-size: 1.08rem; }
.contact-list { list-style: none; padding: 0; margin: 26px 0; }
.contact-list li { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 1.05rem; color: var(--c-ink); }
.contact-list svg { width: 22px; height: 22px; fill: var(--c-primary); flex-shrink: 0; }
.socials { display: flex; gap: 12px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid var(--c-line); transition: .2s; }
.socials a:hover { background: var(--rainbow); border-color: transparent; transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; fill: var(--c-ink); transition: fill .2s; }
.socials a:hover svg { fill: #fff; }

.contact-form { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; color: var(--c-ink); margin-bottom: 7px; font-size: .95rem; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--c-ink); background: var(--c-bg-soft);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,123,255,.15); background: #fff; }
.field textarea { resize: vertical; }
.form-note { margin: 14px 0 0; font-size: .92rem; min-height: 1.2em; text-align: center; }
.form-note.ok { color: #1f9d55; }
.form-note.err { color: #d64545; }

/* ===== Footer ===== */
.site-footer { background: var(--c-ink); color: #c7cdda; padding: 48px 0 40px; text-align: center; }
.site-footer .footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-logo { height: 24px; filter: brightness(0) invert(1); opacity: .95; }
.footer-tag { margin: 4px 0; color: #aeb5c6; }
.copyright { font-size: .88rem; color: #7c8499; margin: 8px 0 0; }
.site-footer::before { content: ""; display: block; height: 6px; background: var(--rainbow); position: absolute; top: 0; left: 0; right: 0; }
.site-footer { position: relative; }

/* ===== Portfolio page ===== */
.page-hero { background: var(--c-bg-soft); padding: 64px 0 56px; text-align: center; border-bottom: 1px solid var(--c-line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { color: var(--c-muted); max-width: 620px; margin: 0 auto; font-size: 1.08rem; }
.gallery { columns: 3; column-gap: 22px; }
.gallery figure { margin: 0 0 22px; break-inside: avoid; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; }
.gallery img { width: 100%; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px; color: #fff;
  font-family: var(--font-head); font-weight: 500;
  background: linear-gradient(transparent, rgba(20,24,34,.75));
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 48px; }
  .hero-text { order: 2; }
  .hero-art { order: 1; }
  .hero-art img { max-height: 300px; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--c-line); padding: 8px 0;
    transform: translateY(-140%); transition: transform .3s ease; box-shadow: var(--shadow-sm);
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 13px 24px; }
  .nav .nav-cta { border-radius: 0; margin: 6px 24px; text-align: center; padding: 12px; }
  .project-grid { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
}
