:root {
  --color-primary: #12352F;
  --color-primary-hover: #0C221E;
  --color-secondary: #B4491F;
  --color-secondary-hover: #93380F;
  --color-accent: #E8A87C;
  --color-accent-hover: #D98F5C;
  --color-text: #1C1A17;
  --color-text-muted: #5A5349;
  --color-surface: #F2EADF;
  --color-background: #FBF7F0;
  --color-border: #DCD3C6;
  --font-heading: Fraunces, 'Source Serif 4', Georgia, serif;
  --font-body: Inter, 'Public Sans', system-ui, -apple-system, sans-serif;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;
}

/* HDY Haus design system
 * Typographic scale, layout rhythm, and the WCAG 2.2 AA accessibility layer.
 * Colour tokens live in tokens.css.
 */

/* Self-hosted so no visitor request is made to Google on page load.
   Both are variable fonts, so one file per subset covers every weight. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://hdyhaus.com/wp-content/uploads/2026/08/hdy-fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://hdyhaus.com/wp-content/uploads/2026/08/hdy-fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://hdyhaus.com/wp-content/uploads/2026/08/hdy-inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://hdyhaus.com/wp-content/uploads/2026/08/hdy-inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The block renderer emits the scope class as wpc-theme-hdy-haus (hyphen) while
   the theme name is hdy_haus (underscore), so a literal [class*="wpc-theme-hdy"]
   selector never matches. The attribute selector matches both spellings and has
   the same specificity as a class, which keeps every #uc_id widget rule winning
   over these theme rules exactly as before.

   The tokens are also emitted on :root because one undefined custom property
   invalidates the whole declaration it appears in. When --section-y went missing,
   `padding: var(--section-y) var(--space-lg)` was dropped entirely and every
   section lost its gutters, not just its vertical padding. */
:root,
[class*="wpc-theme-hdy"] {
  /* Fraunces carries an optical size axis. Let it adjust with the rendered size. */
  font-optical-sizing: auto;

  /* Type scale. Fluid, clamped, never below 16px. */
  --font-size-xs: 0.875rem;   /* 14px, captions and eyebrows only */
  --font-size-sm: 1rem;       /* 16px, minimum body size */
  --font-size-base: 1.125rem; /* 18px, default body */
  --font-size-lg: 1.25rem;    /* 20px, lead paragraphs */
  --font-size-xl: 1.5rem;     /* 24px, h3 */
  --font-size-2xl: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);  /* h2 small */
  --font-size-3xl: clamp(2rem, 1.5rem + 2vw, 2.75rem);       /* h2 */
  --font-size-4xl: clamp(2.5rem, 1.8rem + 3vw, 4rem);        /* h1 */

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-body: 1.7;

  --measure: 68ch;
  --width-content: 1140px;
  --width-wide: 1320px;
  --width-narrow: 720px;

  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);

  --shadow-card: 0 1px 2px rgba(28, 26, 23, 0.04), 0 8px 24px rgba(28, 26, 23, 0.05);
}

/* Base rhythm */
[class*="wpc-theme-hdy"] {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background-color: var(--color-background);
}

[class*="wpc-theme-hdy"] h1,
[class*="wpc-theme-hdy"] h2,
[class*="wpc-theme-hdy"] h3,
[class*="wpc-theme-hdy"] h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  font-weight: 600;
  text-wrap: balance;
  margin: 0 0 var(--space-md);
}

[class*="wpc-theme-hdy"] h1 { font-size: var(--font-size-4xl); letter-spacing: -0.02em; }
[class*="wpc-theme-hdy"] h2 { font-size: var(--font-size-3xl); letter-spacing: -0.015em; }
[class*="wpc-theme-hdy"] h3 { font-size: var(--font-size-xl);  line-height: var(--leading-snug); }
[class*="wpc-theme-hdy"] h4 { font-size: var(--font-size-lg);  line-height: var(--leading-snug); }

[class*="wpc-theme-hdy"] p { margin: 0 0 var(--space-md); max-width: var(--measure); }
[class*="wpc-theme-hdy"] p:last-child { margin-bottom: 0; }

