/*
 * Kedem site styles.
 * Reconstructs the original Squarespace (7.1, fluid engine) layout. The page
 * markup keeps the original per-section grid and per-block <style> settings;
 * this file supplies the base rules those settings rely on.
 */

/* ---------- Theme ---------- */
:root {
  --white-hsl: 60, 90%, 95%;
  --black-hsl: 240, 10%, 10%;
  --accent-hsl: 40, 75%, 60%;
  --darkAccent-hsl: 300, 95%, 20%;
  --lightAccent-hsl: 40, 85%, 80%;
  --safeDarkAccent-hsl: 0, 0%, 0%;
  --safeInverseAccent-hsl: 0, 0%, 0%;
  --safeInverseDarkAccent-hsl: 0, 0%, 100%;
  --safeLightAccent-hsl: 40.13, 75.49%, 60%;

  --heading-font: "Cinzel Decorative", serif;
  --body-font: "Ysabeau", sans-serif;
  --button-font: "Noto Sans", sans-serif;
  --script-fonts: "Noto Sans Phoenician", "Noto Sans Imperial Aramaic", "Almarai";

  --maxPageWidth: 2000px;
  --sqs-site-gutter: 4vw;
  --sqs-mobile-site-gutter: 6vw;
  --sqs-site-max-width: 2000px;
  --header-pad: 2vw;
  --header-gutter: 4vw;
  --logo-size: 90px;
  --header-height: calc(var(--header-pad) * 2 + var(--logo-size));
}

/* Default ("white") section theme */
.page-section {
  --siteBackgroundColor: hsla(var(--white-hsl), 1);
  --headingColor: hsla(var(--black-hsl), 1);
  --paragraphColor: hsla(var(--black-hsl), 1);
  --linkColor: hsla(var(--safeDarkAccent-hsl), 1);
  --primaryButtonBackgroundColor: hsla(var(--safeDarkAccent-hsl), 1);
  --primaryButtonTextColor: hsla(var(--safeInverseDarkAccent-hsl), 1);
  --backgroundOverlayColor: hsla(var(--white-hsl), 1);
}
.page-section.bright-inverse {
  --siteBackgroundColor: hsla(var(--safeInverseAccent-hsl), 1);
  --headingColor: hsla(var(--accent-hsl), 1);
  --paragraphColor: hsla(var(--accent-hsl), 1);
  --linkColor: hsla(var(--accent-hsl), 1);
  --primaryButtonBackgroundColor: hsla(var(--accent-hsl), 1);
  --primaryButtonTextColor: hsla(var(--safeInverseAccent-hsl), 1);
  --backgroundOverlayColor: hsla(var(--safeInverseAccent-hsl), 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #000;
  color: hsla(var(--accent-hsl), 1);
  font-family: var(--body-font), var(--script-fonts), sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1.5rem;
  z-index: 1000;
  padding: 1.5rem 2.2rem;
  background: #000;
  color: #fff;
  font-family: "Almarai", sans-serif;
}
.skip-link:focus { left: 1.5rem; }

/* ---------- Typography ----------
 * Sizes follow the original theme's fluid scale: --x is the size value from the
 * theme (h1 = 4, h2 = 2.8, ...). Portrait phones scale off the viewport height.
 */
h1 { --x: 4; }
h2 { --x: 2.8; }
h3 { --x: 2.2; }
h4 { --x: 1.6; }
.sqsrte-large { --x: 1.4; }
.sqsrte-small { --x: 0.9; }

h1, h2, h3, h4, .sqsrte-large, .sqsrte-small, .kd-marquee-item, .newsletter-form-header-title {
  font-size: min(calc((var(--x) - 1) * 1.2vw + 1rem),
                 max(calc((var(--x) - 1) * 0.012 * var(--maxPageWidth) + 1rem), calc(var(--x) * 1rem)));
}
@media screen and (max-width: 767px) and (orientation: portrait) {
  h1, h2, h3, h4, .sqsrte-large, .sqsrte-small, .kd-marquee-item, .newsletter-form-header-title {
    font-size: calc((var(--x) - 1) * 0.012 * min(100vh, 900px) + 1rem);
  }
}

h1, h2, h3, h4 {
  font-family: var(--heading-font), var(--script-fonts), serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: calc(1.2em * (1 + (1 - var(--x)) / 25));
  margin: 2rem 0;
  color: var(--headingColor);
}
p { margin: 1rem 0; line-height: 1.5em; color: var(--paragraphColor); }
.sqsrte-large { margin: 1rem 0; line-height: 1.5em; }
strong { font-weight: 700; }

.sqsrte-text-color--accent { color: hsl(var(--accent-hsl)); }
.sqsrte-text-color--lightAccent { color: hsl(var(--lightAccent-hsl)); }
.sqsrte-text-color--darkAccent { color: hsl(var(--darkAccent-hsl)); }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-pad) var(--header-gutter);
}
.header-logo img { width: var(--logo-size); height: var(--logo-size); }
.header-nav { display: flex; gap: 1.8rem; }
.header-nav a {
  font-family: var(--body-font), sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.1em 0;
  color: hsla(var(--accent-hsl), 1);
}
.header-nav a[aria-current="page"],
.header-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }

