/* =========================================================
   AS extras — newsletter popup, blog, contact form, legal.
   Built on the theme tokens from astra-child-as/assets/css/bridal.css.
   ========================================================= */

/* ---------- Forms: shared bits ---------- */
.as-form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.as-form__info {
  margin: 0 0 1.25rem;
  font-size: 0.74rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--as-muted, #6b6b6b);
  max-width: 62ch;
}
.as-form__info a { color: inherit; }

/* Consent wording is a full sentence — keep it readable (no small caps, box beside text). */
.as-form .as-form__check {
  flex-direction: row;
  align-items: flex-start;
}
.as-form .as-form__check input { flex: 0 0 auto; width: auto; }
.as-form .as-form__check span {
  font-size: 0.8rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-transform: none;
}
html[data-page-tone="ink"] .as-form__info,
html[data-page-tone="dark"] .as-form__info { color: rgba(245, 245, 245, 0.6); }

.as-form--contact { max-width: 760px; }
.as-form--contact .as-form__grid { margin-bottom: 1.25rem; }
#formularz { scroll-margin-top: calc(var(--as-nav-h, 88px) + 1rem); }

/* ---------- Newsletter popup ---------- */
html.as-nl-lock { overflow: hidden; }

.as-nl {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}
.as-nl[hidden] { display: none; }

.as-nl__veil {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.7s var(--as-ease, ease);
  cursor: pointer;
}

.as-nl__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  width: min(960px, 100%);
  max-height: min(92svh, 660px);
  background: var(--as-cream, #f3efe8);
  color: var(--as-ink, #1a1a1a);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  transition:
    opacity 0.7s var(--as-ease, ease),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.as-nl--plain .as-nl__dialog {
  grid-template-columns: 1fr;
  width: min(560px, 100%);
}
.as-nl.is-open .as-nl__veil { opacity: 1; }
.as-nl.is-open .as-nl__dialog { opacity: 1; transform: none; }

.as-nl__media {
  position: relative;
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: #1a1a1a;
}
.as-nl__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 30%;
  filter: saturate(0.82) contrast(1.03);
  transform: scale(1.08);
  transition: transform 2.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.as-nl.is-open .as-nl__media img { transform: scale(1); }
.as-nl__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 46%);
  pointer-events: none;
}
.as-nl__sign {
  position: absolute;
  left: clamp(1.25rem, 3vw, 2rem);
  bottom: clamp(1.25rem, 3vw, 2rem);
  z-index: 1;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  line-height: 1.7;
}
.as-nl__sign span {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  opacity: 0.72;
}

.as-nl__body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 3.75rem) clamp(1.5rem, 4.5vw, 3.5rem) clamp(1.75rem, 4vw, 2.75rem);
  overflow: auto;
}
.as-nl__body > .as-eyebrow { margin-bottom: 1rem; }
.as-nl__body h2 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: 0.06em;
  line-height: 1.18;
  text-transform: uppercase;
}
.as-nl__lead {
  margin: 0 0 1.6rem;
  max-width: 40ch;
  color: var(--as-muted, #6b6b6b);
  font-size: 0.96rem;
  line-height: 1.7;
}

.as-nl__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--as-ink, #1a1a1a);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.45s var(--as-ease, ease);
}
.as-nl__close:hover,
.as-nl__close:focus-visible { transform: rotate(90deg); }

