/*
 * Base styles — Naccarato Insurance
 *
 * Self-hosted webfonts + element-level defaults. No components here.
 * Depends on tokens.css.
 */

/* ===================================================================
 * Webfonts (self-hosted, latin subset — no external requests)
 * =================================================================== */

/*
 * Inter ships as a variable font: one file covers weights 100-900,
 * which is why there is a single @font-face with a weight range.
 */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-variable-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Inter Black with its overlapping contours merged, used for the outlined
 * titles: the insurance-line hero (.line-hero__title) and the homepage
 * Services heading (.services-title).
 *
 * -webkit-text-stroke with a transparent fill draws every raw contour of a
 * glyph. Fonts built from overlapping pieces (variable fonts, and many static
 * instances, Inter and Montserrat included) therefore show stray lines and
 * triangles where the pieces cross — Illustrator merges them, which is why the
 * design is clean. This file is Inter's variable font instanced at weight 900
 * and run through fontTools removeOverlaps; the glyf contours of A-Z were
 * checked with shapely (LinearRing.is_simple) and none self-intersect. It is
 * the face the design uses (Inter-Black in the .ai). Separate family name so it
 * never replaces the regular "Inter" above.
 */
@font-face {
	font-family: "Inter Outline";
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url("../fonts/inter-900-outline-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/barlow-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/barlow-500-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/barlow-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===================================================================
 * Document
 * =================================================================== */

/*
 * The explicit background here is load-bearing, not decoration.
 *
 * When <html> has no background of its own, the body's background propagates
 * to the canvas and paints the entire viewport — which would hide the page
 * frame below completely. Declaring one on <html> stops that propagation.
 */
html {
	background-color: var(--color-frame-outside);
	scroll-behavior: smooth;
	/*
	 * Anchors land below the header, which never leaves the screen (Task 016).
	 * Replaces the admin-bar.css rule of the same name, so the bar is added in.
	 */
	scroll-padding-top: calc(var(--header-h, 160px) + var(--wp-admin--admin-bar--height, 0px) + var(--space-4));
}

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

/*
 * Full-width bands run edge to edge up to --page-max (1920px) and the page is
 * centred beyond that. Content keeps its own column (--container-*) and the
 * art-measured pieces keep the --frame-max (1300px) frame, see tokens.css.
 */
body {
	max-width: var(--page-max);
	margin-inline: auto;
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
 * Typography
 * =================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-4);
	color: var(--color-heading);
	font-family: var(--font-display);
	font-weight: var(--fw-extrabold);
	line-height: var(--lh-heading);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-h1);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-display);
	line-height: var(--lh-tight);
	text-transform: uppercase;
}

h2 {
	font-size: var(--fs-h2);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-display);
	text-transform: uppercase;
}

h3 {
	font-size: var(--fs-h3);
}

h4 {
	font-size: var(--fs-h4);
}

h5 {
	font-size: var(--fs-h5);
}

h6 {
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
}

p {
	margin: 0 0 var(--space-5);
}

p:last-child {
	margin-bottom: 0;
}

.lead {
	font-size: var(--fs-lg);
}

small,
.text-small {
	font-size: var(--fs-sm);
}

strong,
b {
	font-weight: var(--fw-bold);
}

hr {
	height: 0;
	margin: var(--space-10) 0;
	border: 0;
	border-top: 1px solid var(--color-border);
}

/* ===================================================================
 * Links
 * =================================================================== */

a {
	color: var(--color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--transition-fast);
}

a:hover,
a:focus {
	color: var(--color-accent);
}

/* Visible focus ring for keyboard users only. */
:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

/* ===================================================================
 * Lists
 *
 * The insurance subpages lean heavily on bulleted coverage lists and on
 * "term + description" pairs, so both get sane defaults here.
 * =================================================================== */

ul,
ol {
	margin: 0 0 var(--space-5);
	padding-left: var(--space-6);
}

li {
	margin-bottom: var(--space-2);
}

li:last-child {
	margin-bottom: 0;
}

dl {
	margin: 0 0 var(--space-5);
}

dt {
	margin-bottom: var(--space-1);
	font-weight: var(--fw-bold);
}

dd {
	margin: 0 0 var(--space-4);
}

/* ===================================================================
 * Media & embeds
 * =================================================================== */

figure {
	margin: 0 0 var(--space-6);
}

figcaption {
	margin-top: var(--space-2);
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
}

iframe,
embed,
object,
video {
	max-width: 100%;
}

/* ===================================================================
 * Tables
 * =================================================================== */

table {
	width: 100%;
	margin-bottom: var(--space-6);
	border-collapse: collapse;
}

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

th {
	font-family: var(--font-display);
	font-weight: var(--fw-semibold);
}

/* ===================================================================
 * Forms
 * =================================================================== */

input,
select,
textarea {
	max-width: 100%;
	padding: var(--space-3);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	background-color: var(--color-bg);
	color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--color-accent);
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

button,
[type="button"],
[type="submit"] {
	cursor: pointer;
}

/* ===================================================================
 * Accessibility helpers
 * =================================================================== */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: var(--space-4);
	left: var(--space-4);
	z-index: var(--z-overlay);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-sm);
	background-color: var(--color-primary);
	color: var(--color-on-primary);
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
}
