/*
Theme Name: TELOS House
Theme URI: https://telosmagic.com/
Author: Sharon Dekel and Omer Layani
Description: Independent editorial WooCommerce theme for TELOS.
Version: 0.2.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: telos-house
*/

:root {
  --telos-ink: #171613;
  --telos-ink-soft: #24221e;
  --telos-paper: #f3eee4;
  --telos-paper-deep: #e8e0d3;
  --telos-bronze: #80633d;
  --telos-bronze-light: #bba474;
  --telos-muted: #666057;
  --telos-line: #cbc4b9;
  --telos-white: #f8f4ec;
  --telos-danger: #9b2c2c;
  --telos-focus: #80633d; /* 4.8:1 on paper, 3.3:1 on ink (QA council 28.10.2026, A4) */
  --telos-font-display: Baskerville, "Baskerville Old Face", "Iowan Old Style", Georgia, serif;
  --telos-font-ui: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --telos-container: 1280px;
  --telos-gutter: clamp(20px, 5vw, 72px);
  --telos-header-h: 84px;
  --telos-transition-fast: 180ms ease;
  --telos-transition-medium: 300ms ease;
  --telos-layer-header: 40;
  --telos-layer-overlay: 100;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

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

body.menu-open,
body.search-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--telos-focus);
  outline-offset: 3px;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  background: var(--telos-paper);
  color: var(--telos-ink);
  font-family: var(--telos-font-ui);
  font-size: 14px;
}

.telos-container {
  width: min(100% - (2 * var(--telos-gutter)), var(--telos-container));
  margin-inline: auto;
}

.telos-eyebrow,
.telos-ui,
.menu-item a,
.site-footer,
.button,
button,
input,
select,
textarea {
  font-family: var(--telos-font-ui);
}

.telos-eyebrow {
  margin: 0 0 22px;
  color: var(--telos-bronze);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.site-header {
  position: relative;
  z-index: var(--telos-layer-header);
  min-height: var(--telos-header-h);
  border-bottom: 1px solid color-mix(in srgb, var(--telos-line) 52%, transparent);
  background: var(--telos-paper);
}

.home .site-header {
  position: absolute;
  inset: 0 0 auto;
  border-color: rgb(255 255 255 / 18%);
  background: transparent;
  color: var(--telos-white);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--telos-header-h);
  padding-inline: var(--telos-gutter);
  gap: 28px;
}

.site-branding {
  width: clamp(128px, 13vw, 190px);
}

.site-branding img {
  width: 100%;
}

.site-branding__light {
  display: none;
}

.home .site-branding__dark {
  display: none;
}

.home .site-branding__light {
  display: block;
}

.primary-navigation ul,
.header-actions,
.footer-navigation ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation ul {
  justify-content: center;
  gap: clamp(22px, 3vw, 44px);
}

.primary-navigation a,
.header-action,
.menu-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: currentColor;
  font-family: var(--telos-font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-navigation a::after,
.header-action::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--telos-transition-fast);
}

.primary-navigation a:hover::after,
.primary-navigation .current-menu-item a::after,
.header-action:hover::after {
  transform: scaleX(1);
}

.header-actions {
  justify-content: flex-end;
  gap: 20px;
}

.menu-toggle {
  display: none;
}

.telos-hero {
  position: relative;
  min-height: 900px;
  min-height: 100svh;
  overflow: hidden;
  background: var(--telos-ink);
  color: var(--telos-white);
}

.telos-hero__media,
.telos-hero__slide,
.telos-hero__shade {
  position: absolute;
  inset: 0;
}

.telos-hero__slide {
  opacity: 0;
  transition: opacity var(--telos-transition-medium);
}

.telos-hero__slide.is-active {
  opacity: 1;
}

.telos-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.telos-hero__slide--fallback {
  background:
    radial-gradient(circle at 72% 42%, rgb(187 164 116 / 24%), transparent 17%),
    linear-gradient(110deg, #080807 0%, #181713 50%, #252119 100%);
}

.telos-hero__shade {
  background: linear-gradient(90deg, rgb(9 9 9 / 84%) 0%, rgb(9 9 9 / 45%) 48%, rgb(9 9 9 / 8%) 100%);
}

.telos-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 900px;
  min-height: 100svh;
  align-items: center;
  padding: calc(var(--telos-header-h) + 72px) var(--telos-gutter) 96px;
}

