/* ==========================================================================
   The Designers Hub — Design Tokens & Base Styles
   Source of truth: Figma "Projects" file, canvas "ясер"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700;800&family=Noto+Kufi+Arabic:wght@400;600;700&display=swap');

:root {
  /* Colors */
  --color-bg: #F8F8F8;
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-dark: #2D2D2D;
  --color-gold: #D8A025;
  --color-gold-dark: #C8962A;
  --color-cream: #EDE7DF;
  --color-border: #DDDDDD;

  /* Type */
  --font-display: 'Inter', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Layout */
  --container-max: 1280px;
  --container-pad: 80px;
  --header-height: 92px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Smooth cross-fade between same-site pages instead of a hard reload
   (e.g. the Launch / Growth / Scale hero tabs). Chromium support; other
   browsers simply fall back to a normal instant navigation. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Safety net: nothing may cause sideways scroll on any device. Root
   causes are fixed per-component; this guards against regressions. */
html, body {
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.06;
  color: var(--color-dark);
}

h1 { font-size: clamp(28px, 4vw, 36px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 22px); }

/* Very narrow phones: step headings down so long uppercase words
   (e.g. MASTERCLASSES, COLLABORATIONS) fit without overflowing. */
@media (max-width: 374px) {
  h1 { font-size: 24px; }
  h2 { font-size: 22px; }
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

@media (max-width: 1024px) {
  .container { padding: 0 40px; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
}

.section {
  padding: 96px 0;
}

@media (max-width: 1024px) {
  .section { padding: 64px 0; }
}

@media (max-width: 600px) {
  .section { padding: 48px 0; }
}

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

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 32px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  max-width: 100%;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

/* On narrow phones, long CTA labels wrap instead of forcing the layout
   wider than the screen. */
@media (max-width: 480px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}

.btn--primary {
  background: var(--color-gold);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-gold-dark);
}

.btn--secondary {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}

.btn--secondary:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

.btn--on-dark {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--on-dark:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-dark);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-header__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  margin-inline-end: 40px;
}

.site-header__logo img {
  height: 40px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav a {
  font-size: 13px;
  color: var(--color-white);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] {
  opacity: 1;
  color: var(--color-gold);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-inline-start: 28px;
  flex-shrink: 0;
}

.site-header__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-white);
}

.site-header__lang span {
  opacity: 0.4;
}

.site-header__lang button {
  background: none;
  border: none;
  padding: 2px;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-white);
  opacity: 0.6;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

.site-header__lang button:hover {
  opacity: 0.9;
}

.site-header__lang button.is-active {
  opacity: 1;
  color: var(--color-gold);
  font-weight: 700;
}

.site-header__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 24px;
  padding: 8px;
}

@media (max-width: 1024px) {
  .site-header__nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 40px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
  }

  .site-header__nav.is-open {
    transform: translateX(0);
  }

  .site-header__toggle {
    display: block;
  }

  .site-header__right .btn {
    display: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 56px 0 32px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
}

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

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

.site-footer__logo {
  background: var(--color-black);
  border: 1px solid var(--color-white);
  padding: 16px 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-footer__logo img {
  height: 44px;
}

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer a,
.site-footer p {
  font-size: 12px;
  color: var(--color-white);
}

.site-footer a:hover {
  color: var(--color-gold);
}

.site-footer__book {
  text-decoration: underline;
}

.site-footer__bottom {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid rgba(237, 231, 223, 0.8);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer__bottom p {
  font-size: 11px;
  color: var(--color-cream);
}

/* ==========================================================================
   Cards & shared components
   ========================================================================== */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ==========================================================================
   Chat widget
   ========================================================================== */

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--font-body);
  /* The wrapper spans the (tall) panel's box even when closed; let taps pass
     through it so it never blocks the rest of the page. Only the toggle and
     the open panel receive pointer events. */
  pointer-events: none;
}

.chat-widget__toggle {
  pointer-events: auto;
}

.chat-widget__panel {
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(20, 20, 20, 0.28);
  overflow: hidden;
  transform-origin: bottom right;
  transform: translateY(16px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.chat-widget.is-open .chat-widget__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chat-widget__header {
  background: var(--color-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.chat-widget__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.chat-widget__ident {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex-grow: 1;
}
.chat-widget__ident strong { font-size: 14px; }
.chat-widget__status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-widget__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf6b;
  display: inline-block;
}

.chat-widget__close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 0 4px;
}
.chat-widget__close:hover { opacity: 1; }

/* Messages */
.chat-widget__messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--color-bg);
}

.chat-avatar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8a8a8a;
  margin-bottom: -2px;
}
.chat-avatar-label .chat-widget__avatar {
  width: 24px;
  height: 24px;
  font-size: 9px;
  background: var(--color-dark);
  color: var(--color-white);
}