.header-burger {
  display: none;
  position: relative;
  z-index: 2;
  width: 47px; height: 37px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: hsla(var(--accent-hsl), 1);
}
.burger-line {
  position: absolute;
  left: 12px; right: 12px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.burger-line:nth-of-type(2) { top: 15px; }
.burger-line:nth-of-type(3) { top: 21px; }
.menu-open .header-burger { color: hsla(var(--black-hsl), 1); }
.menu-open .burger-line:nth-of-type(2) { top: 18px; transform: rotate(45deg); }
.menu-open .burger-line:nth-of-type(3) { top: 18px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(var(--lightAccent-hsl), 1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu[hidden] { display: none; }
.menu-open .mobile-menu { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 0.25em; }
.mobile-menu a {
  font-family: var(--body-font), sans-serif;
  font-size: calc(1.3 * (0.012 * min(100vh, 900px)) + 1.3rem);
  line-height: 1.5;
  color: hsla(var(--black-hsl), 1);
}
.menu-open .header-logo, .menu-open .header-burger { position: relative; z-index: 2; }

@media screen and (max-width: 767px) {
  :root {
    --header-gutter: 6vw;
    --header-pad: 6vw;
    --logo-size: 50px;
  }
  .header-nav { display: none; }
  .header-burger { display: block; }
}

/* ---------- Sections ---------- */
.sections { position: relative; }

.page-section {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  color: var(--paragraphColor);
}
.page-section.section-height--small { min-height: 33vh; }

.page-section > .content-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}
.page-section.section-height--small.vertical-alignment--middle > .content-wrapper {
  padding-top: 3.3vmax;
  padding-bottom: 3.3vmax;
}
.page-section .content { width: 100%; }
/* "Inset" sections indent their content by one more site gutter */
.page-section.background-width--inset > .content-wrapper {
  padding-left: 4vw;
  padding-right: 4vw;
}

/* The header overlays the first section, which reserves room for it */
main .sections > .page-section:first-child { padding-top: var(--header-height); }

.section-border {
  position: absolute;
  top: calc(-1 * var(--previous-section-divider-offset, 0px));
  right: 0; bottom: 0; left: 0;
  background-color: var(--siteBackgroundColor);
}
.has-section-divider .section-border { transform: translateZ(0); }

.section-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-section:not(.has-background) .section-background { background-color: var(--siteBackgroundColor); }
.section-background-content, .section-background-overlay { position: absolute; inset: 0; }
.section-background-overlay { background-color: var(--backgroundOverlayColor); }
.section-background img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Parallax: the image is taller than the section and is shifted by site.js */
.section-background img.kd-parallax {
  position: absolute;
  top: -15%;
  height: 130%;
  will-change: transform;
}

/* Section dividers (zig-zag edges); shapes are sized by site.js */
.section-divider-display {
  position: absolute;
  top: calc(-1 * var(--previous-section-divider-offset, 0px));
  right: 0; bottom: 0; left: 0;
  pointer-events: none;
  z-index: 999;
}
.section-divider-block { position: absolute; bottom: 0; left: 0; width: 100%; visibility: hidden; }
.section-divider-svg-clip { position: absolute; width: 0; height: 0; }
.section-divider-svg-stroke {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.section-divider-stroke {
  fill: transparent;
  stroke: var(--section-divider-stroke-color, transparent);
  stroke-width: var(--stroke-thickness);
  stroke-dasharray: var(--stroke-dasharray);
  stroke-linecap: var(--stroke-linecap);
}

/* ---------- Fluid engine grid ---------- */
.fe-block { position: relative; }
.fluid-engine .sqs-block {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.sqs-block-content { width: 100%; }
.fluid-engine .sqs-block-content { flex: 1 1 auto; }
.sqs-block-html .sqs-html-content > *:first-child { margin-top: 0; }
.sqs-block-html .sqs-html-content > *:last-child { margin-bottom: 0; }
/* Empty paragraphs are deliberate spacers in the original content */
.sqs-html-content p:empty::before { content: "\200b"; }
.sqs-block-html .sqs-html-content ul { margin: 1rem 0; padding-left: 2.5rem; }
.sqs-block-html .sqs-html-content li > p { margin: 0.5rem 0; }
.sqs-block-html a, .newsletter-form-header a, .newsletter-form-footnote a {
  color: var(--linkColor);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Text blocks with a background ("A World At Dawn" panel) */
.sqs-background-enabled.sqs-block-html {
  background-color: var(--tweak-text-block-background-color);
  border-color: var(--tweak-text-block-stroke-color);
}

/* Auto-scaled heading ("The Mediterranean Experience") */
.sqsrte-scaled-text-container .sqsrte-scaled-text { display: block; font-size: inherit !important; }
.sqsrte-scaled-text-container h3 {
  /* Matches the original's fitted size: 30px at 390px wide, 37.9px at 1440px */
  font-size: clamp(26px, calc(27.07px + 0.752vw), 46.7px);
  line-height: 1;
  margin: 0;
  white-space: nowrap !important;
}

/* ---------- Shapes ---------- */
/* Shapes fill their grid cell; they must not size the cell from the SVG's own aspect ratio */
.sqs-shape-block-outer-container { position: relative; width: 100%; height: 100%; }
.sqs-shape-block-container { position: absolute; inset: 0; display: flex; }
.sqs-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sqs-shape > * {
  fill: var(--shape-block-background-color);
  stroke: var(--shape-block-stroke-color);
}

/* ---------- Buttons ---------- */
.sqs-button-element--primary,
.form-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--button-font);
  font-size: 1rem;
  line-height: 1.2em;
  color: var(--primaryButtonTextColor, #000);
  background-color: var(--primaryButtonBackgroundColor, hsla(var(--accent-hsl), 1));
  border: 0;
  border-radius: 0;
  padding: 1.5rem 2.2rem;
  cursor: pointer;
  transition: opacity 0.1s linear;
}
.sqs-button-element--primary:hover, .form-submit-button:hover { opacity: 0.8; }
.sqs-block-button-container { display: flex; justify-content: center; width: 100%; }
.sqs-block-button.sqs-stretched .sqs-block-content,
.sqs-stretched,
.sqs-stretched .sqs-block-button-element { width: 100%; height: 100%; }
.sqs-stretched .sqs-block-button-element { padding-top: 0; padding-bottom: 0; }

/* ---------- Marquee ---------- */
.kd-marquee-block { justify-content: center; }
.kd-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 85%, transparent 100%);
}
.kd-marquee-track { display: flex; width: max-content; will-change: transform; }
.kd-marquee-group { display: flex; flex-shrink: 0; }
.kd-marquee-item {
  --x: 1.5;
  flex-shrink: 0;
  padding-right: 0.5em;
  font-family: var(--heading-font), var(--script-fonts), serif;
  letter-spacing: -0.02em;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--headingColor);
}

/* ---------- Images ---------- */
.sqs-block-image .design-layout-fluid,
.sqs-block-image .fluid-image-animation-wrapper,
.sqs-block-image .fluid-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}
.sqs-block-image .content-fill, .sqs-block-image .content-fit {
  position: absolute;
  inset: 0;
}
.sqs-block-image .content-fill img, .sqs-block-image .content-fit img {
  width: 100%;
  height: 100%;
}
.fluidImageOverlay { display: none; }

