/*
Theme Name: Whey-Eye
Theme URI: https://wheyeye.net
Author: Whey-Eye
Author URI: https://wheyeye.net
Description: A clean, modern, black-and-white theme for Whey-Eye — frame reglazing based in Newcastle. Editorial typography, smooth transitions, and a restrained monochrome palette. WooCommerce ready.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wheyeye
Tags: black-and-white, minimal, clean, modern, business, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ink:        #0b0b0c;
  --ink-soft:   #1a1a1d;
  --paper:      #ffffff;
  --paper-dim:  #f6f6f4;
  --paper-dim2: #eeeeec;
  --line:       #e4e4e0;
  --line-strong:#cfcfc9;
  --muted:      #6b6b6b;
  --muted-soft: #9a9a97;

  --maxw:       1200px;
  --gutter:     clamp(1.25rem, 5vw, 4rem);
  --radius:     2px;

  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --dur:        0.5s;

  --step--1: clamp(0.82rem, 0.1vw + 0.8rem, 0.9rem);
  --step-0:  clamp(1rem, 0.2vw + 0.95rem, 1.125rem);
  --step-1:  clamp(1.25rem, 0.5vw + 1.1rem, 1.5rem);
  --step-2:  clamp(1.6rem, 1vw + 1.3rem, 2.25rem);
  --step-3:  clamp(2.1rem, 2.5vw + 1.4rem, 3.5rem);
  --step-4:  clamp(2.8rem, 5vw + 1.4rem, 5.5rem);
  --step-5:  clamp(3.4rem, 8vw + 1rem, 8rem);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--invert { background: var(--ink); color: var(--paper); }
.section--invert .eyebrow { color: var(--muted-soft); }
.section--dim { background: var(--paper-dim); }
.divider { height: 1px; background: var(--line); border: 0; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 0.98;
}
.h-hero { font-size: var(--step-5); }
.h-xl   { font-size: var(--step-4); }
.h-lg   { font-size: var(--step-3); }
.h-md   { font-size: var(--step-2); }
.h-sm   { font-size: var(--step-1); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.8em; height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); }
.muted { color: var(--muted); }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.7em;
  background: var(--bg);
  color: var(--fg);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--bg);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 0.3s var(--ease);
  isolation: isolate;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--bg); }
.btn:hover::after { transform: scaleX(1); transform-origin: left; }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--ghost { --bg: transparent; --fg: var(--ink); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost::after { background: var(--ink); }
.btn--ghost:hover { color: var(--paper); border-color: var(--ink); }

.section--invert .btn { --bg: var(--paper); --fg: var(--ink); }
.section--invert .btn--ghost { --bg: transparent; --fg: var(--paper); color: var(--paper); border-color: rgba(255,255,255,0.3); }
.section--invert .btn--ghost::after { background: var(--paper); }
.section--invert .btn--ghost:hover { color: var(--ink); }

.link-underline {
  position: relative;
  font-weight: 500;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size var(--dur) var(--ease);
}
.link-underline:hover { background-size: 100% 1px; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
}
.brand { display: inline-flex; align-items: baseline; gap: 0.1em; }
.brand__mark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.brand__mark em { font-style: italic; }
.brand__dot { color: var(--muted-soft); }
/* Constrain an uploaded custom logo so the header stays compact */
.site-header .custom-logo-link { display: inline-flex; align-items: center; line-height: 0; }
.site-header .custom-logo { height: 54px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 900px) { .site-header .custom-logo { height: 40px; } }

.primary-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.1rem); }
.primary-nav a {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.3em 0;
  transition: color 0.3s var(--ease);
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }
.primary-nav .current-menu-item > a { color: var(--ink); }

.header__actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--step--1); font-weight: 500; }
.cart-link .count {
  display: inline-grid; place-items: center;
  min-width: 1.5em; height: 1.5em; padding: 0 0.3em;
  background: var(--ink); color: var(--paper);
  border-radius: 999px; font-size: 0.7rem;
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 1.5px; width: 24px; background: var(--ink); transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-block: clamp(4rem, 11vw, 9rem) clamp(3rem, 7vw, 6rem); position: relative; }
.hero__dialect {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.hero__title { margin-bottom: 1.5rem; max-width: 14ch; }
.hero__title .thin { color: var(--muted-soft); }
.hero__sub { max-width: 52ch; margin-bottom: 2.4rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero__meta {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line);
  border-block: 1px solid var(--line);
}
.hero__meta .stat { background: var(--paper); padding: 1.5rem clamp(1rem, 2vw, 1.75rem); }
.stat__num { font-family: var(--font-display); font-size: var(--step-2); line-height: 1; display: block; }
.stat__label { font-size: var(--step--1); color: var(--muted); margin-top: 0.5rem; letter-spacing: 0.04em; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 1.1rem; background: var(--paper); }
.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: 3rem; font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); white-space: nowrap; }
.marquee__item::after { content: "✶"; color: var(--muted-soft); font-family: var(--font-sans); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   STEPS / PROCESS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 3.5rem; counter-reset: step; }
.step { position: relative; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.step__num { font-family: var(--font-display); font-size: var(--step-2); color: var(--muted-soft); display: block; margin-bottom: 0.8rem; }
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: var(--step--1); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 3.5rem; }
.price-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex; flex-direction: column; gap: 1.25rem;
  background: var(--paper);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}
