/*
Theme Name: Regency Grove
Theme URI: https://regencyoliveranch.com
Author: West Coast Protech
Author URI: https://wcptech.com
Description: Custom animated block theme for Regency Olive Ranch LLC — dark olive and gold, Tahoma (original site fonts), scroll-reveal and motion effects. Full Site Editing compatible; works with Gutenify, WooCommerce and standard plugins.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.4.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regency-grove
Tags: block-theme, full-site-editing, dark, one-column, custom-logo, editor-style, wide-blocks
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }

.rg-eyebrow { font-size: 13px !important; letter-spacing: .28em; text-transform: uppercase; font-weight: 600; }

/* ---------- Header ---------- */
.rg-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; transition: background .4s, box-shadow .4s, padding .4s; }
.rg-header.is-stuck { position: fixed; background: rgba(16,20,13,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(212,176,98,.18); }
.admin-bar .rg-header.is-stuck { top: 32px; }
body:not(.rg-overlay) .rg-header { position: relative; background: var(--wp--preset--color--ink); }
body:not(.rg-overlay) .rg-header.is-stuck { position: fixed; }
.rg-header .wp-block-site-logo img { transition: transform .4s; }
.rg-header .wp-block-site-logo a:hover img { transform: scale(1.04); }
.rg-header .wp-block-navigation-item__content { background: linear-gradient(currentColor,currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s, color .3s; padding-bottom: 4px; }
.rg-header .wp-block-navigation-item__content:hover { background-size: 100% 1px; color: var(--wp--preset--color--gold); }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--ink) !important; color: var(--wp--preset--color--cream) !important; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: transform .3s, background-color .3s, color .3s, box-shadow .3s; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(212,176,98,.6); }
.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--gold) !important; color: var(--wp--preset--color--ink) !important; border-color: var(--wp--preset--color--gold) !important; }

/* ---------- Hero ---------- */
.rg-hero { overflow: hidden; isolation: isolate; }
.rg-hero .wp-block-cover__image-background { animation: rg-kenburns 10s ease-out both; }
.rg-hero .wp-block-cover__inner-container > * { animation: rg-rise 1s cubic-bezier(.2,.7,.2,1) both; }
.rg-hero .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: .2s; }
.rg-hero .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: .4s; }
.rg-hero .wp-block-cover__inner-container > *:nth-child(4) { animation-delay: .6s; }
.rg-hero .wp-block-cover__background { background: linear-gradient(90deg,#000 0%,rgba(0,0,0,.85) 34%,rgba(0,0,0,0) 72%) !important; opacity: 1 !important; }
.rg-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; background: linear-gradient(0deg, var(--wp--preset--color--ink), transparent); pointer-events: none; z-index: 1; }
.rg-pop { transform-origin: left bottom; }
.rg-js .rg-reveal .rg-pop { opacity: 0; transform: scale(.7); transition: opacity 1.2s .3s, transform 1.2s .3s cubic-bezier(.2,.7,.2,1); }
.rg-js .rg-reveal.is-visible .rg-pop { opacity: 1; transform: none; }
/* Variety cards */
.rg-vcard { position: relative; overflow: hidden; }
.rg-vleaf { position: absolute; right: -16px; bottom: -18px; width: 96px; height: auto; opacity: .22; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .6s; pointer-events: none; }
.rg-vcard:hover .rg-vleaf { transform: rotate(-28deg) translate(-6px,8px); opacity: .55; }
.rg-vhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; position: relative; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(212,176,98,.25); }
.rg-vnum { font-family: var(--wp--preset--font-family--display); font-style: italic; font-weight: 300; font-size: 44px; line-height: 1; color: var(--wp--preset--color--gold); }
.rg-vorigin { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--wp--preset--color--leaf); white-space: nowrap; }
.rg-vcard h3 { margin: 0 0 10px; }
.rg-vcard p { margin: 0 0 22px; }
.rg-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.rg-tag { font-size: 12px; letter-spacing: .06em; color: var(--wp--preset--color--gold); border: 1px solid rgba(212,176,98,.4); border-radius: 999px; padding: 5px 12px; }
.rg-cue { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid rgba(242,236,220,.45); border-radius: 14px; z-index: 2; }
.rg-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--wp--preset--color--gold); animation: rg-cue 1.8s ease-in infinite; }

