/* Tuwele Sections — fitting the redesign into Uncode's page structure. */

/* The Tuwele header replaces Uncode's menu bar, body borders and scroll-to-top button */
body.tw.tw-own-header .menu-wrapper,
body.tw.tw-own-header #masthead,
body.tw.tw-own-header .body-borders,
body.tw.tw-own-header .footer-scroll-top,
body.tw.tw-own-header .overlay.overlay-sequential,
body.tw.tw-own-header .mobile-menu-button { display: none !important; }
body.tw.tw-own-header { padding-top: 0 !important; }

/* Uncode's wrappers stay out of the way: the page colour shows through and nothing clips sticky cards */
body.tw .box-wrapper, body.tw .box-container, body.tw .main-wrapper, body.tw .main-container,
body.tw .page-body, body.tw .post-wrapper, body.tw .post-body, body.tw .post-content,
body.tw #page-header, body.tw .site-footer, body.tw .site-footer .row-container { background: transparent !important; }
/* Uncode's script widens the page by a scrollbar's width, which pushes everything a few pixels off centre */
body.tw .box-container { width: auto !important; margin-left: 0 !important; }
body.tw .box-wrapper, body.tw .box-container, body.tw .main-wrapper, body.tw .main-container,
body.tw .page-wrapper, body.tw .sections-container, body.tw .page-body, body.tw .post-wrapper, body.tw .post-body { overflow: visible; }
/* Uncode makes .page-wrapper a table row, and table rows ignore margins. The footer curtain reserves
   the footer's height as a bottom margin on .page-wrapper, so it must be a block or the page never
   scrolls far enough to uncover the footer. */
body.tw .page-wrapper { display: flow-root; }

/* WPBakery rows that hold Tuwele sections: full width, no padding or gutters (the sections bring their own) */
body.tw .page-wrapper .row-container > .row,
body.tw .site-footer .row-container > .row { padding: 0 !important; max-width: none !important; }
body.tw .page-wrapper .row-container .row-inner,
body.tw .site-footer .row-container .row-inner { margin: 0 !important; }
body.tw .page-wrapper .row-container .wpb_column,
body.tw .site-footer .row-container .wpb_column { padding: 0 !important; }
body.tw .page-wrapper .uncell,
body.tw .site-footer .uncell { padding: 0 !important; }
/* Uncode puts 36px between the elements in a column; Tuwele sections bring their own spacing.
   Weight (1,1,1): above Uncode's gutter rules, below the design's own section rules (e.g. .about-nairobi). */
