/*
Theme Name: Portland Fir
Theme URI: https://portlandfir.com
Author: Cre8ive Marketing
Description: Trade-only credentials site for Portland Fir. One public page; everything else behind the partner gate.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: portlandfir
*/

/* ---------------------------------------------------------------
   1. Tokens — taken from the signed-off mockups. Nothing in the
   templates may hard-code a colour or a font; it comes from here.
   --------------------------------------------------------------- */
:root {
  --forest: #0B1D15;
  --forest-deep: #081610;
  --panel: #0E2A1D;
  --panel-2: #14301F;
  --gold: #C9A45C;
  --gold-dark: #8A6D2F;
  --paper: #F7F3EA;
  --paper-2: #EFE9DB;
  --stone: #EAE3D5;
  --ink: #14261D;
  --muted: #4B544C;
  --muted-2: #5A6159;
  --line: #DED6C4;
  --line-soft: #E0D9C8;
  --on-dark: #D3DBD4;
  --on-dark-soft: #9FAEA3;

  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 56px;
  --gutter-mobile: 20px;
  --maxw: 1200px;
  --radius: 3px;

  /*
   * Content is held to --maxw and centred, while the band it sits on stays
   * full-bleed — the dark green sections are meant to span the window.
   *
   * Done as padding rather than a wrapper <div> inside every section: it
   * needs no markup, so there is no template where somebody forgets the
   * wrapper and that one section quietly runs full width.
   *
   * The max() keeps --gutter as the floor, so below 1200px it behaves
   * exactly as before.
   */
  --pad-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* ---------------------------------------------------------------
   2. Self-hosted faces. No request leaves the site for a font: the
   whole premise is that only approved partners see these pages, and
   a third-party font request carries a buyer's address off-site.
   --------------------------------------------------------------- */
/* Both faces are variable fonts, so each family is ONE file covering its
   whole weight range. Declared per-weight they would be the same bytes
   downloaded three times over — 258KB of font for 92KB of typeface. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-var.woff2') format('woff2-variations'),
       url('assets/fonts/cormorant-garamond-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/inter-var.woff2') format('woff2-variations'),
       url('assets/fonts/inter-var.woff2') format('woff2');
}

/* ---------------------------------------------------------------
   3. Reset and base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, picture, video { max-width: 100%; display: block; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 300; line-height: 1.1; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Keyboard focus must be visible on both grounds. */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------
   4. Layout primitives
   --------------------------------------------------------------- */
.pf-section { padding: 64px var(--pad-inline); }
.pf-section--dark { background: var(--forest); color: var(--paper); }
.pf-section--deep { background: var(--forest-deep); color: var(--paper); }
.pf-section--paper2 { background: var(--paper-2); }
.pf-split {
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.pf-split > * { flex: 1 1 420px; min-width: 0; }

.pf-eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-dark);
}
.pf-section--dark .pf-eyebrow,
.pf-section--deep .pf-eyebrow { color: var(--gold); }

/* ---------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------- */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 34px; border: 0; border-radius: var(--radius);
  background: var(--gold); color: var(--forest);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.pf-btn:hover { background: var(--gold-dark); color: var(--paper); }
.pf-btn--ghost {
  background: transparent; border: 1px solid var(--gold); color: var(--gold);
}
.pf-btn--ghost:hover { background: var(--gold); color: var(--forest); }
.pf-btn--sm { height: 50px; padding: 0 26px; font-size: 14px; }

/* ---------------------------------------------------------------
   6. Header and footer — shared by every gated template
   --------------------------------------------------------------- */
.pf-header {
  background: var(--forest);
  padding: 18px var(--pad-inline);
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.pf-header__logo img { height: 48px; width: auto; }
.pf-nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.pf-nav a { font-size: 13px; color: var(--on-dark); }
.pf-nav a:hover,
.pf-nav a[aria-current="page"] { color: var(--gold); }
.pf-nav__cta {
  font-size: 13px; padding: 9px 18px;
  border: 1px solid var(--gold); border-radius: var(--radius); color: var(--gold);
}

.pf-burger {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.pf-burger span {
  display: block; width: 22px; height: 2px; background: var(--paper); margin: 4px 0;
}

.pf-footer {
  background: var(--forest-deep); color: #8B9A90;
  padding: 28px var(--pad-inline);
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
  font-size: 12px;
}

/* ---------------------------------------------------------------
   7. Product card — used on all five category pages
   --------------------------------------------------------------- */
.pf-grid { display: grid; gap: 24px; }
.pf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pf-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }

.pf-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #FFFFFF; border: 1px solid var(--line-soft);
  border-radius: 4px; color: var(--ink);
}
.pf-card img {
  width: 100%; height: auto; object-fit: cover;
  border-bottom: 1px solid var(--line-soft);
}
.pf-card--portrait img { aspect-ratio: 3 / 4; }
.pf-card--square img { aspect-ratio: 1 / 1; }
/* Boxed product shots, as on the lights page. */
.pf-card--box img { aspect-ratio: 4 / 3; }
.pf-card--box .pf-card__noimage { aspect-ratio: 4 / 3; }
.pf-card__body {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 22px;
}
.pf-card__head { display: flex; flex-direction: column; gap: 4px; }
.pf-card__name { font-family: var(--display); font-size: 26px; line-height: 1.15; }
.pf-card__sku { font-size: 12px; letter-spacing: 0.04em; color: #8A7C5E; }
.pf-card__note { flex: 1 1 auto; font-size: 14px; line-height: 1.55; color: var(--muted-2); }
.pf-card__more {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--paper-2);
  font-size: 13px; letter-spacing: 0.04em; color: var(--gold-dark);
}

/* ---------------------------------------------------------------
   8. Responsive — the mobile artboards are the specification.
   Mobile is this page reflowed, never a second set of templates.
   --------------------------------------------------------------- */
@media (max-width: 1200px) {
  .pf-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .pf-grid--3,
  .pf-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --gutter: var(--gutter-mobile); }
  body { font-size: 15px; }
  .pf-section { padding: 36px var(--gutter); }
  .pf-split { gap: 24px; }
  .pf-split > * { flex: 1 1 100%; }
  .pf-grid--2, .pf-grid--3, .pf-grid--4 { grid-template-columns: 1fr; }
  /* The potted trees stay two-up on a phone: they are small, square and
     read as a set, and one-up would make five full-width cards to scroll. */
  .pf-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pf-nav { display: none; }
  .pf-nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 14px; width: 100%; padding-top: 12px;
  }
  .pf-burger { display: block; }
  .pf-header { padding: 14px var(--gutter); }
  .pf-header__logo img { height: 38px; }
  .pf-card__name { font-size: 20px; }
}