.telos-hero__copy {
  width: min(620px, 52vw);
  transform: translateY(-4vh);
}

.telos-hero .telos-eyebrow {
  color: #d0b77e;
}

.telos-hero h1 {
  max-width: 590px;
  margin: 0 0 30px;
  font-size: clamp(54px, 6.1vw, 88px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.telos-hero__intro {
  max-width: 590px;
  margin: 0 0 42px;
  color: #d5cfc5;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.55;
}

.telos-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 30px;
}

.telos-button,
.button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: 1px solid var(--telos-ink);
  border-radius: 0;
  background: var(--telos-ink);
  color: var(--telos-white);
  font-family: var(--telos-font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--telos-transition-fast), color var(--telos-transition-fast), border-color var(--telos-transition-fast);
}

.telos-button:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: transparent;
  color: var(--telos-ink);
}

.telos-hero .telos-button {
  border-color: var(--telos-paper);
  background: var(--telos-paper);
  color: var(--telos-ink);
}

.telos-hero .telos-button:hover {
  background: transparent;
  color: var(--telos-paper);
}

.telos-text-link {
  min-height: 44px;
  font-family: var(--telos-font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.telos-hero__controls {
  position: absolute;
  z-index: 3;
  right: var(--telos-gutter);
  bottom: 38px;
  display: flex;
  gap: 8px;
}

.telos-hero__control {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 42%);
  background: transparent;
  color: var(--telos-white);
  place-items: center;
  cursor: pointer;
}

.telos-hero__control[aria-current="true"] {
  background: var(--telos-paper);
  color: var(--telos-ink);
}

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

.telos-section--dark {
  background: var(--telos-ink);
  color: var(--telos-white);
}

.telos-section__heading {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.telos-archive-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 72px;
  align-items: end;
}

.telos-archive-intro__body {
  margin: 0;
  color: var(--telos-muted);
  font-size: 20px;
}

.telos-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 72px;
  border-top: 1px solid #45413c;
}

.telos-principle {
  min-height: 190px;
  padding: 34px 30px 30px 0;
  border-right: 1px solid #45413c;
}

.telos-principle:last-child {
  border-right: 0;
}