/* Eyebrow label. Terracotta, used above headings. */
[class*="wpc-theme-hdy"] .hdy-eyebrow {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

/* Dark sections. Inverts text so contrast holds on forest green. */
[class*="wpc-theme-hdy"] .hdy-dark {
  background-color: var(--color-primary);
  color: var(--color-background);
}
[class*="wpc-theme-hdy"] .hdy-dark h1,
[class*="wpc-theme-hdy"] .hdy-dark h2,
[class*="wpc-theme-hdy"] .hdy-dark h3,
[class*="wpc-theme-hdy"] .hdy-dark h4 { color: var(--color-background); }
[class*="wpc-theme-hdy"] .hdy-dark .hdy-eyebrow { color: var(--color-accent); }
[class*="wpc-theme-hdy"] .hdy-dark .hdy-muted { color: #D6CFC2; }

[class*="wpc-theme-hdy"] .hdy-muted { color: var(--color-text-muted); }

/* --- Accessibility layer, WCAG 2.2 AA --- */

/* 2.4.7 Focus Visible and 2.4.11 Focus Not Obscured.
   Applied to everything focusable, never removed. */
[class*="wpc-theme-hdy"] :focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
[class*="wpc-theme-hdy"] .hdy-dark :focus-visible {
  outline-color: var(--color-accent);
}

/* 2.5.8 Target Size minimum. */
[class*="wpc-theme-hdy"] a.hdy-btn,
[class*="wpc-theme-hdy"] button,
[class*="wpc-theme-hdy"] input[type="submit"] {
  min-height: 44px;
  min-width: 44px;
}

/* 2.3.3 Animation from Interactions. */
@media (prefers-reduced-motion: reduce) {
  [class*="wpc-theme-hdy"] *,
  [class*="wpc-theme-hdy"] *::before,
  [class*="wpc-theme-hdy"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-blocked: auto !important;
  }
}

/* Scroll reveal. Only active when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  [class*="wpc-theme-hdy"] .hdy-reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
  }
  [class*="wpc-theme-hdy"] .hdy-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* Links carry an underline so meaning is never colour alone (1.4.1). */
[class*="wpc-theme-hdy"] .hdy-prose a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
[class*="wpc-theme-hdy"] .hdy-dark .hdy-prose a { color: var(--color-accent); }

/* Screen reader only, still focusable. Deliberately unscoped: widget blocks do
   not carry the wpc-theme-hdy class unless the widget is linked to the theme,
   and a sr-only class that fails to apply prints its text on the page. The
   hdy- prefix keeps it from colliding with anything else. */
.hdy-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Gravity Forms ---
   A form is a shortcode block, not a widget, so it never receives the
   wpc-theme-hdy scope class and none of the rules above reach it. Scoping to
   the full width template instead keeps this on rebuild pages only and out of
   the admin, which loads none of this stylesheet. */

/* wpautop leaves an empty paragraph either side of a shortcode block, which
   would otherwise open a 20px gap in the middle of the section. */
.wpcursor-fullwidth-wrapper  p:has( br:only-child),
.wpcursor-fullwidth-wrapper  p:empty { display: none; }

.wpcursor-fullwidth-wrapper .gform_wrapper {
  /* The heading and lead come from the prose section directly above, which
     supplies its own bottom padding. Pulling the form up by that amount keeps
     the two reading as one section instead of two with a seam between them. */
  margin: calc(var(--space-lg) - var(--section-y)) 0 0;
  background-color: var(--color-background);
  padding: 0 var(--space-lg) var(--section-y);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--leading-body);
  color: var(--color-text);

  /* Gravity Forms ships its own theme framework whose selectors are far more
     specific than anything sane written here, so the controls and the submit
     button are driven through its published custom properties instead of being
     overridden. Plain rules still handle everything the framework leaves alone. */
  --gf-ctrl-bg-color: #FFFFFF;
  --gf-ctrl-color: var(--color-text);
  --gf-ctrl-border-color: var(--color-border);
  --gf-ctrl-border-color-hover: var(--color-text-muted);
  --gf-ctrl-border-color-focus: var(--color-primary);
  --gf-ctrl-radius: var(--radius-md);
  --gf-ctrl-size: 48px;
  --gf-ctrl-textarea-height: 190px;
  --gf-ctrl-font-family: var(--font-body);
  --gf-ctrl-font-size: var(--font-size-base);
  --gf-ctrl-desc-color: var(--color-text-muted);
  --gf-ctrl-desc-font-family: var(--font-body);
  --gf-ctrl-desc-font-size: var(--font-size-sm);
  --gf-ctrl-desc-color-error: var(--color-secondary-hover);

  --gf-ctrl-btn-bg-color-primary: var(--color-primary);
  --gf-ctrl-btn-bg-color-hover-primary: var(--color-primary-hover);
  --gf-ctrl-btn-bg-color-focus-primary: var(--color-primary-hover);
  --gf-ctrl-btn-bg-color-ctrl: var(--color-primary);
  --gf-ctrl-btn-bg-color-hover-ctrl: var(--color-primary-hover);
  --gf-ctrl-btn-bg-color-focus-ctrl: var(--color-primary-hover);
  --gf-ctrl-btn-color-primary: var(--color-background);
  --gf-ctrl-btn-color-hover-primary: var(--color-background);
  --gf-ctrl-btn-color-focus-primary: var(--color-background);
  --gf-ctrl-btn-color-ctrl: var(--color-background);
  --gf-ctrl-btn-color-hover-ctrl: var(--color-background);
  --gf-ctrl-btn-color-focus-ctrl: var(--color-background);
  --gf-ctrl-btn-border-color-primary: var(--color-primary);
  --gf-ctrl-btn-border-color-hover-primary: var(--color-primary-hover);
  --gf-ctrl-btn-border-color-focus-primary: var(--color-primary-hover);
  --gf-ctrl-btn-border-color-ctrl: var(--color-primary);
  --gf-ctrl-btn-border-color-hover-ctrl: var(--color-primary-hover);
  --gf-ctrl-btn-border-color-focus-ctrl: var(--color-primary-hover);
  --gf-ctrl-btn-radius: var(--radius-full);
  --gf-ctrl-btn-size: 48px;
  --gf-ctrl-btn-padding-x: 2.25rem;
  --gf-ctrl-btn-font-family: var(--font-body);
  --gf-ctrl-btn-font-size: var(--font-size-base);
  --gf-ctrl-btn-font-weight: 600;
  --gf-ctrl-btn-text-transform: none;
  --gf-ctrl-btn-letter-spacing: 0;
  --gf-ctrl-btn-shadow: none;
  --gf-ctrl-btn-shadow-hover: none;
  /* 2.4.7 Focus Visible, matching the terracotta ring used everywhere else. */
  --gf-ctrl-btn-shadow-focus: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-secondary);
}

