/* Petit Lomi — base: reset, typography, container, a11y helpers. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--pl-page-bg);
  color: var(--pl-text);
  font-family: var(--pl-font-body);
  font-size: var(--pl-text-base);
  font-weight: var(--pl-font-weight-regular);
  line-height: var(--pl-leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--pl-space-3);
  color: var(--pl-text);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--pl-font-heading);
  font-weight: var(--pl-font-weight-heading);
  line-height: var(--pl-leading-tight);
}

h5, h6 {
  font-family: var(--pl-font-body);
  font-weight: var(--pl-font-weight-bold);
  line-height: var(--pl-leading-snug);
}

h1 { font-size: var(--pl-text-h1); }
h2 { font-size: var(--pl-text-h2); }
h3 { font-size: var(--pl-text-h3); line-height: var(--pl-leading-snug); }
h4 { font-size: var(--pl-text-h4); line-height: var(--pl-leading-snug); }
h5 { font-size: var(--pl-text-h5); }
h6 {
  font-size: var(--pl-text-h6);
  text-transform: uppercase;
  letter-spacing: var(--pl-tracking-caps);
}

p,
ul,
ol,
dl,
blockquote,
figure,
table {
  margin: 0 0 var(--pl-space-4);
}

a {
  color: var(--pl-primary);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--pl-primary-hover);
}

small {
  font-size: var(--pl-text-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--pl-border);
  margin: var(--pl-space-8) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: var(--pl-space-3);
  border-bottom: 1px solid var(--pl-border);
  text-align: left;
}

blockquote {
  padding-left: var(--pl-space-4);
  border-left: 3px solid var(--pl-tint-200);
  color: var(--pl-text-muted);
}

::selection {
  background: var(--pl-tint-200);
  color: var(--pl-text);
}

:focus-visible {
  outline: 3px solid var(--pl-focus-ring);
  outline-offset: 2px;
  border-radius: var(--pl-radius-xs);
}

[hidden] {
  display: none !important;
}

/* Layout primitives */
.pl-container {
  width: 100%;
  max-width: var(--pl-container);
  margin-inline: auto;
  padding-inline: var(--pl-gutter);
}

.pl-container--narrow {
  max-width: var(--pl-container-narrow);
}

.pl-section {
  padding-block: var(--pl-section-y);
}



.pl-main:focus {
  outline: none;
}

/* Accessibility helpers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  z-index: var(--pl-z-toast);
}

.pl-skip-link:focus {
  position: fixed !important;
  top: var(--pl-space-2);
  left: var(--pl-space-2);
  padding: var(--pl-space-3) var(--pl-space-5);
  background: var(--pl-surface);
  color: var(--pl-primary);
  font-weight: var(--pl-font-weight-bold);
  border-radius: var(--pl-radius-pill);
  box-shadow: var(--pl-shadow-md);
}

/* Body scroll lock while a drawer is open */
.pl-scroll-locked {
  overflow: hidden;
}

/* Entry content (pages, posts, cart/checkout shortcodes) */
.pl-entry-content > * + * {
  margin-top: var(--pl-space-4);
}

.pl-entry-content img {
  border-radius: var(--pl-radius-md);
}

.alignwide {
  max-width: var(--pl-container);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.aligncenter {
  margin-inline: auto;
}

.wp-caption-text,
figcaption {
  font-size: var(--pl-text-sm);
  color: var(--pl-text-muted);
  margin-top: var(--pl-space-2);
}

/* iOS zooms into fields under 16px: keep form text at least 16px on small screens. */
@media (max-width: 1023px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
  select,
  textarea {
    font-size: max(16px, 1em) !important;
  }
}