body.tw:not(#tw) :where(.row-container .row-parent .uncont) > * { margin-top: 0; position: revert; }

/* Uncode's base type (17px paragraphs at 1.75 line height, purple headings and links, uppercase buttons with a border)
   would show wherever the design leans on the browser's own defaults. Send those properties back to the defaults.
   Weight (1,1,1): above every Uncode rule, below every design rule (body.tw:not(#tw) ..., from build-css.py). */
body.tw:not(#tw) :where(.page-wrapper, .site-footer, .header, .menu) :where(p, li, ul, ol, dl, dt, dd, address, label, small, pre, code, figcaption, figure, blockquote, h1, h2, h3, h4, h5, h6, a, span, b, strong, em, i, time, button, input, select, textarea, option, optgroup, img, iframe, video) {
  font-size: revert; line-height: revert; letter-spacing: revert; font-weight: revert; font-family: revert;
  text-transform: revert; text-align: revert; font-style: revert; color: revert; margin: revert; padding: revert;
  border: revert; border-radius: revert; box-shadow: revert; background: revert; height: revert; max-width: revert; width: revert; display: revert; position: revert;
}

/* Uncode sets 17px type on body; the design uses the browser's 16px */
body.tw:not(#tw) { font-size: revert; line-height: revert; letter-spacing: revert; font-weight: revert; }


/* The footer Content Block: no Uncode copyright bar under the Tuwele footer */
body.tw .site-footer .footer-last { display: none; }

/* Pages that end on the white sheet (Work, Insights, Contact): the page itself is the sheet */
body.tw.tw-sheet .page-wrapper {
  padding-bottom: 200px; background: var(--background) !important;
  border-radius: 0 0 80px 80px; box-shadow: 0 40px 80px rgba(0, 0, 0, .45);
}
@media (max-width: 760px) { body.tw.tw-sheet .page-wrapper { padding-bottom: 120px; border-radius: 0 0 32px 32px; } }

/* A footer that stays in the normal flow (Curtain unticked on the Footer element) */
body.tw.curtain .footer-shell.no-curtain { position: static !important; }

/* The WPBakery front-end editor: show sections that wait for a scroll reveal */
body.tw.vc_editor .reveal, body.tw.vc_editor .reveal-lines .line > span, body.tw.vc_editor .logo-marquee { opacity: 1 !important; transform: none !important; }
body.tw.compose-mode .reveal { opacity: 1 !important; transform: none !important; }

/* Long text in a "Label + text" section (e.g. the privacy policy): links and lists as in an article */
body.tw:not(#tw) .about-block .about-copy :is(p, li) a {
  color: var(--primary); text-decoration: underline; text-decoration-color: rgba(106, 13, 173, .35);
  text-underline-offset: 4px; transition: text-decoration-color .3s var(--ease-out);
}
body.tw:not(#tw) .about-block .about-copy :is(p, li) a:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
body.tw:not(#tw) .about-block .about-copy ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
body.tw:not(#tw) .about-block .about-copy li { position: relative; padding-left: 28px; }
body.tw:not(#tw) .about-block .about-copy li::before {
  content: ""; position: absolute; left: 0; top: .71em; width: 14px; height: 5px; background: var(--accent);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
body.tw:not(#tw) .about-block .about-copy strong { font-weight: 600; }

/* Articles: Uncode's post footer would repeat the share buttons and comments after the closing call to action.
   The Article element shows both itself, so the post footer is hidden. */
body.tw.single-post .post-footer { display: none !important; }

/* Comments under an article (Uncode's comments.php), styled like the Start a project form */
body.tw:not(#tw) .ar-comments { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--border); }
body.tw:not(#tw) .ar-comments #comments :is(.comments-title, .comment-reply-title) {
  margin: 0; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; font-weight: 500; letter-spacing: -.01em; text-transform: none; color: var(--primary);
}
body.tw:not(#tw) .ar-comments #comments .comment-reply-title small { display: block; margin-top: 8px; font-size: 15px; font-weight: 400; letter-spacing: 0; }
body.tw:not(#tw) .ar-comments #comments .comment-reply-title small a { color: var(--foreground-secondary); text-decoration: underline; text-underline-offset: 4px; }
body.tw:not(#tw) .ar-comments #comments .comment-list { margin: 32px 0 64px; }
body.tw:not(#tw) .ar-comments #comments :is(.comment-list ul, .comment-list ol) { margin: 0; padding: 0; list-style: none; }
body.tw:not(#tw) .ar-comments #comments .comment-list li { margin: 0; padding: 24px 0 0; list-style: none; }
body.tw:not(#tw) .ar-comments #comments .comment-list :is(ul, ol).children { padding-left: clamp(20px, 4vw, 48px); }
body.tw:not(#tw) .ar-comments #comments .comment-list :is(article, .comment-body, .comment-content) { display: block; }
body.tw:not(#tw) .ar-comments #comments .comment-list li > :is(article, .comment-body, .comment-content) {
  padding: 24px; border-radius: var(--radius-lg); background: var(--background-subtle);
}
body.tw:not(#tw) .ar-comments #comments .comment-list :is(.avatar, .gravatar img) { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
body.tw:not(#tw) .ar-comments #comments .comment-list :is(.comment-author, .fn, .comment-author a) { font-size: 16px; font-weight: 600; font-style: normal; color: var(--foreground); }
body.tw:not(#tw) .ar-comments #comments .comment-list :is(.comment-metadata, .comment-meta, time, .comment-metadata a) { font-size: 14px; color: var(--foreground-secondary); }
body.tw:not(#tw) .ar-comments #comments .comment-list p { margin: 12px 0 0; font-size: 17px; line-height: 1.65; color: var(--foreground); }
body.tw:not(#tw) .ar-comments #comments .comment-list .comment-awaiting-moderation { display: block; margin-top: 8px; font-size: 14px; color: var(--foreground-secondary); }
body.tw:not(#tw) .ar-comments #comments .comment-list :is(.reply a, .comment-reply-link, .comment-edit-link) {
  display: inline-flex; align-items: center; height: 32px; margin-top: 12px; padding: 0 14px; border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; color: var(--primary); transition: background-color .3s, color .3s, box-shadow .3s;
}
body.tw:not(#tw) .ar-comments #comments .comment-list :is(.reply a, .comment-reply-link, .comment-edit-link):is(:hover, :focus-visible) { background: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--white); }
body.tw:not(#tw) .ar-comments #comments .comment-navigation ul { display: flex; justify-content: space-between; margin: 0 0 32px; padding: 0; list-style: none; }
body.tw:not(#tw) .ar-comments #comments .comment-navigation a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
body.tw:not(#tw) .ar-comments #comments .no-comments { margin: 16px 0 0; color: var(--foreground-secondary); }

/* The form */
body.tw:not(#tw) .ar-comments #comments .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin-top: 32px; }
body.tw:not(#tw) .ar-comments #comments .comment-form > * { grid-column: 1 / -1; margin: 0; }
body.tw:not(#tw) .ar-comments #comments .comment-form :is(.comment-form-author, .comment-form-email) { grid-column: auto; }
body.tw:not(#tw) .ar-comments #comments .comment-form label { display: block; text-indent: 0; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--foreground); }
body.tw:not(#tw) .ar-comments #comments .comment-form .required { color: var(--accent); }
body.tw:not(#tw) .ar-comments #comments .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
  display: block; width: 100%; padding: 12px 0; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; background: transparent;
  font: inherit; font-size: 18px; line-height: 1.5; color: var(--foreground); transition: border-color .3s;
}
body.tw:not(#tw) .ar-comments #comments .comment-form textarea { height: 160px; min-height: 120px; resize: vertical; }
body.tw:not(#tw) .ar-comments #comments .comment-form :is(input, textarea):focus { outline: none; border-bottom-color: var(--primary); }
body.tw:not(#tw) .ar-comments #comments .comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
body.tw:not(#tw) .ar-comments #comments .comment-form .comment-form-cookies-consent input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--primary); }
body.tw:not(#tw) .ar-comments #comments .comment-form .comment-form-cookies-consent label { font-size: 15px; font-weight: 400; color: var(--foreground-secondary); }
body.tw:not(#tw) .ar-comments #comments .comment-form .form-submit { margin-top: 8px; }
body.tw:not(#tw) .ar-comments #comments .comment-form .form-submit .btn {
  display: inline-flex; align-items: center; height: 52px; padding: 0 28px !important; border: 0; border-radius: var(--radius-full);
  background: var(--primary); font: inherit; font-size: 16px; font-weight: 500 !important; color: var(--white); cursor: pointer; transition: background-color .3s;
}
body.tw:not(#tw) .ar-comments #comments .comment-form .form-submit .btn:is(:hover, :focus-visible) { background: var(--primary-dark); }
/* Signed in: Uncode adds the avatar, name and a Log out link beside the comment box */
body.tw:not(#tw) .ar-comments #comments .form-indent .comment-content { display: flex; flex-direction: column; gap: 20px; }
body.tw:not(#tw) .ar-comments #comments .form-indent .comment-figure { display: flex; align-items: center; gap: 12px; float: none; width: auto; font-size: 15px; }
body.tw:not(#tw) .ar-comments #comments .form-indent .gravatar { flex: none; width: 40px; height: 40px; margin: 0; overflow: hidden; border-radius: 50%; }
body.tw:not(#tw) .ar-comments #comments .form-indent .gravatar img { display: block; width: 40px !important; height: 40px !important; object-fit: cover; }
body.tw:not(#tw) .ar-comments #comments .form-indent .logged-in-as { flex: none; width: auto; margin: 0; font-weight: 600; }
body.tw:not(#tw) .ar-comments #comments .form-indent .logged-in-as a { color: var(--foreground); }
body.tw:not(#tw) .ar-comments #comments .form-indent .comment-figure > a { flex: none; width: auto; margin: 0 0 0 4px; float: none; position: static; white-space: nowrap; color: var(--foreground-secondary); text-decoration: underline; text-underline-offset: 4px; }
body.tw:not(#tw) .ar-comments #comments .form-indent .comment-meta { float: none; width: auto; margin: 0; padding: 0; }
body.tw:not(#tw) .ar-comments #comments .form-indent .comment-meta p { margin: 0; }
@media (max-width: 760px) {
  body.tw:not(#tw) .ar-comments { margin-top: 56px; padding-top: 40px; }
  body.tw:not(#tw) .ar-comments #comments .comment-form { grid-template-columns: 1fr; }
}

/* Title band page (tw_band_page): Start a project's band and rising panel, holding ordinary sections.
   The sections drop their own page column (the panel already sits in one) and close up their spacing. */
body.tw:not(#tw) .bp-panel > section.wrap { max-width: none; padding-left: 0; padding-right: 0; }
body.tw:not(#tw) .bp-panel > .about-block { padding-top: 80px; }
body.tw:not(#tw) .bp-panel > .about-block:first-child { padding-top: 0; }
@media (max-width: 760px) {
  body.tw:not(#tw) .bp-panel { padding-bottom: 0; }
  body.tw:not(#tw) .bp-panel > .about-block { padding-top: 56px; }
}

/* Why Tuwele without its wave line: the label stays where it sat under the line */
body.tw:not(#tw) .why.no-wave { padding-top: 117px; }

/* Uncode shrinks every .btn to 80% on screens under 570px (style.css, transform: scale(.8)). The redesign's buttons
   keep their own size, as in the static site. The magnetic hover still works: it sets its transform inline. */
@media (max-width: 569px) { body.tw:not(#tw) :is(.btn, .btn-link) { transform: none; } }