/* Matches the 1140px inner column the widget sections use, so the form starts
   on the same left edge as the heading above it rather than floating centred. */
.wpcursor-fullwidth-wrapper .gform_wrapper form {
  max-width: var(--width-content);
  margin: 0 auto;
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gform_fields {
  display: grid;
  /* minmax(0, 1fr) rather than 1fr: a grid track will not shrink below the
     intrinsic width of a text input, which overflowed the viewport on mobile. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  max-width: 40rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gfield {
  margin: 0;
  min-width: 0;
}

/* The honeypot replaces a CAPTCHA, so it must never become visible. */
.wpcursor-fullwidth-wrapper .gform_wrapper .gform_validation_container { display: none !important; }

.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-xs);
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_required {
  color: var(--color-secondary-hover);
  margin-left: 0.25em;
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: var(--measure);
  margin: var(--space-xs) 0 0;
  padding: 0;
}

.wpcursor-fullwidth-wrapper .gform_wrapper input[type="text"],
.wpcursor-fullwidth-wrapper .gform_wrapper input[type="email"],
.wpcursor-fullwidth-wrapper .gform_wrapper input[type="tel"],
.wpcursor-fullwidth-wrapper .gform_wrapper input[type="url"],
.wpcursor-fullwidth-wrapper .gform_wrapper select,
.wpcursor-fullwidth-wrapper .gform_wrapper textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--leading-snug);
  color: var(--color-text);
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 150ms ease-out;
}

/* Gravity Forms fixes a textarea at rows="10" and backs it with an !important
   min-height, giving a 288px box for answers that are usually three lines.
   Matching !important is the only thing that reaches it. The field still grows
   by drag, and by content once someone types past the visible area. */
.wpcursor-fullwidth-wrapper .gform_wrapper textarea {
  min-height: 190px !important;
  height: 190px !important;
  line-height: var(--leading-body);
  resize: vertical;
}

.wpcursor-fullwidth-wrapper .gform_wrapper input:hover,
.wpcursor-fullwidth-wrapper .gform_wrapper select:hover,
.wpcursor-fullwidth-wrapper .gform_wrapper textarea:hover {
  border-color: var(--color-text-muted);
}

