/*
Theme Name: House of Khepri
Theme URI: https://example.com/house-of-khepri
Author: House of Khepri
Description: A minimal, editorial WordPress theme for House of Khepri, inspired by natural wool, artisanal rugs, quiet geometry and the brand palette.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: house-of-khepri
Tags: custom-logo, custom-colors, editor-style, featured-images, full-site-editing-ready, one-column, two-columns
*/

:root {
  --hok-brown: #433429;
  --hok-ochra: #b57350;
  --hok-nougat: #c8c0b2;
  --hok-pink: #ce8e9e;
  --hok-light-blue: #a0b1ba;
  --hok-dark-blue: #374f74;
  --hok-mustard: #e4b548;
  --hok-paper: #f8f6f2;
  --hok-ink: #181411;
  --hok-muted: #6f665d;
  --hok-line: rgba(24, 20, 17, 0.16);
  --hok-radius: 0;
  --hok-container: 1180px;
  --hok-gutter: clamp(20px, 4vw, 56px);
  --hok-logo-black-url: none;
  --hok-logo-black-cropped-url: none;
  --hok-logo-white-url: none;
  --hok-hero-image: none;
  --hok-studio-image: none;
  --hok-collection-image: none;
  --hok-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hok-font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--hok-paper);
  color: var(--hok-ink);
  font-family: var(--hok-font-sans);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

button,
input,
textarea,
select {
  font: inherit;
}

.hok-container,
.site-header__inner,
.site-footer__inner,
.site-content > .wp-block-group__inner-container,
.entry-content > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-buttons, .wp-block-image) {
  width: min(var(--hok-container), calc(100% - (var(--hok-gutter) * 2)));
  margin-left: auto;
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--hok-ink);
  color: var(--hok-paper);
}

.skip-link:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hok-line);
}

.site-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.custom-logo-link,
.site-logo {
  display: inline-flex;
  align-items: center;
  width: 44px;
  min-width: 44px;
}

.custom-logo-link img,
.site-logo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.site-title {
  display: inline-block;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: 0.08em;
  font-weight: 300;
  text-decoration: none;
  white-space: nowrap;
}

.primary-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin: 0;
  padding: 0;
}

.primary-navigation a {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a:focus {
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--hok-line);
  background: transparent;
  padding: 9px 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.site-main {
  min-height: 60vh;
}

.hok-page {
  overflow: hidden;
}

.hok-kicker,
.hok-section-label,
.hok-meta {
  margin: 0 0 16px;
  color: var(--hok-muted);
  font-size: 13px;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hok-hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: clamp(80px, 12vw, 150px) 0;
  background:
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--hok-nougat), transparent 55%), transparent 34%),
    radial-gradient(circle at 82% 72%, color-mix(in srgb, var(--hok-ochra), transparent 70%), transparent 36%),
    var(--hok-paper);
}

.hok-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hok-hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

.hok-hero__content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
  align-items: center;
  gap: clamp(38px, 8vw, 110px);
}

.hok-hero__copy {
  max-width: 760px;
}

.hok-hero h1,
.hok-section-title,
.entry-title {
  margin: 0;
  font-family: var(--hok-font-sans);
  font-weight: 300;
  letter-spacing: 0.025em;
  line-height: 1.05;
  color: var(--hok-ink);
}

.hok-hero h1 {
  font-size: clamp(52px, 8vw, 112px);
}

.hok-lead {
  max-width: 720px;
  margin: 28px 0 0;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.42;
  color: var(--hok-brown);
}

.hok-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hok-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--hok-ink);
  border-radius: var(--hok-radius);
  background: var(--hok-ink);
  color: var(--hok-paper);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 13px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.hok-button:hover,
.hok-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  background: transparent;
  color: var(--hok-ink);
}

.hok-button--ghost {
  background: transparent;
  color: var(--hok-ink);
}

.hok-button--ghost:hover,
.hok-button--ghost:focus {
  background: var(--hok-ink);
  color: var(--hok-paper);
}

.hok-hero__mark,
.hok-mark {
  aspect-ratio: 1;
  background-color: var(--hok-ink);
  -webkit-mask-image: var(--hok-logo-black-url);
  mask-image: var(--hok-logo-black-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hok-hero__mark {
  width: min(320px, 55vw);
  justify-self: center;
  opacity: 0.92;
}

.hok-section {
  padding: clamp(72px, 10vw, 150px) 0;
}

.hok-section--warm {
  background: color-mix(in srgb, var(--hok-nougat), var(--hok-paper) 62%);
}

.hok-section--brown {
  background: var(--hok-brown);
  color: var(--hok-paper);
}

.hok-section--brown .hok-section-title,
.hok-section--brown .hok-kicker,
.hok-section--brown .hok-section-label,
.hok-section--brown .hok-lead,
.hok-section--brown .hok-meta {
  color: var(--hok-paper);
}

.hok-section-title {
  max-width: 880px;
  font-size: clamp(38px, 6vw, 82px);
}

.hok-copy {
  max-width: 780px;
  margin-top: 28px;
  color: var(--hok-brown);
}

.hok-section--brown .hok-copy {
  color: color-mix(in srgb, var(--hok-paper), transparent 8%);
}

.hok-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  align-items: stretch;
  gap: clamp(34px, 6vw, 84px);
}

.hok-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hok-line);
  border: 1px solid var(--hok-line);
}

.hok-card {
  background: var(--hok-paper);
  padding: clamp(26px, 4vw, 46px);
}

.hok-section--brown .hok-card {
  background: color-mix(in srgb, var(--hok-brown), black 8%);
}

.hok-card h3 {
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 24px;
}

