/* ===== Adrian Modzelewski – strony internetowe ===== */
:root {
  --bg: #fafaf7;
  --tint: #f0f3fc;
  /* pastelowe akcenty */
  --sky: #dfe8ff;
  --mint: #d9f3e6;
  --peach: #ffe4d6;
  --lilac: #ebe2fb;
  --card: #ffffff;
  --ink: #0b1222;
  --ink-2: #4b5060;
  --muted: #7a7f8c;
  --line: #e4e4dd;
  --accent: #0a6cf5;
  --brand-grad: linear-gradient(120deg, #1fa2ff, #0a6cf5 55%, #0848d8);
  --accent-soft: #e3efff;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(17, 19, 24, .04), 0 12px 32px -12px rgba(17, 19, 24, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 21px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }

/* ===== Przyciski ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none;
  font: 500 16px/1 'Jost', sans-serif; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 10px 24px -10px rgba(10, 108, 245, .6); transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--small { padding: 10px 20px; font-size: 15px; white-space: nowrap; }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.link {
  display: inline-flex; gap: 6px; font-weight: 500; text-decoration: none;
  color: var(--accent); border-bottom: 1.5px solid currentColor; padding-bottom: 1px;
}
.link:hover { color: var(--ink); }
.link--muted { color: var(--muted); border: 0; font-weight: 400; }

/* ===== Nagłówek ===== */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, .82);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.top.is-scrolled { border-color: var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand__logo { height: 34px; width: auto; }
.brand__mark-img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); font-size: 16px; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--ink); }
.menu-btn { display: none; }

/* ===== Hero ===== */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -12%; animation: drift 18s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 88%); mask-image: linear-gradient(180deg, #000 62%, transparent 88%); z-index: -2; pointer-events: none;
  background:
    radial-gradient(520px 420px at 88% 18%, rgba(10, 108, 245, .22), transparent 70%),
    radial-gradient(460px 380px at 70% 92%, rgba(255, 170, 130, .32), transparent 70%),
    radial-gradient(420px 360px at 4% 8%, rgba(160, 120, 240, .18), transparent 70%);
}
.hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); margin-bottom: 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 560px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.perks { list-style: none; padding: 26px 0 0; margin: 0; display: flex; gap: clamp(20px, 4vw, 48px); border-top: 1px solid var(--line); max-width: 560px; }
.perks li { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); line-height: 1.4; }
.perks strong { font-size: 17px; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.hero__photo { position: relative; margin: 0; justify-self: center; width: min(100%, 420px); }
.hero__photo::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; border-radius: 28px;
  background: linear-gradient(135deg, var(--sky), var(--lilac) 55%, var(--peach)); z-index: -1;
}
.hero__photo img { border-radius: 28px; box-shadow: var(--shadow); aspect-ratio: 3 / 4; object-fit: cover; }
.badge {
  position: absolute; left: -22px; bottom: 36px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow);
  font-size: 15px; font-weight: 500;
}
.badge__dot { width: 9px; height: 9px; border-radius: 50%; background: #1fae5b; box-shadow: 0 0 0 4px rgba(31, 174, 91, .18); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(31, 174, 91, 0); } }

/* ===== Sekcje ===== */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--tint { background: linear-gradient(180deg, var(--tint), #f6f3fb); }
.head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.head h2 { margin-bottom: 16px; }
.head p:last-child { color: var(--ink-2); margin: 0; }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* Usługi */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px 26px; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__no {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--sky); font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 32px;
}
.card:nth-child(2) .card__no { background: var(--mint); color: #1d7a4c; }
.card:nth-child(3) .card__no { background: var(--peach); color: #b4532a; }
.card:nth-child(4) .card__no { background: var(--lilac); color: #6b45b8; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-2); font-size: 16px; margin: 0; }
.features { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); font-size: 16px; }
.features li { display: flex; align-items: center; gap: 10px; }
.features li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5.5 9.2 2.3 2.3 4.7-5' fill='none' stroke='%230a6cf5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Realizacje */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 36px); }
.work__shot {
  display: block; border-radius: var(--radius); overflow: hidden; background: var(--card);
  box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 24px;
}
.work__shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
a.work__shot:hover img { transform: scale(1.03); }
.work__shot { position: relative; }
.work__tag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .92); color: var(--ink); padding: 10px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap;
}
.work__meta h3 { margin-bottom: 10px; }
.work__meta p { color: var(--ink-2); font-size: 16px; margin-bottom: 14px; }

