/* Typography and colour follow the current cognispine.com: Poppins, light
   body text in the site's plum (#49214B), a plum footer band. */

/* Poppins and Heebo, served from here rather than from Google, so a visit
   tells nobody else about it. */

/* hebrew */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/heebo-300-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/heebo-300-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;
}
/* latin */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/heebo-300-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;
}
/* hebrew */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/heebo-400-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/heebo-400-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;
}
/* latin */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/heebo-400-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;
}
/* hebrew */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/heebo-500-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/heebo-500-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;
}
/* latin */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/heebo-500-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;
}
/* hebrew */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/heebo-600-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/heebo-600-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;
}
/* latin */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/heebo-600-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;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/poppins-300-italic-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;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/poppins-300-italic-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;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/poppins-300-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;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(fonts/poppins-300-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;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/poppins-400-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;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/poppins-400-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;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/poppins-500-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;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/poppins-500-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;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/poppins-600-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;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/poppins-600-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;
}

:root {
  --ink: #49214b;
  --ink-soft: #6d4f6f;
  --band: #6d4c6e;
  --rose: #c04b5e;
  --line: #e7dce7;
  --tile: #f7f2f7;
  --tile-hover: #efe4ef;
  --tile-border: #e4d6e4;
  --field-border: #9c849d;
  --paper: #ffffff;
  --focus: #3f8a96;
  --measure: 46rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  /* Poppins has no Hebrew; Heebo takes those glyphs and sits well beside it. */
  font-family: Poppins, Heebo, system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.55;
}

main { flex: 1; width: 100%; }

/* Heebo reads smaller than Poppins at the same size. */
html[lang="he"] body { font-size: clamp(1.15rem, 1.02rem + 0.5vw, 1.36rem); }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--rose); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 500; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* Header */

header.site, .menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.logo { display: block; min-width: 0; }
.logo img { width: clamp(8.5rem, 20vw, 11rem); }

header.site nav, .menu-bar nav { display: flex; align-items: center; gap: clamp(0.25rem, 2vw, 1.25rem); }

.contact, .menu-open, .menu-close {
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0.6rem 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.contact:hover, .menu-open:hover, .menu-close:hover { color: var(--rose); }

/* Choice Board: six identical tiles, fixed 3 × 2 at every width. */

.board {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.6vw, 1.25rem);
  width: 100%;
  max-width: 60rem;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: clamp(5.5rem, 10vw, 8.5rem);
  padding: 0.75rem 0.25rem;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: 10px;
  color: var(--ink);
  font-size: clamp(0.8rem, 0.45rem + 1.9vw, 1.65rem);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
}
.tile:hover { background: var(--tile-hover); color: var(--ink); }
.tile:focus-visible { outline-offset: 4px; }

/* On narrow screens multi-word labels stack a word per line
   (User / Manual, Living / Over / Time). */
@media (max-width: 40rem) {
  .tile .w { display: block; }
}

/* Homepage */

body.home main { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
body.home main > nav { padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 0; }

/* The plum band and its dandelion, as on the interior pages, with the photo
   resting on its lower edge. */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: #fff;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -3rem -20% auto;
  width: min(48rem, 95%);
  background: url(/assets/dandelion.webp) no-repeat right center / cover;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -25% -4rem;
  width: min(30rem, 60%);
  height: 90%;
  background: url(/assets/dandelion.webp) no-repeat left bottom / cover;
  opacity: 0.1;
  transform: scaleX(-1);
  -webkit-mask-image: linear-gradient(270deg, transparent, #000 50%);
  mask-image: linear-gradient(270deg, transparent, #000 50%);
}
[dir="rtl"] .hero::before { inset: -20% auto -20% -3rem; transform: scaleX(-1); }
[dir="rtl"] .hero::after { inset: auto -4rem -25% auto; transform: none; }
.hero .orientation { position: relative; z-index: 1; }

.hero-drawing {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
}
.hero-drawing img { width: 100%; height: auto; }

.orientation { text-align: center; max-width: 42rem; margin: 0 auto; }
.orientation p { margin: 0; }
.orientation .lead {
  font-size: clamp(1.3rem, 0.9rem + 1.6vw, 2rem);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.4em;
}

/* Menu: the same board, over the page. */

.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.menu[open] { display: flex; flex-direction: column; }
.menu:focus { outline: none; }
.menu::backdrop { background: var(--paper); }
.menu-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter);
}
html:has(.menu[open]) { overflow: hidden; }

/* Interior pages */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
}
/* The gutter lives inside the measure, so text keeps its width. */
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.page-head {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: #fff;
}
.page-head::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  right: -3rem;
  width: min(44rem, 90%);
  background: url(/assets/dandelion.webp) no-repeat right center / cover;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
/* In Hebrew the title sits on the right, so the dandelion moves left. */
[dir="rtl"] .page-head::before { right: auto; left: -3rem; transform: scaleX(-1); }

/* Language switch: only while editing, until the Hebrew has been reviewed. */
html:not(.editing) .lang { display: none; }
.lang {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.6rem 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.lang:hover { color: var(--rose); }
.page-head-in {
  position: relative;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter);
}
.page-head h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.75rem);
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
}

.prose h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.75rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.8em;
}
.prose h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
}
.prose h3 {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
}
.prose hr + h2, .prose h1 + h2, .prose > h2:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 0.9em; }
.prose ul { margin: 0 0 0.9em; padding-inline-start: 1.3em; }
.prose li { margin-bottom: 0.3em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.photo { margin: 2em 0; }
.photo img { width: 100%; border-radius: 6px; }

.intro { margin-bottom: 2.5em; }
.coda { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--line); }

.living section + section { margin-top: 3.5em; }
.living p { margin-bottom: 0.7em; }

.manual-links { margin-bottom: 0.4em; }

.placeholder { color: var(--ink-soft); font-style: italic; }

/* Contact */

.contact-form { display: grid; gap: 0.35rem; margin: 0 0 2rem; }
.contact-form label { font-weight: 400; margin-top: 0.9rem; }
.contact-form input, .contact-form textarea {
  font: inherit;
  font-weight: 300;
  color: var(--ink);
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 12rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.contact-form button {
  justify-self: start;
  margin-top: 1.4rem;
  font: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 2.2rem;
  min-height: 48px;
  cursor: pointer;
}
.contact-form button:hover { background: #5d2c60; }
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-error { color: #a3243a; margin: 0.8rem 0 0; }
.sent { font-size: 1.15em; margin: 0 0 2rem; }
.sent:focus { outline: none; }
.direct { margin-bottom: 0.2em; }

/* Footer */

footer.site {
  background: var(--ink);
  color: #fff;
  padding: 2rem var(--gutter);
  font-size: 0.95rem;
  text-align: center;
}
footer.site a { color: #fff; }
footer.site a:hover { color: #f3c9d0; }
.legal {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2rem;
}
.legal a { display: inline-block; padding: 0.4rem 0; }
.company { margin: 0; opacity: 0.85; font-size: 0.875rem; }

/* The current site fades content up into view as it scrolls in. The tiles
   never move. */

.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 1.25s ease, transform 1.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  header.site, footer.site, .menu, .skip, .contact-form { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  body { font-size: 11pt; }
  .prose { padding: 0; max-width: none; }
  a { text-decoration: none; }
}