.hok-card p,
.hok-card ul {
  margin: 0;
  color: var(--hok-muted);
}

.hok-section--brown .hok-card p,
.hok-section--brown .hok-card ul {
  color: color-mix(in srgb, var(--hok-paper), transparent 18%);
}

.hok-card ul {
  padding-left: 1.1em;
}

.hok-quote {
  margin: 44px 0 0;
  padding: 34px 0 0;
  border-top: 1px solid var(--hok-line);
  font-family: var(--hok-font-serif);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.25;
  color: var(--hok-brown);
}

.hok-image-slot {
  min-height: 520px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--hok-nougat);
  border: 1px solid var(--hok-line);
}

.hok-image-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.92;
}

.hok-image-slot--studio::before {
  background-image: var(--hok-studio-image);
}

.hok-image-slot--collection::before {
  background-image: var(--hok-collection-image);
}

.hok-image-slot::after {
  content: "";
  width: 42%;
  aspect-ratio: 1;
  background: var(--hok-ink);
  -webkit-mask-image: var(--hok-logo-black-url);
  mask-image: var(--hok-logo-black-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.18;
}

.hok-palette-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.hok-color-chip {
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  border: 1px solid var(--hok-line);
  color: var(--hok-paper);
}

.hok-color-chip span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
}

.hok-color-chip--light {
  color: var(--hok-ink);
}

.hok-bg-brown { background-color: var(--hok-brown); }
.hok-bg-ochra { background-color: var(--hok-ochra); }
.hok-bg-nougat { background-color: var(--hok-nougat); }
.hok-bg-pink { background-color: var(--hok-pink); }
.hok-bg-light-blue { background-color: var(--hok-light-blue); }
.hok-bg-dark-blue { background-color: var(--hok-dark-blue); }
.hok-bg-mustard { background-color: var(--hok-mustard); }

.hok-rug-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
  margin-top: 50px;
}

.hok-rug-card {
  min-width: 0;
}

.hok-rug-card h3 {
  margin: 18px 0 4px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hok-rug-card p {
  margin: 0;
  color: var(--hok-muted);
  font-size: 15px;
}

.hok-rug-swatch {
  position: relative;
  aspect-ratio: 0.78;
  overflow: hidden;
  border: 1px solid var(--hok-line);
}

.hok-rug-swatch--lines::before {
  content: "";
  position: absolute;
  inset: 0 9%;
  background-image: repeating-linear-gradient(90deg, transparent 0 15%, rgba(24, 20, 17, 0.78) 15% calc(15% + 2px), transparent calc(15% + 2px) 33%);
}

.hok-rug-swatch--bordered {
  padding: 7.4%;
}

.hok-rug-swatch--bordered::before {
  content: "";
  position: absolute;
  inset: 7.4%;
  border: 2px solid rgba(24, 20, 17, 0.58);
}

.hok-rug-swatch--bordered::after,
.hok-rug-swatch--monogram::after {
  content: "";
  position: absolute;
  inset: 13%;
  background-image: var(--hok-logo-black-url);
  background-repeat: repeat;
  background-size: 38% 34%;
  background-position: center;
  opacity: 0.96;
}

.hok-rug-swatch--monogram::after {
  background-image: var(--hok-logo-black-cropped-url);
  inset: 2% 6%;
  background-size: 25% 34%;
  background-position: left top;
}

.hok-spec-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(248, 246, 242, 0.18);
  border: 1px solid rgba(248, 246, 242, 0.18);
  margin-top: 44px;
}

.hok-cta {
  text-align: center;
}

.hok-cta .hok-section-title,
.hok-cta .hok-copy {
  margin-left: auto;
  margin-right: auto;
}

.entry-header {
  padding: clamp(56px, 8vw, 110px) 0 24px;
}

.entry-content {
  padding-bottom: clamp(60px, 8vw, 120px);
}

.entry-content > * + * {
  margin-top: 1.5em;
}

.site-footer {
  background: var(--hok-ink);
  color: var(--hok-paper);
  padding: 64px 0 34px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: start;
}

.site-footer__brand {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.site-footer__logo {
  width: 54px;
  min-width: 54px;
}

.site-footer__logo img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.site-footer p {
  margin: 0;
  max-width: 560px;
  color: rgba(248, 246, 242, 0.76);
}

.footer-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: right;
}

.footer-navigation a {
  color: var(--hok-paper);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-decoration: none;
}

.site-info {
  grid-column: 1 / -1;
  padding-top: 40px;
  border-top: 1px solid rgba(248, 246, 242, 0.18);
  font-size: 13px;
  color: rgba(248, 246, 242, 0.58);
}

@media (max-width: 1020px) {
  .hok-rug-grid,
  .hok-palette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hok-grid-3,
  .hok-spec-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 18px var(--hok-gutter) 24px;
    background: var(--hok-paper);
    border-bottom: 1px solid var(--hok-line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .primary-navigation.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .primary-navigation ul {
    align-items: flex-start;
    flex-direction: column;
  }

  .hok-hero__content,
  .hok-grid-2,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .hok-hero__mark {
    width: 210px;
    order: -1;
  }

  .hok-palette-grid,
  .hok-rug-grid {
    grid-template-columns: 1fr;
  }

  .hok-color-chip {
    min-height: 120px;
  }

  .hok-image-slot {
    min-height: 360px;
  }

  .footer-navigation ul {
    text-align: left;
  }
}

@supports not (color: color-mix(in srgb, white, black)) {
  .hok-section--warm { background: #ebe5db; }
  .hok-card p,
  .hok-card ul { color: #6f665d; }
}

.hok-mark--center {
  width: 96px;
  margin: 0 auto 36px;
}

.hok-actions--center {
  justify-content: center;
}