.rg-shimmer, .rg-shimmer em { background: linear-gradient(100deg,#d4b062 20%,#f6e3a8 40%,#d4b062 60%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rg-shimmer 6s linear infinite; }

/* ---------- Awards marquee ---------- */
.rg-marquee { position: relative; overflow: hidden; }
.rg-marquee::before, .rg-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.rg-marquee::before { left: 0; background: linear-gradient(90deg, var(--wp--preset--color--deep), transparent); }
.rg-marquee::after { right: 0; background: linear-gradient(270deg, var(--wp--preset--color--deep), transparent); }
.rg-marquee .rg-track { display: flex !important; flex-wrap: nowrap !important; gap: 0 !important; width: max-content; align-items: center; will-change: transform; }
.rg-marquee .rg-track > * { margin: 0 72px 0 0 !important; }
.rg-marquee.is-running .rg-track { animation: rg-marquee var(--rg-marquee-dur, 60s) linear infinite; backface-visibility: hidden; }
.rg-marquee:hover .rg-track { animation-play-state: paused; }
.rg-marquee figure { flex: 0 0 auto; }
.rg-marquee img { width: 118px !important; height: 118px !important; object-fit: contain; transition: transform .4s; }
.rg-marquee img:hover { transform: scale(1.12) rotate(-4deg); }

/* ---------- Cards / media ---------- */
.rg-card { transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .45s, background-color .45s, box-shadow .45s; border: 1px solid rgba(242,236,220,.1); }
.rg-card:hover { transform: translateY(-8px); border-color: var(--wp--preset--color--gold); box-shadow: 0 24px 50px -30px rgba(0,0,0,.7); }
.rg-card .rg-olive { transition: transform .5s cubic-bezier(.2,.7,.2,1); display: inline-block; }
.rg-card:hover .rg-olive { transform: rotate(-24deg) scale(1.12); }
.rg-light .rg-card { border-color: #e2dac5; }
.rg-zoom, .rg-zoom.wp-block-image { overflow: hidden; border-radius: 22px; }
.rg-zoom img { transition: transform 1.1s cubic-bezier(.2,.7,.2,1); display: block; width: 100%; height: 100%; object-fit: cover; }
.rg-zoom:hover img { transform: scale(1.08); }
.rg-float img { animation: rg-float 7s ease-in-out infinite; }
.rg-bottle-stage { background: radial-gradient(circle at 50% 60%, #2a3a1c, #141a10); border-radius: 22px; }
.rg-line { height: 1px; background: var(--wp--preset--color--gold); transform-origin: left; transform: scaleX(0); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); border: 0; opacity: 1; }
.rg-line.is-visible, .no-rg-js .rg-line { transform: scaleX(1); }
hr.rg-line { width: 100% !important; max-width: none !important; margin: 0 0 48px !important; }

/* ---------- Parallax band ---------- */
.rg-parallax { overflow: hidden; }
.rg-parallax .wp-block-cover__image-background { transform: translate3d(0, var(--rg-py, 0px), 0) scale(1.18); will-change: transform; }
.rg-parallax .wp-block-cover__background { background: linear-gradient(90deg, rgba(16,20,13,.88), rgba(16,20,13,.35)) !important; opacity: 1 !important; }

/* ---------- Gallery grid ---------- */
.rg-mosaic { display: grid !important; grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: 220px; gap: 16px !important; }
.rg-mosaic > * { margin: 0 !important; height: 100%; }
.rg-mosaic > .rg-big { grid-column: span 2; grid-row: span 2; }
.rg-mosaic > .rg-wide { grid-column: span 2; }
@media (max-width: 781px) {
  .rg-mosaic { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 160px; }
}

/* ---------- Counter ---------- */
.rg-count { font-variant-numeric: tabular-nums; }

/* ---------- Scroll reveal (only when JS is running, editor stays visible) ---------- */
.rg-js .rg-reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rg-delay, 0s); }
.rg-js .rg-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Content pages ---------- */
.rg-page-hero { position: relative; }
.wp-block-post-content a:not(.wp-block-button__link) { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* WooCommerce (kept functional, styled to match if ever used) */
.woocommerce .button, .wc-block-components-button { border-radius: 999px !important; }

/* ---------- Keyframes ---------- */
@keyframes rg-rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes rg-kenburns { from { transform: scale(1.12) translateX(2%); } to { transform: scale(1) translateX(0); } }
@keyframes rg-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes rg-marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@keyframes rg-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes rg-cue { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(18px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rg-js .rg-reveal { opacity: 1; transform: none; }
  .rg-line { transform: scaleX(1); }
}

/* ---------- Measure limits (kept in CSS so blocks stay editable) ---------- */
.rg-hero h1 { max-width: 660px; }
.rg-hero p { max-width: 540px; }
.rg-hero .wp-block-cover__inner-container { position: static; }
.rg-parallax h2 { max-width: 640px; }
.rg-parallax p { max-width: 520px; }
.rg-reveal.wp-block-group.is-layout-flex > h2 { max-width: 620px; }
.rg-reveal.wp-block-group.is-layout-flex > p { max-width: 420px; }
.rg-bottle-stage { aspect-ratio: 4 / 3; }

/* Hero content column */
.rg-hero-inner { width: 100%; max-width: 1280px; margin-left: auto !important; margin-right: auto !important; position: relative; z-index: 3; }
.rg-hero-inner > * { margin-left: 0 !important; margin-right: 0 !important; }
/* Grids: 3 / 2 / 1 columns */
.rg-grid3.is-layout-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 1000px) { .rg-grid3.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .rg-grid3.is-layout-grid { grid-template-columns: 1fr !important; } }
/* Logo fallback text */
.rg-logo-fallback { font-family: var(--wp--preset--font-family--display); font-size: 24px; color: var(--wp--preset--color--gold); text-decoration: none; letter-spacing: .02em; }
.rg-hero-inner { max-width: 1344px; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
.rg-hero { padding-left: 0 !important; padding-right: 0 !important; }
@media (max-width: 781px) {
  .rg-hero-inner { padding-left: 24px; padding-right: 24px; }
  .rg-hero--home .wp-block-cover__background { background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.75) 38%, #000 70%) !important; }
  .rg-hero--home .wp-block-cover__image-background { object-position: 78% 0% !important; height: 55% !important; }
  .rg-hero--home { min-height: 760px !important; padding-top: 340px !important; padding-bottom: 72px !important; }
  .rg-cue { display: none; }
}

/* ---------- Inner page heroes ---------- */
.rg-hero--page { padding-top: 190px !important; padding-bottom: 110px !important; }
.rg-hero--page .wp-block-cover__background { background: linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.25) 100%) !important; opacity: 1 !important; }
.rg-hero--page .wp-block-cover__image-background { animation: rg-kenburns 12s ease-out both; }
.rg-hero--page h1 { max-width: 760px; }
@media (max-width: 781px) {
  .rg-hero--page { min-height: 480px !important; padding-top: 150px !important; padding-bottom: 64px !important; }
  .rg-hero--page .wp-block-cover__background { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.8) 60%, rgba(0,0,0,.92) 100%) !important; }
  .rg-hero p { font-size: 17px !important; }
}
.rg-page-band { background: var(--wp--preset--color--deep); padding: 190px 32px 72px !important; border-bottom: 1px solid rgba(212,176,98,.18); }
.rg-page-band--short { padding: 110px 0 0 !important; border: 0; background: transparent; }
@media (max-width: 781px) { .rg-page-band { padding: 140px 24px 48px !important; } }