/* ---------- Newsletter ---------- */
.newsletter-form-wrapper { width: 100%; }
.newsletter-form { text-align: center; }
.newsletter-form-wrapper--alignLeft .newsletter-form { text-align: left; }
.newsletter-form-header { width: 85%; margin: 0 auto; }
.newsletter-form-wrapper--alignLeft .newsletter-form-header { width: 100%; margin: 0; }
.newsletter-form-header-title {
  --x: 2.2;
  margin: 0 0 1rem;
  padding: 0;
  line-height: 1.2em;
}
.newsletter-form-header-description p { margin: 1rem 0; padding: 0; }
.newsletter-form-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0 0 1rem;
}
.newsletter-form-wrapper--alignLeft .newsletter-form-body { justify-content: flex-start; }
.newsletter-form-wrapper--layoutStack .newsletter-form-body { flex-direction: column; }
.newsletter-form-fields-wrapper { margin: 1rem 0 0; }
.newsletter-form-field-wrapper { min-width: 18rem; padding: 0.5rem 0.25rem; }
.newsletter-form-wrapper--alignLeft .newsletter-form-field-wrapper { padding-left: 0; }
.newsletter-form-field-element {
  width: 100%;
  padding: 1.4rem 2rem;
  font-family: var(--body-font), sans-serif;
  font-size: 1rem;
  line-height: 1.2rem;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
}
.newsletter-form-field-element::placeholder { color: rgba(0, 0, 0, 0.3); }
.newsletter-form-button-wrapper { margin: 1rem 0 0; padding: 0.5rem 0.25rem; }
.newsletter-form-wrapper--layoutStack .newsletter-form-button-wrapper { margin-top: 0; }
.newsletter-form-button {
  padding: 1.4rem 2rem;
  line-height: 1.2rem;
  white-space: nowrap;
}
.newsletter-form-footnote p { margin: 1rem 0 0; font-size: 0.9rem; opacity: 0.8; }
.newsletter-form-footnote p:empty { display: none; }

