/*
Theme Name: Egg Snob
Theme URI: https://www.eggsnob.com.au
Author: Egg Snob
Description: Lean brochure block theme for Egg Snob free range eggs: Home, Wholesale, Stockists, About us and Contact. No shop, no logins, no ordering.
Version: 0.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eggsnob
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }
a:focus-visible, .wp-element-button:focus-visible { outline: 3px solid var(--wp--preset--color--ink); outline-offset: 3px; }

/* ---------- Header ---------- */
.es-header { position: sticky; top: 0; z-index: 50; }
.es-header .es-logo img { display: block; width: clamp(130px, 16vw, 180px); height: auto; }
.es-header .wp-block-navigation a { text-decoration: none; font-weight: 600; }
.es-header .wp-block-navigation a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.es-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.es-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--mint) !important; color: var(--wp--preset--color--ink) !important; }
.es-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.75rem; font-family: var(--wp--preset--font-family--display); }

/* ---------- The egg motif ---------- */
.es-egg, .es-egg img { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.es-egg img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.es-egg-dot { display: inline-block; width: .62em; height: .8em; background: var(--wp--preset--color--mint); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; vertical-align: -.05em; margin-left: .06em; }
.es-eggbullets ul, ul.es-eggbullets { list-style: none; padding-left: 0; }
ul.es-eggbullets li { position: relative; padding-left: 1.6em; margin-bottom: .4em; }
ul.es-eggbullets li::before { content: ""; position: absolute; left: 0; top: .32em; width: .7em; height: .9em; background: var(--wp--preset--color--mint); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.has-mint-background-color ul.es-eggbullets li::before, .has-mint-background-color .es-egg-dot { background: var(--wp--preset--color--ink); }

/* ---------- Hero ---------- */
.es-hero h1 { letter-spacing: -0.035em; line-height: .95; }
.es-hero .es-kicker, .es-kicker { text-transform: uppercase; letter-spacing: .16em; font-weight: 700; font-size: .8rem; }
.es-hero-media { position: relative; }
.es-hero-media .es-badge { position: absolute; right: -6px; bottom: 8%; }
.es-badge { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--shell); width: 128px; height: 160px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: .95rem; line-height: 1.1; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform: rotate(8deg); box-shadow: 0 12px 30px rgba(0,0,0,.18); }

/* ---------- Cards ---------- */
.es-card { height: 100%; border-radius: 28px; }
.es-card h3 { margin-top: 0; }
.es-range .es-card .es-sizes { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .75rem 0 1rem; list-style: none; }
.es-range .es-card .es-sizes li { background: var(--wp--preset--color--shell); border: 2px solid var(--wp--preset--color--ink); border-radius: 999px; padding: .2rem .8rem; font-weight: 700; font-size: .9rem; }

/* ---------- Marquee strip ---------- */
.es-strip { overflow: hidden; white-space: nowrap; }
.es-strip p { display: inline-block; margin: 0; animation: es-scroll 38s linear infinite; }
@keyframes es-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .es-strip p { animation: none; } }

/* ---------- Stockists ---------- */
.es-stockists { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.es-stockist { background: #fff; border: 2px solid var(--wp--preset--color--ink); border-radius: 22px; padding: 1.1rem 1.2rem 1.2rem; display: flex; gap: .85rem; align-items: flex-start; }
.es-stockist .es-num { flex: 0 0 auto; width: 34px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--wp--preset--color--mint); color: var(--wp--preset--color--ink); font-weight: 800; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.es-stockist h3 { font-size: 1.15rem; margin: 0 0 .2rem; }
.es-stockist p { margin: 0; font-size: .95rem; line-height: 1.4; }
.es-stockist a { font-weight: 700; font-size: .9rem; color: var(--wp--preset--color--deep); }
.es-area-title { margin-top: 2.25rem !important; }
#es-map { height: 440px; border-radius: 28px; border: 2px solid var(--wp--preset--color--ink); overflow: hidden; z-index: 1; }
.es-map-pin { background: var(--wp--preset--color--mint); border: 2px solid #0e1f18; color: #0e1f18; font: 800 13px/1 var(--wp--preset--font-family--body); display: flex; align-items: center; justify-content: center; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.es-noscript-map { padding: 1rem; }

/* ---------- Placeholder flag ---------- */
.es-tbc { background: #FFF3B0; color: #5b4a00; border-radius: 6px; padding: 0 .35em; font-weight: 700; font-size: .92em; white-space: normal; }

/* ---------- Footer ---------- */
.es-footer a { color: inherit; }
.es-footer .es-logo img { width: 160px; height: auto; display: block; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
  .es-hero-media .es-badge { width: 104px; height: 130px; font-size: .8rem; right: 0; }
  #es-map { height: 320px; }
  .es-hide-mobile { display: none !important; }
}

/* Full-width sections sit flush against each other. */
.wp-block-post-content > .alignfull, .wp-block-post-content > .alignfull + *, main.wp-block-group, .wp-site-blocks > footer { margin-block-start: 0 !important; margin-block-end: 0 !important; }

/* ---------- Enquiry form ---------- */
.es-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.es-form-wrap { margin-top: 1rem; }
.es-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.es-form .es-field, .es-form .es-hp, .es-form .es-submit { grid-column: 1 / -1; margin: 0; }
.es-form .es-field-half { grid-column: span 1; }
.es-form label { display: block; font-weight: 700; margin-bottom: .35rem; }
.es-form .es-req, .es-form .es-hint { font-weight: 500; font-size: .8rem; color: var(--wp--preset--color--deep); }
.es-form input[type="text"], .es-form input[type="email"], .es-form input[type="tel"], .es-form select, .es-form textarea {
	width: 100%; box-sizing: border-box; border: 2px solid var(--wp--preset--color--ink); border-radius: 14px;
	padding: .7rem .9rem; font: inherit; background: #fff; color: var(--wp--preset--color--ink);
}
.es-form input:focus, .es-form select:focus, .es-form textarea:focus { outline: 3px solid var(--wp--preset--color--mint); outline-offset: 2px; }
.es-form .es-submit .wp-element-button { border: 0; cursor: pointer; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--shell); border-radius: 999px; padding: .85rem 1.5rem; font-weight: 700; font-size: 1rem; }
.es-form .es-submit .wp-element-button:hover { background: var(--wp--preset--color--deep); color: #fff; }
.es-form-thanks, .es-form-error { border-radius: 22px; padding: 1.5rem 1.6rem; margin-bottom: 1rem; }
.es-form-thanks { background: var(--wp--preset--color--mint); color: var(--wp--preset--color--ink); }
.es-form-thanks h2 { margin-top: 0; }
.es-form-error { background: #FFF3B0; color: #5b4a00; }
.es-footer a[href^="tel:"] { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .es-form { grid-template-columns: 1fr; } .es-form .es-field-half { grid-column: 1 / -1; } }