.telos-principle__number {
  color: var(--telos-bronze-light);
  font-family: var(--telos-font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.telos-principle h3 {
  margin: 28px 0 0;
  font-size: 29px;
  font-weight: 400;
}

.site-main--standard {
  min-height: 60vh;
  padding: clamp(64px, 8vw, 120px) 0;
}

.entry-header,
.entry-content {
  width: min(100%, 760px);
}

.entry-title {
  margin: 0 0 40px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 400;
  line-height: 1;
}

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

/* Care and Accessibility (TM-008): section heads in the page body. */
.entry-content h2 {
  margin-top: 2.2em;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 400;
  line-height: 1.2;
}

.entry-content h2 + * {
  margin-top: 0.8em;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.2em;
}

.entry-content li + li {
  margin-top: 0.5em;
}

/* The Hebrew version of a page, under the English one. */
.telos-page-he {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--telos-line);
}

.telos-page-he > * + * {
  margin-top: 1.4em;
}

.telos-page-he ul,
.telos-page-he ol {
  padding-left: 0;
  padding-right: 1.2em;
}

.site-footer {
  padding: 72px 0 32px;
  background: var(--telos-ink);
  color: var(--telos-white);
  font-family: var(--telos-font-ui);
  font-size: 15px;
}

.site-footer__wordmark {
  display: block;
  width: 200px;
  height: auto;
}

.site-footer__statement {
  max-width: 620px;
  margin: 28px 0 56px;
  color: #d9d3c9;
  font-family: var(--telos-font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px 64px;
}

.site-footer__label {
  margin: 0 0 18px;
  color: var(--telos-bronze-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

/* 44px touch target (MASTER.md). */
.site-footer a {
  display: inline-block;
  min-height: 44px;
  padding: 11px 0;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration-color: currentColor;
}

.site-footer__intro {
  margin: 0 0 16px;
  color: #d9d3c9;
  font-family: var(--telos-font-display);
  font-size: 18px;
  line-height: 1.5;
}

.site-footer__form {
  display: flex;
  align-items: stretch;
  max-width: 460px;
  border-bottom: 1px solid #8f887d;
}

.site-footer__form input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--telos-white);
  font-size: 16px;
}

.site-footer__form input[type="email"]::placeholder {
  color: #8f887d;
}

.site-footer__form input[type="email"]:focus {
  outline: none;
}

.site-footer__form:focus-within {
  border-bottom-color: var(--telos-white);
  /* A 1px colour change alone is too faint a focus mark (accessibility test 07.10.2026). */
  box-shadow: 0 3px 0 var(--telos-focus, #b68a50);
}

.site-footer__form button {
  min-height: 48px;
  padding: 0 0 0 16px;
  border: 0;
  background: transparent;
  color: var(--telos-white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-footer__note {
  margin: 14px 0 0;
  color: #9f9990;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__consent {
  max-width: 460px;
  margin: 10px 0 0;
  color: #9f9990;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer__consent a {
  min-height: 0;
  padding: 0;
  text-decoration-color: currentColor;
}

.site-footer__note--joined,
.site-footer__note--exists {
  color: var(--telos-bronze-light);
}

.site-footer__note--invalid {
  color: #e7a7a7;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid #45413c;
  color: #9f9990;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__base ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.site-footer__base li + li {
  margin-top: 0;
}

@media (max-width: 1023px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__letters {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding-top: 56px;
  }

  .site-footer__wordmark {
    width: 160px;
  }

  .site-footer__statement {
    margin-bottom: 40px;
  }

  .site-footer__grid {
    gap: 40px 24px;
  }
}

.mobile-panel,
.search-panel {
  position: fixed;
  z-index: var(--telos-layer-overlay);
  inset: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  background: var(--telos-ink);
  color: var(--telos-white);
  transform: translateY(-8px);
  /* Opens down from the header that holds its button and closes back up the
     same way (apple-design: spatial consistency, 08.11.2026). Hidden panels
     stay out of reach: visibility drops only after the fade. */
  transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 0s linear 200ms;
}

.mobile-panel[aria-hidden="false"],
.search-panel[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 0s;
}

.mobile-panel__inner,
.search-panel__inner {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
  padding: 24px 0 64px;
}

.panel-close {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  float: right;
  border: 1px solid rgb(255 255 255 / 38%);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.mobile-panel nav {
  clear: both;
  padding-top: 15vh;
}

.mobile-panel nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-panel nav a {
  display: flex;
  min-height: 62px;
  /* The global link colour from theme.json loads after this file on the home page and painted the links dark on the dark panel (24.10.2026). */
  color: var(--telos-white);
  align-items: center;
  border-bottom: 1px solid #45413c;
  font-size: 28px;
  text-decoration: none;
}

.search-panel__inner {
  padding-top: 15vh;
}

.search-panel form {
  clear: both;
  padding-top: 10vh;
}

.search-panel label {
  display: block;
  margin-bottom: 14px;
  color: var(--telos-bronze-light);
  font-family: var(--telos-font-ui);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.search-panel input[type="search"] {
  width: 100%;
  min-height: 72px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #8d877e;
  background: transparent;
  color: var(--telos-white);
  font-family: var(--telos-font-display);
  font-size: clamp(30px, 6vw, 60px);
}

.search-panel input[type="submit"] {
  margin-top: 30px;
  border-color: var(--telos-paper);
  background: var(--telos-paper);
  color: var(--telos-ink);
}

@media (max-width: 920px) {
  :root {
    --telos-header-h: 68px;
  }

  /* Equal side columns keep the wordmark in the middle, whatever the width of
     Menu and Bag. */
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-inline: 20px;
  }

  .primary-navigation,
  .header-action--search {
    display: none;
  }

  /* On a phone the menu was easy to miss (Sharon, 27.11.2026): three lines
     beside the word, and the word a size larger than Bag. The button may
     reach into the column gap, never as far as the wordmark (see the 374px
     and 349px steps below). */
  .menu-toggle {
    display: inline-flex;
    justify-self: start;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
  }

  .menu-toggle__icon {
    flex: none;
  }

  .site-branding {
    width: 126px;
  }

  .header-actions {
    gap: 0;
  }

  .telos-hero {
    min-height: 720px;
    min-height: 100svh;
  }

  .telos-hero__shade {
    background: linear-gradient(180deg, rgb(9 9 9 / 42%) 0%, rgb(9 9 9 / 10%) 42%, rgb(9 9 9 / 48%) 72%, rgb(9 9 9 / 88%) 100%);
  }

  .telos-hero__content {
    min-height: 720px;
    min-height: 100svh;
    align-items: flex-end;
    padding: 110px 20px 108px;
  }

  .telos-hero__copy {
    width: min(100%, 560px);
    transform: none;
  }

  .telos-hero h1 {
    margin-bottom: 22px;
    font-size: clamp(46px, 15vw, 68px);
  }

  .telos-hero__intro {
    margin-bottom: 30px;
    font-size: 18px;
  }

  .telos-hero__controls {
    right: 20px;
    bottom: 28px;
  }

  .telos-archive-intro {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .telos-principles {
    grid-template-columns: 1fr;
  }

  .telos-principle {
    min-height: 0;
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid #45413c;
  }

}

/* Narrow phones: the word steps back to its old size below 375px, so it still
   clears the centred wordmark. Below 350px it no longer fits at all: the
   three lines stay, and the word is kept for screen readers. */
@media (max-width: 374px) {
  .menu-toggle {
    font-size: 12px;
  }
}

@media (max-width: 349px) {
  .menu-toggle {
    min-width: 44px;
  }

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

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }

  .telos-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .telos-button {
    width: 100%;
  }
}

/* Catalogue and search: next page loaded in place (assets/js/catalogue-infinite.js).
   The line has a fixed height whether it is empty, loading, finished or
   showing the button, so nothing below it moves. */
.telos-infinite {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin: 0 0 48px;
}

.telos-infinite__line {
  margin: 0;
  color: var(--telos-muted);
  font-family: var(--telos-font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--telos-transition-medium);
}

.telos-infinite.is-loading .telos-infinite__line,
.telos-infinite.is-done .telos-infinite__line {
  opacity: 1;
}

/* !important: commerce.css styles .woocommerce button.button with a higher
   specificity and its own display, which would show the hidden button. */
.telos-infinite__more[hidden],
.telos-infinite.is-failed .telos-infinite__line {
  display: none !important;
}

.telos-infinite-new {
  animation: telos-infinite-in var(--telos-transition-medium) both;
}

@keyframes telos-infinite-in {
  from {
    opacity: 0;
  }
}

.telos-infinite-earlier {
  margin: 0 0 24px;
  font-family: var(--telos-font-ui);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.telos-infinite-earlier a {
  display: inline-block;
  min-height: 44px;
  padding-top: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Feedback on the press itself, not on release, and no double-tap wait before
   it (apple-design: response, 08.11.2026). */
.telos-button,
.button,
button,
input[type="submit"],
.telos-choice,
.menu-toggle,
.header-action {
  touch-action: manipulation;
}

.telos-button:active,
.button:active,
button:active,
input[type="submit"]:active,
.telos-choice:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .telos-infinite-new {
    animation: none;
  }

  .telos-infinite__line {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Touch targets of at least 44px (accessibility review 27.10.2026). */
.site-branding a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
.site-footer .menu a {
  display: inline-block;
  padding-block: 12px;
}

/* A single post (single.php, 27.10.2026): a readable measure, like a page. */
.telos-essay {
  max-width: 42rem;
  margin-inline: auto;
}
.telos-essay__image {
  margin: 24px 0 32px;
}
.telos-essay__image img {
  width: 100%;
  height: auto;
}
.telos-essay__end {
  margin-top: 48px;
}