/* ---------- Contact form ---------- */
.kd-contact-form .field-list { display: flex; flex-direction: column; gap: 1.25rem; }
.kd-contact-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 10px; }
.kd-contact-form legend { padding: 0; margin-bottom: 0.25rem; }
.kd-contact-form .field { flex: 1 1 0; min-width: 0; }
.kd-contact-form .title, .kd-contact-form legend { display: block; font-size: 1rem; line-height: 1.75; }
.kd-contact-form .caption { display: block; font-size: 12px; line-height: 2.25; }
.kd-contact-form .description { opacity: 0.7; margin-left: 0.4em; font-size: 0.85em; }
.kd-contact-form input, .kd-contact-form textarea {
  display: block;
  width: 100%;
  padding: 5px 10px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: hsla(var(--accent-hsl), 1);
  background: hsla(var(--darkAccent-hsl), 0.8);
  border: 0;
  border-bottom: 1px solid hsla(var(--accent-hsl), 0.6);
  border-radius: 0;
}
.kd-contact-form input:focus, .kd-contact-form textarea:focus {
  outline: none;
  border-bottom-color: hsla(var(--accent-hsl), 1);
}
.kd-contact-form textarea { height: 100px; resize: vertical; }
.kd-contact-form .form-button-wrapper { margin-top: 1.25rem; }

.kd-form-status { margin: 1rem 0 0; font-size: 0.95rem; }

/* ---------- Scroll-in animation (site-wide "fade", 1.5s ease) ---------- */
.js .preFade { opacity: 0; transition-property: opacity; transition-timing-function: ease; transition-duration: 1.5s; }
.js .preFade.fadeIn { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .preFade { opacity: 1; transition: none; }
  .kd-marquee-track { transform: none !important; }
  .section-background img.kd-parallax { transform: none !important; }
}

/* Spam trap field for bots; hidden from people and screen readers */
.kd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.kd-newsletter button[disabled], .kd-contact-form button[disabled] { opacity: 0.6; cursor: progress; }