/* Jak pracuję */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: krok; }
.steps li { counter-increment: krok; padding-top: 22px; border-top: 2px solid var(--line); position: relative; }
.steps li::before {
  content: counter(krok, decimal-leading-zero); position: absolute; top: -2px; left: 0;
  width: 48px; border-top: 2px solid var(--accent); padding-top: 20px;
  font-size: 14px; font-weight: 500; color: var(--accent);
}
.steps li:nth-child(2)::before { border-color: #2fa36b; color: #1d7a4c; }
.steps li:nth-child(3)::before { border-color: #e98552; color: #b4532a; }
.steps li:nth-child(4)::before { border-color: #8e63d9; color: #6b45b8; }
.steps h3 { margin: 34px 0 10px; }
.steps p { color: var(--ink-2); font-size: 16px; margin: 0; }

/* O mnie */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.about__photo { margin: 0; }
.about__photo img { border-radius: 28px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; max-width: 380px; }
.about__text h2 { margin-bottom: 22px; }
.about__text p:not(.eyebrow) { color: var(--ink-2); }
.about__text strong { color: var(--ink); font-weight: 600; }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__info h2 { margin-bottom: 18px; }
.contact__info > p:not(.eyebrow) { color: var(--ink-2); max-width: 460px; }
.channels { list-style: none; padding: 0; margin: 32px 0 0; }
.channels li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channels__label { color: var(--muted); font-size: 15px; }
.channels a { text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.channels a:hover { color: var(--accent); }

#kontakt { background: radial-gradient(600px 480px at 85% 40%, rgba(10, 108, 245, .10), transparent 70%), radial-gradient(500px 400px at 10% 90%, rgba(255, 170, 130, .14), transparent 70%); }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: 400 16px/1.4 'Jost', sans-serif;
  transition: border-color .2s, background .2s;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23111318' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 16px center / 12px no-repeat;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background-color: #fff; outline: none; }
.field .is-invalid { border-color: #d6453d; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.form__status { margin: 14px 0 0; font-size: 15px; min-height: 1.4em; }
.form__status.ok { color: #1a8a4a; }
.form__status.err { color: #c0392b; }

.form { position: relative; }
.form.is-sent > :not(.form__success) { visibility: hidden; }
.form__success {
  position: absolute; inset: 0; border-radius: inherit; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 32px; outline: none; animation: rise .6s cubic-bezier(.2, .7, .2, 1);
}
.form__success[hidden] { display: none; }
.form__success h3 { font-size: clamp(24px, 3vw, 30px); margin: 22px 0 10px; }
.form__success p { color: var(--ink-2); max-width: 340px; margin-bottom: 26px; }
.form__check svg { width: 84px; height: 84px; display: block; }
.form__check circle { fill: #e3f6ec; stroke: #1fae5b; stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s ease-out .1s forwards; }
.form__check path { fill: none; stroke: #1a8a4a; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; animation: draw .45s ease-out .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Stopka */
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 15px; color: var(--muted); }
.foot__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot__links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.foot a:hover { color: var(--ink); }
.brand--foot { color: var(--ink); }

/* Podstrony (prywatność, 404) */
.page { padding: clamp(48px, 8vw, 96px) 0; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 28px; }
.page h2 { font-size: 22px; margin: 36px 0 10px; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 1.2em; margin: 0 0 1em; }
.page a { color: var(--accent); }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound .lead { margin-inline: auto; }

/* ===== Animacje przy przewijaniu ===== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .steps .reveal:nth-child(2), .works .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(4), .steps .reveal:nth-child(4) { transition-delay: .24s; }

/* ===== Dynamika ===== */
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-4%, 3%) scale(1.06); }
  100% { transform: translate(3%, -2%) scale(1.02); }
}

/* Wejście treści hero po wczytaniu */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.js .hero__text > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__text > :nth-child(2) { animation-delay: .1s; }
.js .hero__text > :nth-child(3) { animation-delay: .2s; }
.js .hero__text > :nth-child(4) { animation-delay: .3s; }
.js .hero__text > :nth-child(5) { animation-delay: .4s; }
.js .hero__photo { animation: pop 1.1s cubic-bezier(.2, .7, .2, 1) .15s both; }

/* Zmieniające się słowo w nagłówku */
.rotator { display: inline-block; position: relative; white-space: nowrap; }
.rotator::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em; border-radius: 1em;
  background: var(--brand-grad); transform-origin: left;
  animation: underline .8s cubic-bezier(.2, .7, .2, 1) .9s both;
}
@keyframes underline { from { transform: scaleX(0); } }
.rotator__word { display: inline-block; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.rotator__word.is-out { animation: wordOut .38s cubic-bezier(.5, 0, .75, 0) forwards; }
.rotator__word.is-in { animation: wordIn .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes wordOut { to { opacity: 0; transform: translateY(-.45em); filter: blur(4px); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em); filter: blur(4px); } }

/* Strzałka w przycisku */
.btn__arrow { display: inline-block; transition: transform .25s; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Unoszący się znaczek przy zdjęciu */
.badge { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }
.hero__photo img { transition: transform .4s ease-out; will-change: transform; }

/* Karty usług: numer podskakuje przy najechaniu */
.card__no { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.card:hover .card__no { transform: rotate(-8deg) scale(1.1); }

/* Realizacje: lekkie uniesienie */
.work__shot { transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.work:hover .work__shot { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(17, 19, 24, .05), 0 24px 48px -16px rgba(17, 19, 24, .22); }

/* ===== Tablet ===== */
@media (max-width: 1000px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
}

/* ===== Telefon ===== */
@media (max-width: 860px) {
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; margin-right: -8px;
    background: none; border: 0; cursor: pointer;
  }
  .menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--ink); }
  .nav .btn { margin-top: 18px; padding: 15px; }

  .hero__in, .about, .contact, .works { grid-template-columns: 1fr; }
  .hero__photo { order: -1; width: min(78%, 340px); margin-bottom: 8px; }
  .hero__photo::before { inset: 16px -16px -16px 16px; }
  .badge { left: 50%; transform: translateX(-50%); bottom: -18px; white-space: nowrap; font-size: 14px; }
  .hero__text { text-align: left; }
  .about__photo img { max-width: 300px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__logo { height: 28px; }
  .top__in > .btn { padding: 9px 14px; font-size: 14px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .card__no { margin-bottom: 20px; }
  .steps h3 { margin-top: 28px; }
  .hero__cta .btn { width: 100%; }
  .perks { gap: 14px; justify-content: space-between; }
  .perks li { font-size: 13px; }
  .perks strong { font-size: 16px; }
  .channels li { grid-template-columns: 1fr; gap: 2px; }
  .foot__in { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .form__check circle, .form__check path { stroke-dashoffset: 0; }
}
