/*
Theme Name: Flock Off
Theme URI: https://flockoff.fun/
Author: Custom
Description: A clean single-page scrolling theme powered by ACF Flexible Content panels.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onepage-acf
Tags: one-page, flexible-content, acf, scroll, minimal
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:        #0d0d0d;
  --color-surface:   #141414;
  --color-border:    rgba(255,255,255,0.08);
  --color-text:      #e8e4dc;
  --color-muted:     #7a7570;
  --color-accent:    #c8a96e;
  --color-accent-dk: #9e7d47;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --nav-h: 72px;
  --section-pad: clamp(64px, 10vw, 120px);
  --max-w: 1160px;
  --radius: 4px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: #0092dc;
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
	background-image: url("https://flockoff.fun/wp-content/uploads/2026/03/website-bk.png");
	background-size: 100%;
	background-position: 0% 0%;
	background-repeat: no-repeat;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent-dk); }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--color-muted);
  max-width: 60ch;
}

.container {
  width: min(var(--max-w), 100% - 3rem);
  margin-inline: auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .35s, box-shadow .35s;
  background-color: #4a2123;
  background-image: url("https://flockoff.fun/wp-content/uploads/2026/03/header-wood.png");
  background-size: contain;
}

#site-header.scrolled {
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding .site-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.01em;
}
.site-branding .site-title:hover { color: var(--color-accent); }

/* Desktop nav */
#primary-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

#primary-menu a {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--color-muted);
  transition: color .2s;
  position: relative;
}
#primary-menu a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease-out);
}
#primary-menu a:hover,
#primary-menu li.current-menu-item a {
  color: var(--color-text);
}
#primary-menu a:hover::after,
#primary-menu li.current-menu-item a::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hamburger */
#menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
#menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
body.menu-open #menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open #menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open #menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  opacity: 0;
  transition: opacity .3s;
}
#mobile-menu.is-open {
  opacity: 1;
}
#mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-text);
}
#mobile-menu a:hover { color: var(--color-accent); }

@media (max-width: 768px) {
  #primary-menu { display: none; }
  #menu-toggle   { display: flex; }
  #mobile-menu   { display: flex; pointer-events: none; }
  #mobile-menu.is-open { pointer-events: all; }
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  padding-top: var(--nav-h);
}

/* ============================================================
   FLEXIBLE LAYOUT PANELS – SHARED
   ============================================================ */
.flex-panel {
  padding: var(--section-pad) 0;
  position: relative;
}
.flex-panel + .flex-panel {
  border-top: 1px solid var(--color-border);
}

/* Scroll-reveal animation */
.flex-panel [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.flex-panel [data-reveal].revealed {
  opacity: 1;
  transform: none;
}
.flex-panel [data-reveal]:nth-child(2) { transition-delay: .1s; }
.flex-panel [data-reveal]:nth-child(3) { transition-delay: .2s; }
.flex-panel [data-reveal]:nth-child(4) { transition-delay: .3s; }

/* ============================================================
   PANEL: HERO
   ============================================================ */
.panel-hero {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: var(--section-pad) 0;
  overflow: hidden;
}
.panel-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
  opacity: .3;
  z-index: 0;
}
.panel-hero .container { position: relative; z-index: 1; }
.panel-hero .section-body { font-size: 1.25rem; max-width: 50ch; margin-top: .5rem; }
.panel-hero .cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ============================================================
   PANEL: TEXT (simple centered or left-aligned block)
   ============================================================ */
.panel-text.align-center { text-align: center; }
.panel-text.align-center .section-body { margin-inline: auto; }

/* ============================================================
   PANEL: TEXT + IMAGE (50/50 split)
   ============================================================ */
.panel-text-image .inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.panel-text-image.image-left .inner { direction: rtl; }
.panel-text-image.image-left .inner > * { direction: ltr; }
.panel-text-image__image { border-radius: var(--radius); overflow: hidden; }
.panel-text-image__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

@media (max-width: 768px) {
  .panel-text-image .inner { grid-template-columns: 1fr; }
}

/* ============================================================
   PANEL: CARDS / FEATURES GRID
   ============================================================ */
.panel-cards .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color .3s, transform .3s;
}
.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}
.card__icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .6rem;
  color: var(--color-text);
}
.card__text { font-size: .9375rem; color: var(--color-muted); }

/* ============================================================
   PANEL: FULL-WIDTH IMAGE / BANNER
   ============================================================ */
.panel-banner { padding: 0; }
.panel-banner img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
}

/* ============================================================
   PANEL: CONTACT FORM (simple)
   ============================================================ */