.chat-msg {
  max-width: 82%;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 14px;
  word-wrap: break-word;
}
.chat-msg--bot {
  align-self: flex-start;
  background: #ececec;
  color: var(--color-dark);
  border-top-left-radius: 4px;
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--color-gold);
  color: var(--color-dark);
  border-top-right-radius: 4px;
  font-weight: 500;
}
.chat-msg a { color: var(--color-gold-dark); text-decoration: underline; font-weight: 600; }
.chat-msg--user a { color: var(--color-dark); }

.chat-msg--typing { display: flex; gap: 4px; align-self: flex-start; }
.chat-msg--typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #b0b0b0;
  animation: chat-blink 1s infinite both;
}
.chat-msg--typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-blink { 0%,80%,100% { opacity: 0.3; } 40% { opacity: 1; } }

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.chat-quick button {
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-dark);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.chat-quick button:hover { border-color: var(--color-gold); }
.chat-quick button.is-gold {
  background: var(--color-gold);
  border-color: var(--color-gold);
  font-weight: 600;
}

/* Footer: actions + input */
.chat-widget__foot {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  flex-shrink: 0;
}
.chat-widget__actions {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
}
.chat-widget__actions button {
  flex: 1;
  font-size: 11px;
  padding: 7px 4px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-dark);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.chat-widget__actions button:hover { border-color: var(--color-gold); }
.chat-widget__actions button.is-gold {
  background: var(--color-gold);
  border-color: var(--color-gold);
  font-weight: 600;
}

.chat-widget__inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
}
.chat-widget__inputbar input {
  flex-grow: 1;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.chat-widget__inputbar input:focus { border-color: var(--color-gold); }

.chat-widget__send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.chat-widget__send:hover { background: var(--color-gold-dark); }
.chat-widget__send svg { width: 17px; height: 17px; color: var(--color-dark); }

/* Toggle button (closed state) */
.chat-widget__toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--color-gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(216, 160, 37, 0.4);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.chat-widget__toggle:hover {
  background: var(--color-gold-dark);
  transform: translateY(-2px) scale(1.04);
}
.chat-widget.is-open .chat-widget__toggle { transform: scale(0.85); opacity: 0.9; }
.chat-widget__toggle-monogram {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--color-dark);
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .chat-widget { right: 12px; bottom: 12px; }
  .chat-widget__panel { width: calc(100vw - 24px); height: calc(100vh - 96px); }
}

/* ==========================================================================
   Reveal-on-scroll utility
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RTL / Arabic support
   ========================================================================== */

html[lang="ar"] body {
  font-family: 'Noto Kufi Arabic', var(--font-body);
}

html[dir="rtl"] .site-header__nav {
  text-align: right;
}

html[dir="rtl"] .problem__item,
html[dir="rtl"] .experience__list li,
html[dir="rtl"] .m-who__item,
html[dir="rtl"] .m-network__grid span,
html[dir="rtl"] .quote-bubble,
html[dir="rtl"] .eh-problem__item,
html[dir="rtl"] .eh-gains__item {
  text-align: right;
}

html[dir="rtl"] .site-footer,
html[dir="rtl"] .legal-body,
html[dir="rtl"] .pricing-card__details,
html[dir="rtl"] .ty-details__list {
  text-align: right;
}

html[dir="rtl"] .ty-details__list dd {
  text-align: left;
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */

.cookie-consent {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1200;
  width: min(420px, calc(100vw - 48px));
  background: var(--color-dark);
  color: var(--color-bg);
  border-top: 3px solid var(--color-gold);
  padding: 24px 26px 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  transform: translateY(160%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}

.cookie-consent.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}

.cookie-consent__text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-bg);
  margin-bottom: 8px;
}

.cookie-consent__text p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.45;
  color: rgba(248, 248, 248, 0.8);
  margin: 0 0 10px;
}

.cookie-consent__link {
  display: inline-block;
  font-size: 13px;
  color: var(--color-gold);
  text-decoration: underline;
  margin-bottom: 20px;
}

.cookie-consent__actions {
  display: flex;
  gap: 12px;
}

.cookie-consent__btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cookie-consent__btn--gold {
  background: var(--color-gold);
  color: var(--color-dark);
}

.cookie-consent__btn--gold:hover {
  background: var(--color-gold-dark);
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: var(--color-bg);
  border-color: rgba(248, 248, 248, 0.4);
}

.cookie-consent__btn--ghost:hover {
  background: rgba(248, 248, 248, 0.1);
}

html[dir="rtl"] .cookie-consent {
  left: auto;
  right: 24px;
  text-align: right;
}

@media (max-width: 560px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 20px;
  }
  .cookie-consent__actions {
    flex-direction: column-reverse;
  }
  .cookie-consent__btn {
    width: 100%;
  }
}