/* Groves: alternating rows */
.rg-varieties .rg-row { margin-bottom: clamp(56px, 8vw, 110px) !important; }
.rg-varieties .rg-row:last-child { margin-bottom: 0 !important; }
@media (min-width: 782px) { .rg-row--flip { flex-direction: row-reverse; } }
.rg-varieties .rg-vhead { margin-bottom: 18px; }
.rg-varieties h2 { margin: 0 0 14px; }
.rg-varieties p { margin: 0 0 22px; }

/* Recipe cards */
.rg-recipe { overflow: hidden; display: flex; flex-direction: column; }
.rg-recipe > * { margin-left: 30px !important; margin-right: 30px !important; }
.rg-recipe > .rg-recipe-img { margin: 0 0 24px !important; border-radius: 0 !important; }
.rg-recipe .rg-eyebrow { margin-bottom: 8px; }
.rg-recipe h2 { margin: 0 0 10px; line-height: 1.15; }
.rg-recipe p { margin: 0; }

/* Contact cards */
.rg-contact-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; color: var(--wp--preset--color--gold); border: 1px solid rgba(212,176,98,.45); margin-bottom: 14px; transition: transform .5s cubic-bezier(.2,.7,.2,1), background .4s, color .4s; }
.rg-contact-card:hover .rg-contact-icon { transform: rotate(-8deg) scale(1.08); background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }
.rg-contact-card p { margin: 0; }
.rg-contact-value { font-size: clamp(22px, 2.2vw, 28px) !important; line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }
.rg-contact-value a { color: var(--wp--preset--color--cream); text-decoration: none; }
.rg-contact-value a:hover { color: var(--wp--preset--color--gold); }
.rg-kl-note { max-width: 720px; margin: 0; }
@media (max-width: 781px) { .rg-kl-note { font-size: 21px !important; } }

/* 7 recipes: even rows on desktop */
@media (min-width: 1001px) {
  .rg-grid3 > .rg-recipe:first-child, .rg-grid3 > .rg-recipe:last-child { grid-column: span 2; }
  .rg-grid3 > .rg-recipe:first-child .rg-recipe-img img, .rg-grid3 > .rg-recipe:last-child .rg-recipe-img img { aspect-ratio: 2 / 1 !important; }
}
@media (min-width: 641px) and (max-width: 1000px) {
  .rg-grid3 > .rg-recipe:first-child { grid-column: span 2; }
  .rg-grid3 > .rg-recipe:first-child .rg-recipe-img img { aspect-ratio: 2 / 1 !important; }
}
@media (max-width: 781px) {
  .rg-hero--page .wp-block-cover__background { background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,.94) 100%) !important; }
}

/* Contact: two cards */
.rg-grid2.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-width: 880px; margin-left: auto !important; margin-right: auto !important; }
@media (max-width: 640px) { .rg-grid2.is-layout-grid { grid-template-columns: 1fr !important; } }