.as-nl .as-form { margin: 0; }
.as-nl .as-form__news-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  margin: 0 0 1rem;
}
.as-nl .as-form__news-row label { margin: 0; grid-column: auto; }
.as-nl .as-form__news-row input {
  width: 100%;
  height: 100%;
  min-height: 3.1rem;
  border-right: 0;
  background: #fff;
}
.as-nl .as-form__news-row .as-btn { white-space: nowrap; }
.as-nl .as-form.is-busy { opacity: 0.6; pointer-events: none; }
.as-nl .as-form__check {
  margin: 0 0 0.8rem;
}
.as-nl .as-form__check span { font-size: 0.74rem; }
.as-nl .as-form__info {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.55;
}
.as-nl__err {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #9b2c2c;
}
.as-nl__done {
  padding-top: 1.25rem;
  border-top: 1px solid var(--as-gold-soft, rgba(196, 165, 116, 0.35));
}
.as-nl__done-msg {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}
.as-nl__skip {
  align-self: flex-start;
  margin-top: 1.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--as-muted, #6b6b6b);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.4em;
  cursor: pointer;
}
.as-nl__skip:hover { color: var(--as-ink, #1a1a1a); }

@media (max-width: 720px) {
  .as-nl { padding: 0; align-items: end; }
  .as-nl__dialog {
    grid-template-columns: 1fr;
    grid-template-rows: 30svh auto;
    width: 100%;
    max-height: 94svh;
    transform: translateY(60px);
  }
  .as-nl--plain .as-nl__dialog { grid-template-rows: auto; }
  .as-nl__media { min-height: 0; }
  .as-nl__body { padding: 1.75rem 1.25rem 1.5rem; }
  .as-nl__close { color: #fff; top: 0.4rem; right: 0.4rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
  .as-nl--plain .as-nl__close { color: var(--as-ink, #1a1a1a); text-shadow: none; }
  .as-nl .as-form__news-row { grid-template-columns: 1fr; }
  .as-nl .as-form__news-row label { grid-column: 1 / -1; }
  .as-nl .as-form__news-row input { border-right: 1px solid var(--as-line, #e8e8e8); }
}

@media (prefers-reduced-motion: reduce) {
  .as-nl__veil,
  .as-nl__dialog,
  .as-nl__media img { transition: none; }
  .as-nl__dialog,
  .as-nl__media img { transform: none; }
}

/* The popup keeps its own cream palette whatever tone (data-page-tone) the page below has. */
html .as-nl .as-nl__body h2,
html .as-nl .as-nl__body .as-nl__done-msg { color: var(--as-ink, #1a1a1a) !important; }
html .as-nl .as-nl__body .as-eyebrow { color: var(--as-gold, #c4a574) !important; }
html .as-nl .as-nl__lead,
html .as-nl .as-form__info,
html .as-nl .as-form__info a,
html .as-nl .as-form__check,
html .as-nl .as-form__check span,
html .as-nl .as-nl__skip { color: var(--as-muted, #6b6b6b) !important; }
html .as-nl .as-form input[type="email"] {
  background: #fff !important;
  color: var(--as-ink, #1a1a1a) !important;
  border-color: var(--as-line, #e8e8e8) !important;
}
html .as-nl .as-form .as-btn--fill {
  background: var(--as-ink, #1a1a1a);
  border-color: var(--as-ink, #1a1a1a);
  color: #fff !important;
}
html .as-nl .as-nl__close,
html .as-nl .as-nl__close:hover,
html .as-nl .as-nl__close:focus,
html .as-nl .as-nl__close:active {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--as-ink, #1a1a1a) !important;
}
@media (max-width: 720px) {
  html .as-nl:not(.as-nl--plain) .as-nl__close,
  html .as-nl:not(.as-nl--plain) .as-nl__close:hover,
  html .as-nl:not(.as-nl--plain) .as-nl__close:focus { color: #fff !important; }
}

/* ---------- Blog ---------- */
.as-blog-head { text-align: left; }
.as-blog-list {
  padding: clamp(3rem, 7vw, 6rem) var(--as-pad, 1.5rem);
}
.as-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2.5rem);
  max-width: 1280px;
  margin: 0 auto;
}
.as-blog-card { display: flex; flex-direction: column; }
.as-blog-card__media {
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.25rem;
  overflow: hidden;
  background: var(--as-cream, #f3efe8);
}
.as-blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--as-ease, ease);
}
.as-blog-card:hover .as-blog-card__media img { transform: scale(1.04); }
.as-blog-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--as-gold, #c4a574);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.as-blog-card__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}
.as-blog-card__title a { color: inherit; text-decoration: none; }
.as-blog-card__excerpt {
  margin: 0 0 1.1rem;
  color: var(--as-muted, #6b6b6b);
  font-size: 0.95rem;
}
.as-blog-card .as-link-os { margin-top: auto; align-self: flex-start; }

.as-blog-empty {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}
.as-blog-empty h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
}

.as-blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.as-blog-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--as-line, #e8e8e8);
  color: var(--as-ink, #1a1a1a);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-decoration: none;
}
.as-blog-pagination .page-numbers.current {
  background: var(--as-ink, #1a1a1a);
  border-color: var(--as-ink, #1a1a1a);
  color: #fff;
}

/* Single post */
body.single-post.as-luxury .site-content > .ast-container {
  max-width: 820px;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
body.single-post.as-luxury .entry-title {
  font-size: clamp(1.8rem, 4.2vw, 2.9rem);
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}
body.single-post.as-luxury .entry-meta,
body.single-post.as-luxury .entry-meta a {
  color: var(--as-gold, #c4a574);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
}
body.single-post.as-luxury .entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
body.single-post.as-luxury .entry-content h2,
body.single-post.as-luxury .entry-content h3 {
  margin-top: 2.5rem;
  text-transform: uppercase;
}
body.single-post.as-luxury .entry-content img,
body.single-post.as-luxury .post-thumb img { width: 100%; height: auto; }
.as-blog-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--as-line, #e8e8e8);
}

/* ---------- Legal pages ---------- */
.as-legal .as-todo {
  padding: 0.05em 0.35em;
  background: rgba(196, 165, 116, 0.18);
  font-style: normal;
}
.as-legal table {
  width: 100%;
  margin: 1rem 0 2rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.as-legal th,
.as-legal td {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--as-line, #e8e8e8);
  text-align: left;
  vertical-align: top;
}
.as-legal th {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--as-muted, #6b6b6b);
}
.as-legal .as-legal__form {
  padding: 1.5rem;
  background: var(--as-cream, #f3efe8);
}
@media (max-width: 720px) {
  .as-legal table,
  .as-legal thead,
  .as-legal tbody,
  .as-legal tr,
  .as-legal th,
  .as-legal td { display: block; }
  .as-legal thead { display: none; }
  .as-legal tr { margin-bottom: 1rem; border: 1px solid var(--as-line, #e8e8e8); }
  .as-legal td { border: 0; border-bottom: 1px solid var(--as-line, #e8e8e8); }
  .as-legal td:last-child { border-bottom: 0; }
}
