/*
Theme Name: Nia Lock
Description: Light, fast personal theme for nialock.com. Text lives in the page editor; this theme supplies the look, the language switcher, Google/AI data (with Yoast SEO) and /llms.txt.
Version: 1.3.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nialock
*/

:root {
  --nl-cream: #fbf7f2;
  --nl-white: #ffffff;
  --nl-blush: #f5e7e9;
  --nl-plum: #4b2a5c;
  --nl-plum-dark: #331c40;
  --nl-gold: #c9a55c;
  --nl-gold-deep: #94702f;
  --nl-ink: #2e2a30;
  --nl-muted: #5b5360;
  --nl-line: #eadfd3;
  --nl-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --nl-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nl-wide: 1120px;
  --nl-text: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--nl-cream);
  color: var(--nl-ink);
  font-family: var(--nl-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nl-plum); text-underline-offset: 3px; }
a:hover { color: var(--nl-plum-dark); }
:focus-visible { outline: 3px solid var(--nl-gold-deep); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--nl-serif); color: var(--nl-plum); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }

.nl-skip { position: absolute; left: -9999px; top: 8px; background: var(--nl-plum); color: var(--nl-cream); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.nl-skip:focus { left: 12px; }

/* Header */
.nl-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 247, 242, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--nl-line); }
.nl-header__inner { max-width: var(--nl-wide); margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nl-brand { font-family: var(--nl-serif); font-size: 1.35rem; font-weight: 700; color: var(--nl-plum); text-decoration: none; white-space: nowrap; }
.nl-brand span { color: var(--nl-gold-deep); }
.nl-nav { display: flex; align-items: center; gap: 22px; }
.nl-nav__links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nl-nav__links a { color: var(--nl-ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nl-nav__links a:hover { color: var(--nl-plum); }
@media (max-width: 760px) { .nl-nav__links { display: none; } }
.nl-lang ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nl-lang a, .nl-lang span { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--nl-plum); border: 1px solid var(--nl-line); background: var(--nl-white); }
.nl-lang [aria-current], .nl-lang .current a, .nl-lang a[aria-current="page"] { background: var(--nl-plum); color: var(--nl-cream); border-color: var(--nl-plum); }

/* Content width rules for blocks. WordPress may wrap group content in .wp-block-group__inner-container; it must not limit width. */
.nl-section > .wp-block-group__inner-container { max-width: none; margin: 0; padding: 0; }
.nl-main { display: block; }
.nl-main > * { max-width: var(--nl-text); margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.nl-main > .alignwide { max-width: none; padding-left: 0; padding-right: 0; }
.nl-main > .nl-section { max-width: none; padding-left: 16px; padding-right: 16px; }
.nl-section { padding: clamp(48px, 8vw, 88px) 16px; scroll-margin-top: 64px; }
.nl-section > *, .nl-section > .wp-block-group__inner-container > * { max-width: var(--nl-text); margin-left: auto; margin-right: auto; }
.nl-section > .alignwide, .nl-section > .wp-block-columns, .nl-section > .wp-block-gallery, .nl-section > .nl-cards, .nl-section > .wp-block-group__inner-container > .alignwide, .nl-section > .wp-block-group__inner-container > .wp-block-columns, .nl-section > .wp-block-group__inner-container > .wp-block-gallery, .nl-section > .wp-block-group__inner-container > .nl-cards { max-width: var(--nl-wide); }
.nl-section--white { background: var(--nl-white); }
.nl-section--blush { background: var(--nl-blush); }
.nl-section--plum { background: var(--nl-plum); color: var(--nl-cream); }
.nl-section--plum h2, .nl-section--plum h3 { color: var(--nl-cream); }
.nl-section--plum a { color: #f1dca8; }
.nl-kicker { font-size: .8rem !important; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--nl-gold-deep); margin-bottom: .6em !important; }
.nl-section--plum .nl-kicker { color: var(--nl-gold); }
.nl-lead { font-size: 1.2rem; color: var(--nl-muted); }

/* Hero: magazine cover (dark plum, gold glow, arched photo) */
.nl-hero { position: relative; overflow: hidden; color: #efe3f3; background: radial-gradient(120% 90% at 85% 15%, #6d3f84 0%, var(--nl-plum) 40%, var(--nl-plum-dark) 100%); padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 112px); }
.nl-hero::before { content: ""; position: absolute; width: 560px; height: 560px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 165, 92, .38), rgba(201, 165, 92, 0) 68%); pointer-events: none; }
.nl-hero::after { content: ""; position: absolute; width: 460px; height: 460px; left: -120px; bottom: -220px; border-radius: 50%; border: 1px solid rgba(201, 165, 92, .28); pointer-events: none; }
.nl-hero > .wp-block-columns, .nl-hero > .wp-block-group__inner-container > .wp-block-columns { position: relative; z-index: 1; align-items: center; gap: clamp(32px, 6vw, 80px); }
@media (min-width: 781px) {
  .nl-hero > .wp-block-columns, .nl-hero > .wp-block-group__inner-container > .wp-block-columns { flex-direction: row-reverse; }
  .nl-hero > .wp-block-columns > .wp-block-column:first-child, .nl-hero > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column:first-child { flex: 0 0 40%; }
}
.nl-hero__photo { position: relative; margin: 0; }
.nl-hero__photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1.5px solid var(--nl-gold); border-radius: 50% 50% 26px 26px / 30% 30% 26px 26px; }
.nl-hero__photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: 50% 50% 26px 26px / 30% 30% 26px 26px; box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .7); }
@media (max-width: 780px) {
  .nl-hero__photo { max-width: 320px; margin: 0 auto 12px; }
  .nl-hero__photo::before { inset: 12px -12px -12px 12px; }
}
.nl-hero .nl-kicker { color: var(--nl-gold); display: flex; align-items: center; gap: 12px; }
.nl-hero .nl-kicker::before { content: ""; width: 36px; height: 1.5px; background: var(--nl-gold); }
.nl-hero h1 { font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .98; letter-spacing: -.02em; margin: 0 0 .25em; color: #f6e7c4; background: linear-gradient(100deg, #fff8ea 0%, #f1dca8 45%, #c9a55c 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nl-hero .nl-tagline { font-family: var(--nl-serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.45; color: #fff7ee; margin-bottom: .9em; }
.nl-hero p { color: #e4d6ea; }
.nl-hero a { color: #f1dca8; }
.nl-hero .nl-badges { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--nl-gold); margin-bottom: 1.2em; }
.nl-hero .wp-block-social-link { background: none !important; }
.nl-hero .wp-block-social-link a { background: rgba(255, 255, 255, .06); border: 1px solid rgba(241, 220, 168, .55); color: #f1dca8; }
.nl-hero .wp-block-social-link a:hover { background: var(--nl-gold); color: var(--nl-plum-dark); }
.nl-hero .wp-block-button__link { background: var(--nl-gold); border-color: var(--nl-gold); color: var(--nl-plum-dark) !important; }
.nl-hero .wp-block-button__link:hover { background: #e2c37f; border-color: #e2c37f; }
.nl-hero .is-style-outline .wp-block-button__link { background: transparent; border-color: rgba(255, 247, 238, .7); color: #fff7ee !important; }
.nl-hero .is-style-outline .wp-block-button__link:hover { background: #fff7ee; color: var(--nl-plum) !important; }
.nl-hero :focus-visible { outline-color: var(--nl-gold); }

/* Photo + text sections (photos of Nia through the page, no gallery) */
.nl-section > .wp-block-columns.nl-split, .nl-section > .wp-block-group__inner-container > .wp-block-columns.nl-split { align-items: center; gap: clamp(32px, 6vw, 72px); }
@media (min-width: 781px) {
  .nl-split > .nl-photo-col { flex: 0 0 38% !important; }
  .nl-split--flip { flex-direction: row-reverse; }
}
.nl-photo { position: relative; margin: 0; }
.nl-photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1.5px solid var(--nl-gold); border-radius: 24px; }
.nl-split--flip .nl-photo::before { inset: 14px 14px -14px -14px; }
.nl-photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; border-radius: 24px; box-shadow: 0 28px 60px -32px rgba(51, 28, 64, .55); }
.nl-split--flip .nl-photo img { object-position: 58% 40%; }
@media (min-width: 781px) { .nl-split--flip { align-items: flex-start !important; } .nl-split--flip > .nl-photo-col { position: sticky; top: 96px; } }
.nl-photo--wide img { object-position: 45% 30%; }
@media (max-width: 780px) {
  .nl-photo { max-width: 340px; margin: 0 auto 8px; }
  .nl-photo::before, .nl-split--flip .nl-photo::before { inset: 10px -10px -10px 10px; }
}
.nl-quote { font-family: var(--nl-serif); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.45; color: var(--nl-plum); border-left: 3px solid var(--nl-gold); padding-left: 18px; margin-top: 1.4em; }
.nl-split .nl-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Inner pages (My story): smaller title, wider reading */
.nl-hero--page h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
.nl-nav__links a[aria-current="page"] { color: var(--nl-plum); text-decoration: underline; text-decoration-color: var(--nl-gold); text-underline-offset: 8px; }
.nl-section h3 + p { margin-top: 0; }
.nl-section--plum .nl-quote { color: #fff7ee; }
/* Buttons on plum sections: gold + cream, like the hero (plum on plum was invisible) */
.nl-section--plum .wp-block-button__link { background: var(--nl-gold); border-color: var(--nl-gold); color: var(--nl-plum-dark) !important; }
.nl-section--plum .wp-block-button__link:hover { background: #e2c37f; border-color: #e2c37f; }
.nl-section--plum .is-style-outline .wp-block-button__link { background: transparent; border-color: rgba(255, 247, 238, .7); color: #fff7ee !important; }
.nl-section--plum .is-style-outline .wp-block-button__link:hover { background: #fff7ee; color: var(--nl-plum) !important; }

/* Buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 0; }
.wp-block-button__link { display: inline-block; padding: 13px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--nl-plum); color: var(--nl-cream) !important; border: 2px solid var(--nl-plum); }
.wp-block-button__link:hover { background: var(--nl-plum-dark); border-color: var(--nl-plum-dark); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--nl-plum) !important; }
.is-style-outline .wp-block-button__link:hover { background: var(--nl-plum); color: var(--nl-cream) !important; }

/* Social icons (core/social-links) */
.wp-block-social-links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 1.2em 0 0; }
.wp-block-social-link { margin: 0; }
.wp-block-social-link a { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--nl-plum); color: var(--nl-cream); }
.wp-block-social-link a:hover { background: var(--nl-gold-deep); }
.wp-block-social-link svg { width: 22px; height: 22px; fill: currentColor; }
.wp-block-social-link .wp-block-social-link-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Follow cards */
.nl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 2em auto 0; }
.nl-cards a { display: block; padding: 22px 22px 20px; border-radius: 20px; background: var(--nl-white); border: 1px solid var(--nl-line); text-decoration: none; color: var(--nl-ink); transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
.nl-cards a:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -22px rgba(51, 28, 64, .5); }
.nl-cards strong { display: block; font-family: var(--nl-serif); font-size: 1.25rem; color: var(--nl-plum); }
.nl-cards .nl-handle { display: block; font-weight: 600; color: var(--nl-gold-deep); margin: 2px 0 8px; }
.nl-cards .nl-what { display: block; font-size: .95rem; color: var(--nl-muted); }

/* Gallery */
.nl-section .wp-block-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 2em auto 0; padding: 0; }
@media (min-width: 900px) { .nl-section .wp-block-gallery { grid-template-columns: repeat(4, 1fr); } }
/* WordPress's gallery CSS sizes figures for a flex row and lays captions over the photo; undo both. */
.nl-section .wp-block-gallery.has-nested-images figure.wp-block-image { width: auto !important; max-width: none; margin: 0; flex: none; display: block; }
.nl-section .wp-block-gallery.has-nested-images figure.wp-block-image { height: auto !important; }
.nl-section .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 18px; aspect-ratio: 4 / 5; object-fit: cover; width: 100% !important; height: auto !important; flex: none !important; }
.nl-section .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position: static; background: none; color: var(--nl-muted); text-shadow: none; max-height: none; overflow: visible; padding: 0; margin-top: 8px; font-size: .9rem; line-height: 1.45; text-align: left; }
.nl-section .wp-block-gallery.has-nested-images figure.wp-block-image::before { display: none; }
.wp-element-caption { font-size: .9rem; color: var(--nl-muted); margin-top: 8px; text-align: left; }

/* Facts list */
.nl-section h3 { margin-top: 1.8em; }
.nl-facts { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; gap: 12px; }
.nl-facts li { padding: 14px 18px; border-radius: 14px; background: var(--nl-white); border: 1px solid var(--nl-line); }
.nl-facts strong { color: var(--nl-plum); }

/* FAQ (core/details) */
.wp-block-details { border-bottom: 1px solid var(--nl-line); padding: 16px 0; }
.wp-block-details summary { cursor: pointer; font-family: var(--nl-serif); font-size: 1.2rem; font-weight: 700; color: var(--nl-plum); list-style-position: inside; }
.wp-block-details[open] summary { margin-bottom: .6em; }

/* Columns basics (no block-library CSS dependency) */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 32px; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
@media (max-width: 780px) { .wp-block-columns { flex-direction: column; } .wp-block-column { flex-basis: 100% !important; } }

/* Footer */
.nl-footer { background: var(--nl-plum-dark); color: #e9dff0; padding: 40px 16px; font-size: .95rem; }
.nl-footer__inner { max-width: var(--nl-wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.nl-footer a { color: #f1dca8; }
.nl-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }

/* Plain pages (404 etc.) */
.nl-plain { max-width: var(--nl-text); margin: 0 auto; padding: 72px 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
