/* Base: global rules that theme.json cannot express. */

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.editor-styles-wrapper { -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 1px solid var(--wp--preset--color--ink); outline-offset: 4px; border-radius: 4px; }

/* Japanese: phrase-aware line breaking (with fallbacks), a little more air, no negative tracking. */
:lang(ja) body,
:lang(ja).editor-styles-wrapper { line-break: strict; overflow-wrap: anywhere; word-break: auto-phrase; }
:lang(ja) :is(h1, h2, h3, h4) { text-wrap: balance; font-weight: 400; letter-spacing: .02em; line-height: 1.5; }
:lang(en) :is(h1, h2, h3, h4) { text-wrap: balance; }
:is(p, li) { text-wrap: pretty; }

/* Page gutter steps from the design, mobile first: 24 (set in theme.json) / 32 from 900px / 48 from 1200px. */
@media (min-width: 900px) { body { --wp--custom--gutter: 32px; } }
@media (min-width: 1200px) { body { --wp--custom--gutter: 48px; } }

/* Content width shared by header, body sections and footer: 1440px box minus the gutters on both sides. */
body { --anarta-content: calc(1440px - 2 * var(--wp--custom--gutter)); }

/* Header, main and footer sit flush: the site-blocks block gap must not push them apart. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Lenis smooth scrolling (recommended base rules). */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
html { scroll-padding-top: 112px; }

/* Shared building blocks. */
.anarta-section { max-width: 1440px; margin-inline: auto; padding-inline: var(--wp--custom--gutter); padding-bottom: var(--wp--preset--spacing--60); }
.anarta-eyebrow { margin: 0; font-size: var(--wp--preset--font-size--label); font-weight: 500; letter-spacing: .24em; text-transform: uppercase; line-height: 1.6; color: var(--wp--preset--color--muted); }
:lang(ja) .anarta-eyebrow { letter-spacing: .08em; text-transform: none; }
.anarta-price { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: .02em; color: var(--wp--preset--color--accent); font-variant-numeric: tabular-nums; }
.anarta-sec-title { margin: 0 0 var(--wp--preset--spacing--40); font-weight: 400; }

@media (min-width: 900px) {
	.anarta-section { padding-bottom: var(--wp--preset--spacing--70); }
	.anarta-sec-title { margin-bottom: var(--wp--preset--spacing--50); }
}

/* Toast: the design's dark pill, bottom centre; errors in the alert colour */
.anarta-toast { position: fixed; left: 50%; bottom: var(--wp--preset--spacing--40); z-index: 100000; max-width: calc(100vw - 32px); padding: 12px 24px; border-radius: 999px; background: var(--wp--preset--color--ink); color: #fff; font-size: var(--wp--preset--font-size--small); letter-spacing: .04em; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s var(--wp--custom--ease), transform .25s var(--wp--custom--ease); }
.anarta-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.anarta-toast.is-error { background: #8a2b21; }