.price-card:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.25); }
.price-card__name { font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.price-card__amount { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.price-card__amount small { font-family: var(--font-sans); font-size: var(--step--1); color: var(--muted); display: block; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem; }
.price-card ul { display: flex; flex-direction: column; gap: 0.6rem; font-size: var(--step--1); color: var(--ink-soft); }
.price-card li { display: flex; gap: 0.6em; align-items: flex-start; }
.price-card li::before { content: "—"; color: var(--muted-soft); }
.price-card .btn { margin-top: auto; justify-content: center; }

/* ============================================================
   FEATURE / SPLIT
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--text-first { direction: ltr; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.feature-list { display: grid; gap: 0; margin-top: 2rem; }
.feature-list .item { padding-block: 1.3rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.feature-list .item:last-child { border-bottom: 1px solid var(--line); }
.feature-list .k { font-family: var(--font-display); color: var(--muted-soft); font-size: var(--step-0); }
.feature-list .item h4 { margin-bottom: 0.25rem; }
.feature-list .item p { color: var(--muted); font-size: var(--step--1); }

.media-frame { position: relative; aspect-ratio: 4/5; background: var(--paper-dim); border: 1px solid var(--line); overflow: hidden; border-radius: var(--radius); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: transform 0.9s var(--ease), filter 0.6s var(--ease); }
.media-frame:hover img { transform: scale(1.04); }
.media-frame--glyph { display: grid; place-items: center; }
.media-frame--glyph svg { width: 55%; height: auto; }

/* ============================================================
   GUIDE / TABLE
   ============================================================ */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: var(--step-0); }
.spec-table th, .spec-table td { text-align: left; padding: 1.1rem 1rem; border-bottom: 1px solid var(--line); }
.spec-table th { font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.spec-table tr { transition: background 0.3s var(--ease); }
.spec-table tbody tr:hover { background: var(--paper-dim); }
.spec-table td:last-child { font-family: var(--font-display); font-size: var(--step-1); white-space: nowrap; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.guide-card { border: 1px solid var(--line); padding: 1.75rem; border-radius: var(--radius); transition: background 0.4s var(--ease), color 0.4s var(--ease); }
.guide-card:hover { background: var(--ink); color: var(--paper); }
.guide-card:hover .muted { color: var(--muted-soft); }
.guide-card h3 { margin-bottom: 0.6rem; font-size: var(--step-1); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band { text-align: center; }
.cta-band .display { max-width: 18ch; margin-inline: auto; margin-bottom: 1.5rem; }
.cta-band__sub { max-width: 46ch; margin-inline: auto; margin-bottom: 2.2rem; color: var(--muted-soft); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.site-footer .brand__mark { font-size: 2rem; color: var(--paper); }
.footer-about { max-width: 38ch; color: var(--muted-soft); margin-top: 1.2rem; }
.footer-col h4 { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-soft); margin-bottom: 1.2rem; font-weight: 500; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { color: var(--paper); opacity: 0.85; transition: opacity 0.3s var(--ease); }
.footer-col a:hover { opacity: 1; }
.footer-bottom { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: var(--step--1); color: var(--muted-soft); }

/* ============================================================
   WORDPRESS CORE + CONTENT
   ============================================================ */
.entry-content { font-size: var(--step-0); line-height: 1.7; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: var(--step-2); margin-top: 1.8em; }
.entry-content h3 { font-size: var(--step-1); margin-top: 1.5em; }
.entry-content a { background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: left bottom; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { border-left: 2px solid var(--ink); padding-left: 1.4rem; font-family: var(--font-display); font-size: var(--step-1); font-style: italic; }
.entry-content img { border-radius: var(--radius); }
.alignwide { width: min(100%, 1100px); }
.sticky, .bypostauthor { display: block; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 1000; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* POSTS / BLOG */
.page-head { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 3vw, 3rem); }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.post-card { display: flex; flex-direction: column; gap: 1rem; }
.post-card__media { aspect-ratio: 3/2; overflow: hidden; background: var(--paper-dim); border: 1px solid var(--line); border-radius: var(--radius); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: transform 0.8s var(--ease), filter 0.5s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); filter: grayscale(0); }
.post-card__meta { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.04em; }
.post-card h2 { font-size: var(--step-1); }
.post-card h2 a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: left bottom; transition: background-size 0.4s var(--ease); }
.post-card:hover h2 a { background-size: 100% 1px; }

.single-content { max-width: 720px; margin-inline: auto; }
.pagination { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 3rem; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s; }
.pagination .page-numbers:hover, .pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* FORMS */
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.field label { font-size: var(--step--1); letter-spacing: 0.04em; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 0.85rem 1rem; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
textarea { min-height: 150px; resize: vertical; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 74px 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1.5rem var(--gutter) 2.5rem;
    transform: translateY(-120%);
    transition: transform 0.5s var(--ease);
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  body.nav-open .primary-nav { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .primary-nav a { font-size: var(--step-1); padding: 0.6em 0; }
  .header__actions .btn { display: none; }
}

/* WooCommerce light touch */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { text-align: left; }
.woocommerce .button, .woocommerce a.button, .woocommerce button.button {
  background: var(--ink) !important; color: var(--paper) !important;
  border-radius: var(--radius) !important; text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--step--1) !important;
  transition: opacity 0.3s var(--ease);
}
.woocommerce .button:hover { opacity: 0.85 !important; }
.woocommerce span.price, .woocommerce .price { font-family: var(--font-display); color: var(--ink); }