.panel-contact .form-wrap {
  max-width: 680px;
  margin: 3rem auto 0;
}
.field-group { margin-bottom: 1.25rem; }
.field-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: .5rem;
}
.field-group input,
.field-group textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .8rem 1rem;
  transition: border-color .2s;
  outline: none;
}
.field-group input:focus,
.field-group textarea:focus { border-color: var(--color-accent); }
.field-group textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .8em 2em;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--color-accent);
  color: #0d0d0d;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dk);
  border-color: var(--color-accent-dk);
  color: #0d0d0d;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* ============================================================
   SOCIAL TOPBAR
   ============================================================ */
#social-topbar {
  background: #c36120;
  border-bottom: 1px solid #8a3625;
  padding: .4rem 0;
}
#social-topbar .container {
  display: flex;
  justify-content: flex-end;
}

.social-links {
  display: flex;
  align-items: center;
  gap: .75rem;
  list-style: none;
}
.social-icon {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  transition: color .2s, transform .2s;
}
.social-icon:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}
.social-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Nudge nav-h down when topbar is present */
body:has(#social-topbar) {
  --topbar-h: 33px;
}
body:has(#social-topbar) #site-header {
  top: 29px;
}
body:has(#social-topbar) #main-content {
  padding-top: calc(var(--nav-h) + var(--topbar-h, 0));
}
body:has(#social-topbar) #mobile-menu {
  padding-top: calc(var(--topbar-h, 0) + var(--nav-h));
}

/* ============================================================
   PANEL: BLOG POSTS
   ============================================================ */

/* --- Grid layout --- */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* --- List layout --- */
.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}
.layout-list .blog-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.layout-list .blog-card__thumb {
  aspect-ratio: 16/9;
  height: 100%;
}
.layout-list .blog-card__thumb img {
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .layout-list .blog-card { grid-template-columns: 1fr; }
}

/* --- Shared card styles --- */
.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.blog-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}
.layout-list .blog-card:hover {
  transform: translateX(4px);
}

.blog-card__thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.blog-card:hover .blog-card__thumb img {
  transform: scale(1.04);
}
.blog-card__thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,.5) 0%, transparent 60%);
  pointer-events: none;
}

.blog-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.blog-card__date {
  font-size: .75rem;
  color: var(--color-muted);
  letter-spacing: .04em;
}
.blog-card__cat {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(200,169,110,.1);
  padding: .2em .65em;
  border-radius: 2px;
}
.blog-card__cat:hover {
  background: rgba(200,169,110,.2);
  color: var(--color-accent);
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin: 0;
}
.blog-card__title a {
  color: inherit;
  text-decoration: none;
}
.blog-card__title a:hover { color: var(--color-accent); }

.blog-card__excerpt {
  font-size: .9rem;
  color: var(--color-muted);
  line-height: 1.6;
  flex: 1;
}

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--color-border);
  transition: gap .2s;
}
.blog-card__read-more:hover {
  color: var(--color-accent);
  gap: .65rem;
}

.blog-posts-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ============================================================
   FOOTER — BLOCK LAYOUT
   ============================================================ */
#colophon.has-blocks {
  border-top: 1px solid var(--color-border);
}

.footer-blocks-row {
  padding: 4rem 0 3rem;
}

.footer-blocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

@media (max-width: 600px) {
  .footer-blocks-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.footer-block { display: flex; flex-direction: column; gap: .75rem; }

/* Logo block */
.footer-logo-img  { max-width: 140px; height: auto; }
.footer-site-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.footer-site-title a { color: var(--color-text); }
.footer-site-title a:hover { color: var(--color-accent); }
.footer-tagline   { font-size: .9375rem; color: var(--color-muted); }
.footer-copyright { font-size: .8rem;    color: var(--color-muted); }

/* Menu block */
.footer-block-heading {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: .25rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-nav a {
  font-size: .9rem;
  color: var(--color-muted);
  transition: color .2s, padding-left .2s;
}
.footer-nav a:hover {
  color: var(--color-text);
  padding-left: .35rem;
}

/* Social block in footer */
.footer-block--social .social-links { flex-wrap: wrap; justify-content: flex-start; }
.footer-block--social .social-icon svg { width: 20px; height: 20px; }

/* Text blurb block */
.footer-text-body { font-size: .9rem; color: var(--color-muted); line-height: 1.7; }

/* Simple fallback footer */
#colophon.simple {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
  text-align: center;
}
#colophon.simple p { font-size: .8125rem; color: var(--color-muted); }

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #0d0d0d;
  padding: .5rem 1rem;
  z-index: 999;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   UTILITY
   ============================================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