.wpcursor-fullwidth-wrapper .gform_wrapper input:focus-visible,
.wpcursor-fullwidth-wrapper .gform_wrapper select:focus-visible,
.wpcursor-fullwidth-wrapper .gform_wrapper textarea:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-color: var(--color-primary);
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gform_footer {
  max-width: 40rem;
  margin: var(--space-lg) 0 0;
  padding: 0;
}

/* Kadence styles a bare .button, so the type selector is needed to outrank it. */
.wpcursor-fullwidth-wrapper .gform_wrapper input[type="submit"].gform_button,
.wpcursor-fullwidth-wrapper .gform_wrapper button.gform_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 2.25rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  color: var(--color-background);
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

.wpcursor-fullwidth-wrapper .gform_wrapper input[type="submit"].gform_button:hover,
.wpcursor-fullwidth-wrapper .gform_wrapper button.gform_button:hover {
  color: var(--color-background);
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* Errors are named in text as well as colour (1.4.1). */
.wpcursor-fullwidth-wrapper .gform_wrapper .gform_validation_errors,
.wpcursor-fullwidth-wrapper .gform_wrapper .validation_message {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-secondary-hover);
}

.wpcursor-fullwidth-wrapper .gform_wrapper .gform_validation_errors {
  max-width: 40rem;
  margin: 0 0 var(--space-lg);
  padding: var(--space-md);
  background-color: #FBEDE7;
  border: 1px solid var(--color-secondary-hover);
  border-radius: var(--radius-md);
}

.wpcursor-fullwidth-wrapper .gform_wrapper .validation_message { margin-top: var(--space-xs); }

.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_error input,
.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_error select,
.wpcursor-fullwidth-wrapper .gform_wrapper .gfield_error textarea {
  border-color: var(--color-secondary-hover);
}

.wpcursor-fullwidth-wrapper .gform_confirmation_wrapper {
  margin: calc(var(--space-lg) - var(--section-y)) 0 0;
  background-color: var(--color-background);
  padding: 0 var(--space-lg) var(--section-y);
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.wpcursor-fullwidth-wrapper .gform_confirmation_message {
  max-width: var(--width-content);
  margin: 0 auto;
}

/* No mobile gutter override: the widget sections keep their --space-lg padding
   at every width, so the form must too or the left edges stop lining up. */

/* --- Single posts ---
   Insights articles run on the Kadence post template, not the fullwidth
   wrapper, so they carry neither the theme class nor the wrapper class and
   none of the layers above reach them. The tokens are emitted on :root, so
   they resolve here. body.single-post outranks Kadence's own element rules
   whichever order the sheets load in. */
body.single-post .entry-title,
body.single-post .entry-content h2,
body.single-post .entry-content h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.single-post .entry-title {
  font-size: var(--font-size-3xl);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-sm);
}

body.single-post .entry-content h2 {
  font-size: var(--font-size-2xl);
  line-height: var(--leading-tight);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

body.single-post .entry-content h3 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

body.single-post .entry-content p,
body.single-post .entry-content li {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  line-height: var(--leading-body);
  color: var(--color-text);
  max-width: var(--measure);
}

body.single-post .entry-content p { margin-bottom: var(--space-md); }
body.single-post .entry-content li { margin-bottom: var(--space-xs); }
body.single-post .entry-content strong { color: var(--color-primary); font-weight: 600; }

body.single-post .entry-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

body.single-post .entry-content a:hover { color: var(--color-secondary-hover); }

/* Category eyebrow above the title, matched to .hdy-eyebrow on the widgets. */
body.single-post .entry-taxonomies,
body.single-post .entry-taxonomies a {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  text-decoration: none;
}

body.single-post .entry-meta,
body.single-post .entry-meta a {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* --- Site header and footer wrappers ---
   The plugin renders the header and footer widgets inside its own
   #wpcursor-site-header / #wpcursor-site-footer elements. Widget CSS has to be
   scoped to the widget wrapper, which sits inside these, so the two properties
   that must live on the outer element are here instead: the sticky positioning
   (a sticky child would only stick within the header's own height) and the
   footer's full-bleed background. */

#wpcursor-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

#wpcursor-site-footer {
  display: block;
  background: var(--color-primary);
}
