/*
Theme Name: Pneus Malin
Description: The public site of Pneus Malin: a home page that shows only the logo and the tyre search, like a search engine (spec 054).
Version: 0.7.6
Requires at least: 7.1
Requires PHP: 7.4
Author: Pneus Malin
Text Domain: pneus-malin
*/

/* Barlow, drawn from the road's signs, and its semi-condensed width for what is read as a tyre's
   sidewall is: sizes, prices, titles (spec 105). Served from the theme, never from Google */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
             src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
             src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
             src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
             src: url("assets/fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap;
             src: url("assets/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
             src: url("assets/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
	/* The four colours stay in the logo; the site itself is navy and blue (spec 080), its text the
	   rubber's black, its quiet grounds concrete (spec 105) */
	--pm-navy: #0b2545;
	--pm-navy-deep: #13315c;
	--pm-brand-blue: #1a73e8;
	--pm-brand-yellow: #fbbc05;
	--pm-brand-ink: #1c1f24;
	--pm-muted: #5b6370;
	--pm-concrete: #eef1f4;
	--pm-line: #e3e6ee;
	--pm-font: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--pm-font-sidewall: "Barlow Semi Condensed", "Barlow", ui-sans-serif, system-ui, sans-serif;
	--pm-band: radial-gradient(ellipse 45vw 160px at 50% 100%, rgba(26, 115, 232, .22), rgba(26, 115, 232, 0) 70%),
	           linear-gradient(180deg, var(--pm-navy) calc(100% - 96px), var(--pm-navy-deep) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: #fff;
       color: var(--pm-brand-ink); font: 400 1.03125rem/1.55 var(--pm-font);
       -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: var(--pm-font-sidewall); font-weight: 700; letter-spacing: 0; line-height: 1.15; }
a { color: var(--pm-brand-blue); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(66, 133, 244, .22); }
:focus-visible { outline: 2px solid var(--pm-brand-blue); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* The bar: navy on every page, as the home page's band (spec 080); small, out of the way */
.site-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
               padding: .7rem 1.5rem; font-size: .95rem; background: var(--pm-navy); color: #fff; }
.site-header__brand { color: #fff; text-decoration: none; }

/* « Winged wheel » (spec 127): the wheel, then « Pneuple »; in the bar on one line. A blue halo
   behind it and a thin rim of light on its edge lift the black rubber off the navy */
.pm-logo { display: inline-flex; align-items: center; gap: .55rem; color: #fff; line-height: 1; }
.pm-logo__mark { flex: none; display: block; padding: .1rem .2rem;
  background: radial-gradient(ellipse 50% 46% at 50% 45%, rgba(26, 115, 232, .55), rgba(26, 115, 232, 0) 100%); }
.pm-logo__glyph { display: block; width: 3.2rem; height: auto;
  filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .8)) drop-shadow(0 0 5px rgba(140, 185, 255, .35)); }
.pm-logo__word { font-family: "Barlow", system-ui, sans-serif; font-weight: 700; font-size: 1.7rem; letter-spacing: -.035em; }
.site-header nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.site-header nav a { display: block; color: #fff; text-decoration: none; padding: .4rem .75rem; border-radius: 2rem; }
.site-header .pm-account-link { color: #fff; }
.site-header nav a:hover, .site-header nav .current-menu-item a, .site-header .pm-account-link:hover { background: rgba(255, 255, 255, .1); }
.site-header__actions { display: flex; align-items: center; gap: .6rem; }
/* The bar's logo is on every page, the home page too (the owner, 28/10/2026): from a size's
   results, it leads back to the empty home page */

.site-main { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: 1rem 1.5rem 4rem; }

/* The home page: centred like a search engine; once a search is made, it steps aside for the results */
/* THE WHOLE HOME PAGE IN ONE SCREEN, WHATEVER ITS HEIGHT (portal spec 140, owner 2026-11-13). Laid
   out compact, it is 56.3rem tall (measured, 1366 x 768); ``--spare`` is what the screen has beyond
   that, shared out (the shares add up to about 1): most in the band above the logo, some in the
   wheel, the rest between the blocks. Read from the screen's height only, never from what is shown,
   so a search never moves the field (owner, 25/10/2026) */
.home { --spare: max(0px, calc(100dvh - 56.3rem)); }
.home-search { display: flex; flex-direction: column; align-items: center; padding-top: calc(.8rem + var(--spare, 0px) * .35); }
.home-search__logo { position: relative; display: inline-block; margin: 0; line-height: 0; }
/* On the home page, in the middle of the band: the wheel above the name, large, as on the garage's
   sign. The wheel rises into place, then the name */
.pm-logo--stack { flex-direction: column; gap: .15rem; }
.pm-logo--stack .pm-logo__mark { padding: .2rem .8rem; }
.pm-logo--stack .pm-logo__glyph { width: calc(7rem + var(--spare, 0px) * .25);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7)) drop-shadow(0 0 12px rgba(140, 185, 255, .35)); }
.pm-logo--stack .pm-logo__word { font-size: calc(clamp(2.4rem, 5vw, 3.4rem) + var(--spare, 0px) * .06); letter-spacing: -.045em; }
.pm-logo--stack .pm-logo__mark { animation: pm-logo-drive 1.5s cubic-bezier(.15, .7, .2, 1) both; }
.pm-logo--stack .pm-logo__word { animation: pm-logo-rise .8s .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pm-logo-drive { from { transform: translateY(4rem); opacity: 0; } 30% { opacity: 1; } to { transform: none; } }
@keyframes pm-logo-rise { from { transform: translateY(1rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pm-logo--stack .pm-logo__mark, .pm-logo--stack .pm-logo__word { animation: none; } }
.home-search__tagline { color: var(--pm-muted); margin: .3rem 0 calc(.9rem + var(--spare, 0px) * .05); text-align: center; font-size: 1.05rem; }

/* The home page's band (the owner, 25/10/2026: « bandeau marine premium »): the top of the page,
   up to just under the search field, in a deep navy, as tyre makers' sites do; the rest on white.
   Drawn behind the form, so it always ends under the field, whatever the screen. A search
   leaves it as it is: the results come below it, on white */
/* At rest the band goes down under the common sizes, which belong to it; during a search they give
   way and the band ends under the field again, the field itself never moving */
.home .pm-search__form::before, .home .pm-search__popular::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(50% - 50vw); width: 100vw; top: -200vh; bottom: -1.3rem;
  background: radial-gradient(ellipse 50vw 300px at 50% calc(100% - 200px), rgba(26, 115, 232, .3), rgba(26, 115, 232, 0) 70%),
              linear-gradient(180deg, var(--pm-navy) calc(100% - 420px), var(--pm-navy-deep) 100%); }
.home .pm-search:not(.pm-search--active) .pm-search__form::before { display: none; }
.home .pm-search__popular::before { bottom: -1.7rem; }

/* A tyre's sheet, opened from the results: a product page. The big logo and the line give way,
   and the navy band carries « Back to the results », as the other pages carry their title. Back
   to the results, the home page comes back as it was */
.home:has(.pm-sheet-box:not([hidden])) .home-search__logo,
.home:has(.pm-sheet-box:not([hidden])) .home-search__tagline { display: none; }
.home .home-search:has(.pm-sheet-box:not([hidden])) { padding-top: 1.2rem; }
.home .pm-sheet__back { margin-top: .4rem; color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); }
.home .pm-sheet__back:hover { background: #fff; border-color: #fff; color: var(--pm-navy); }
/* The band hangs on the whole sheet, so it spans the page, and ends 1.7rem under the back button */
.home .pm-sheet { position: relative; }
.home .pm-sheet::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(50% - 50vw); width: 100vw; top: -200vh; bottom: calc(100% - 4.5rem); background: var(--pm-band); }
.home .pm-sheet__top { margin-top: 3rem; }

/* The common sizes, on the band: a quiet heading between two rules, then light pills written as
   on a sidewall, each with a small tyre, that turn white under the pointer */
/* Wider than the search block, so the six sizes hold on one line: margins, not a transform, which
   would lift the band above the logo */
.home .pm-search__popular { position: relative; margin-top: calc(1rem + var(--spare, 0px) * .05); gap: .6rem; color: rgba(255, 255, 255, .7);
  max-width: none; width: min(62rem, 100vw - 2rem); margin-inline-start: calc(50% - min(31rem, 50vw - 1rem)); }
/* (The start's margin, not the left one: right to left, Arabic, a left margin on a block of fixed
   width is ignored, and the sizes and their band went off to the right, owner 2026-11-06) */
.home .pm-search__popular span { display: flex; align-items: center; justify-content: center; gap: .9rem; margin-bottom: .35rem;
  font-size: .95rem; font-weight: 500; }
.home .pm-search__popular span::before, .home .pm-search__popular span::after {
  content: ""; flex: 1; max-width: 6rem; height: 1px; background: rgba(255, 255, 255, .22); }
.home .pm-search__popular .pm-search__size { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .45rem 1.05rem .45rem .8rem; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #fff;
  font-family: var(--pm-font-sidewall); font-size: 1.08rem; font-weight: 600; letter-spacing: .03em; font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s, border-color .2s; }
.home .pm-search__popular .pm-search__size::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none; background: currentColor; opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3'/%3E%3C/svg%3E") center / contain no-repeat; }
.home .pm-search__popular .pm-search__size:hover, .home .pm-search__popular .pm-search__size:focus-visible {
  background: #fff; color: var(--pm-navy); border-color: #fff; }
.home .pm-search__popular .pm-search__size:hover::before { opacity: 1; }
.home .home-search__tagline { color: rgba(255, 255, 255, .8); }
.home .pm-search__more { color: rgba(255, 255, 255, .75); }
.home .pm-search__more summary:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.home .pm-search__criteria label { color: rgba(255, 255, 255, .85); }
.home .pm-search__field { border-color: transparent; box-shadow: 0 6px 24px rgba(0, 0, 0, .28); }
.home .home-search__logo .pm-logo { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .25)); }

/* « Ask the AI », under the search, on white: the band ends 1.7rem under the sizes */
.home-search__ai { display: inline-flex; align-items: center; gap: .5rem; margin: calc(1.7rem + .45rem + var(--spare, 0px) * .08) 0 0; padding: .6rem 1.15rem;
                   min-height: 2.75rem; border: 1px solid #d5dce6; border-radius: 999px; background: #fff; color: var(--pm-brand-ink);
                   font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer; transition: border-color .2s; }
.home-search__ai[hidden] { display: none; }
.home-search__ai svg { width: 1.15rem; height: 1.15rem; flex: none; fill: var(--pm-brand-blue); }
.home-search__ai:hover { border-color: var(--pm-brand-blue); }
.home-search .pm-search { width: 100%; }
/* A search leaves the field where it is (the owner, 25/10/2026: it must not move): the logo and
   the line stay, only what was under the field gives way to the results */
.home-search:has(.pm-search--active) .home-promises,
.home-search:has(.pm-search--active) .pm-brands,
.home-search:has(.pm-search--active) .home-search__ai { display: none; }

/* Three true promises, quiet, under the search: one line of three statements between rules, no
   cards (spec 105) */
.home-promises { list-style: none; margin: calc(1rem + var(--spare, 0px) * .1) 0 0; padding: 0; width: 100%; max-width: 64rem;
                 display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-promises li { display: flex; gap: .85rem; align-items: flex-start; padding: .2rem 1.6rem; }
.home-promises li + li { border-inline-start: 1px solid var(--pm-line); }
.home-promises svg { flex: none; width: 1.6rem; height: 1.6rem; margin-top: .1rem; fill: none; stroke: var(--pm-navy);
                     stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-promises b { display: block; font-family: var(--pm-font-sidewall); font-size: 1.12rem; font-weight: 700; margin-bottom: .15rem;
                   color: var(--pm-brand-ink); }
.home-promises span { font-size: .95rem; line-height: 1.45; color: var(--pm-muted); }
/* The brands and the page's foot closer on the home page (spec 140): the whole page in one screen */
.home .pm-brands { margin-top: calc(1.2rem + var(--spare, 0px) * .1); }
.home .pm-brands__title { margin-bottom: .5rem; font-size: 1.2rem; }
.home .site-main { padding-bottom: 1rem; }
.home .site-footer { padding-top: .8rem; padding-bottom: .8rem; }

/* Every other page: its title on the navy band that goes on from the bar, the content on white.
   Drawn behind the title, so the band always fits it */
.entry-title { position: relative; font-size: clamp(1.9rem, 5vw, 2.4rem); margin: 1.8rem 0 3.4rem; color: #fff; }
.entry-title::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(50% - 50vw); width: 100vw; top: -200vh; bottom: -1.9rem; background: var(--pm-band); }

/* The footer: navy, closing the page as the bar opens it */
.site-footer { padding: 1.4rem 1.5rem; font-size: .88rem; color: rgba(255, 255, 255, .72); background: var(--pm-navy);
               display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; align-items: center; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }
.site-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home .pm-search__popular .pm-search__size, .home-search__ai { transition: none; }
}

@media (max-width: 860px) {
  .home-promises { grid-template-columns: 1fr; gap: 1.1rem; max-width: 30rem; margin-top: 2rem; }
  .home-promises li { padding: 0; }
  .home-promises li + li { border-inline-start: 0; border-top: 1px solid var(--pm-line); padding-top: 1.1rem; }
}

/* A phone (spec 105, a Galaxy S7 as reference: 360 px wide): nothing scrolls sideways, every
   target a thumb's width; the robot of the AI keeps its corner, the page ends above it */
@media (max-width: 720px) {
  /* The band in a phone's first screen: a smaller logo, so the field and the first results show */
  /* A phone scrolls: no share of the screen's height */
  .home { --spare: 0px; }
  .home-search { padding-top: .6rem; }
  .pm-logo--stack .pm-logo__glyph { width: 6rem; }
  .pm-logo--stack .pm-logo__word { font-size: 2.5rem; }
  .home-search__tagline { font-size: .98rem; margin: .25rem 0 1rem; }
  .site-header, .site-main, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .site-header { gap: .5rem; padding-top: .55rem; padding-bottom: .55rem; }
  .pm-logo__glyph { width: 2.8rem; }
  .pm-logo__word { font-size: 1.5rem; }
  .site-header nav a { padding: .55rem .6rem; }
  .site-main, .home .site-main { padding-bottom: 6.5rem; }
  .home-search__ai { max-width: 100%; text-align: start; }
  .home .pm-search__popular .pm-search__size { padding-inline-start: .6rem; padding-inline-end: .7rem; font-size: 1.02rem; }
}

/* From a 5" phone to a 35" screen (the owner, 03/11/2026). Past a 24" screen, the whole page grows
   with it, every size being in rem: 16 px a rem up to 1920 px wide, 19 px on a 27" (2560 x 1440),
   20 px at most. Read on the height too, so an ultrawide (3440 x 1440) is set as the 27" it is as
   tall as; a user's own font size stays the base */
@media (min-width: 1921px) and (min-height: 1100px) {
  html { font-size: clamp(100%, calc(.4375rem + min(.47vw, .833vh)), 125%); }
}
/* The footer keeps to the page's width on a wide screen; the bar keeps the logo and the cart at
   the screen's edges (the owner, 03/11/2026) */
@media (min-width: 1600px) {
  .site-footer { padding-left: max(1.5rem, calc(50% - 48rem)); padding-right: max(1.5rem, calc(50% - 48rem)); }
}
/* The smallest phones (320 px, an iPhone SE): the logo and the field a little narrower */
@media (max-width: 374px) {
  .site-header, .site-main, .site-footer { padding-left: .75rem; padding-right: .75rem; }
  .site-header nav a { padding-left: .45rem; padding-right: .45rem; }
  .home .pm-search__popular .pm-search__size { padding-inline-start: .5rem; padding-inline-end: .6rem; font-size: .96rem; gap: .35rem; }
}

/* A narrow phone: the bar keeps the symbol, the name and every button on one line (spec 123) */
@media (max-width: 480px) {
  .pm-logo { gap: .4rem; }
  .pm-logo__glyph { width: 2.4rem; }
  .pm-logo__word { font-size: 1.28rem; }
  .site-header__actions { gap: .2rem; }
}
