/*
Theme Name: Takwin Studio
Template: takwin-science
Author: Takwin Life Sciences LLC
Description: Scientific services and sponsor engagement pages for the Takwin preview.
Version: 2.1.1
Text Domain: takwin
Requires at least: 6.4
Requires PHP: 8.0
*/

:root {
  --tk-ink: #162f40;
  --tk-muted: #425b63;
  --tk-teal: #0b625e;
  --tk-dark: #113340;
  --tk-cyan: #bde8db;
  --tk-tint: #edf4f0;
  --tk-rule: #c8d7d1;
  --tk-gutter: clamp(1.3rem, 5.4vw, 6rem);
  --tk-section-space: clamp(3.55rem, 6.5vw, 6.2rem);
  --tk-measure: 80rem;
}
body { background: #fcfdfb; color: var(--tk-ink); }
.tk-wrap { inline-size: min(calc(100% - 2 * var(--tk-gutter)), var(--tk-measure)); margin-inline: auto; }
:where(.tk-wrap, .tk-card, .tk-split, .tk-hero-grid, .tk-section-heading, .tk-page-hero) > * { min-inline-size: 0; }
.tk-hero *, .tk-section *, .tk-page-hero *, .tk-cta * { overflow-wrap: break-word; }
.tk-hero .wp-block-group, .tk-section .wp-block-group, .tk-page-hero .wp-block-group, .tk-cta .wp-block-group { min-width: 0; }
.tk-hero :is(p,h1,h2,h3,ul,ol,figure), .tk-section :is(p,h1,h2,h3,ul,ol,figure), .tk-page-hero :is(p,h1,h2,h3), .tk-cta :is(p,h2) { margin-block: 0; }
.tk-hero h1, .tk-page-hero h1, .tk-section h2, .tk-cta h2 { font-family: var(--serif); font-weight: 400; }
.tk-hero h1, .tk-page-hero h1 { line-height: .98; letter-spacing: -.039em; }
.tk-hero h1 em, .tk-page-hero h1 em, .tk-section h2 em { font-weight: 400; }
.tk-section h2, .tk-cta h2 { font-size: clamp(2.55rem, 4vw, 4.25rem); line-height: 1.02; letter-spacing: -.034em; }
.tk-section h3 { font: 600 clamp(1.18rem,1.55vw,1.55rem)/1.24 var(--sans); letter-spacing: -.026em; }
.tk-section p, .tk-page-hero p:not(.tk-kicker), .tk-hero p:not(.tk-kicker) { line-height: 1.58; }
.tk-section a, .tk-page-hero a { text-decoration-color: currentColor; text-underline-offset: .21em; }
:where(.tk-section, .tk-page-hero) a:not(.wp-block-button__link):hover,
:where(.tk-section, .tk-page-hero) .tk-action-quiet a:hover { color: var(--tk-teal); text-decoration-color: currentColor; }
.tk-section a:focus-visible, .tk-page-hero a:focus-visible { outline-offset: 4px; }

/* Brand and site navigation stay in the same place on every page. */
.masthead { border-block-end: 1px solid var(--tk-rule); background: #fcfdfb; }
.mast-inner { min-block-size: 5.25rem; gap: 2rem; }
.wordmark { gap: .27rem; color: var(--tk-ink); }
.word-top { font-size: 1.69rem; letter-spacing: .045em; }
.word-sub { font-size: .65rem; font-weight: 650; letter-spacing: .255em; }
.site-nav { gap: clamp(.95rem, 2.5vw, 2.5rem); }
.site-nav > a { display: inline-flex; align-items: center; justify-content: center; min-block-size: 2.75rem; font-size: .94rem; font-weight: 560; }
.site-nav > a:not(.nav-cta):hover, .site-nav > a[aria-current="page"]:not(.nav-cta), .site-nav > a.tk-current-section { color: var(--tk-teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .41em; }
.site-nav > .nav-cta, .wp-block-button__link, .submit-inquiry {
  border-radius: .3rem; font-weight: 640; background: var(--tk-teal); border-color: var(--tk-teal); color: #fff;
}
.site-nav > .nav-cta { padding-inline: 1.12rem; font-size: .93rem; }
.site-nav > .nav-cta:hover, .wp-block-button__link:hover, .submit-inquiry:hover { background: #094a4b; border-color: #094a4b; color: #fff; text-decoration: none; }
.site-nav > .nav-cta[aria-current="page"] { box-shadow: inset 0 -3px 0 #a2dcd0; }
.skip-link { z-index: 50; }

/* Homepage places a credited scientific plate next to the commissionable work. */
.tk-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--tk-dark); color: #f4f9f6; }
.tk-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); align-items: center; gap: clamp(2rem,5.2vw,5.7rem); min-block-size: clamp(32rem,41vw,41rem); }
.tk-hero-copy { position: relative; z-index: 2; padding-block: clamp(3.3rem,6.4vw,6.75rem); }
.tk-hero h1 { font-size: clamp(3.3rem,5.65vw,6.1rem); max-inline-size: 15ch; color: #f6fbf9; text-wrap: balance; }
.tk-hero h1 em { color: var(--tk-cyan); }
.tk-kicker {
  font: 650 .81rem/1.4 var(--sans); color: var(--tk-teal); letter-spacing: .105em; text-transform: uppercase;
}
.tk-hero .tk-kicker, .tk-dark .tk-kicker { color: var(--tk-cyan); }
.tk-kicker + :is(h1,h2,h3) { margin-block-start: .95rem; }
.tk-hero .tk-kicker + h1 { margin-block-start: 1.05rem; }
.tk-hero .tk-lead { margin-block-start: 1.45rem; color: #d8e9e8; max-inline-size: 46ch; font-size: clamp(1.06rem,1.26vw,1.25rem); }
.tk-actions { display: flex; gap: .74rem 1.25rem; align-items: center; flex-wrap: wrap; }
.tk-actions > * { margin-block: 0; }
.tk-hero .tk-actions, .tk-page-hero .tk-actions, .tk-section .tk-actions, .tk-cta .tk-actions { margin-block-start: 1.8rem; }
.tk-actions.wp-block-buttons, .tk-actions .wp-block-buttons { gap: .75rem 1rem; }
.tk-actions a:not(.wp-block-button__link) { display: inline-flex; align-items: center; min-height: 44px; font: 600 .98rem/1.35 var(--sans); }
.tk-hero .wp-block-button__link, .tk-dark .wp-block-button__link, .tk-cta .wp-block-button__link {
  border: 1px solid var(--tk-cyan); background: var(--tk-cyan); color: #103732; padding: .79rem 1.18rem; text-decoration: none;
}
.tk-hero .wp-block-button__link:hover, .tk-dark .wp-block-button__link:hover, .tk-cta .wp-block-button__link:hover { background: #dcf5ed; border-color: #dcf5ed; color: #103732; }
.tk-action-quiet .wp-block-button__link, .tk-hero .tk-action-quiet .wp-block-button__link, .tk-dark .tk-action-quiet .wp-block-button__link {
  background: transparent; border: 0; padding-inline: .15rem; color: inherit; border-radius: 0; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: .28em;
}
.tk-hero .tk-action-quiet .wp-block-button__link:hover, .tk-dark .tk-action-quiet .wp-block-button__link:hover { background: transparent; color: var(--tk-cyan); }
.tk-hero .hero-plate, .tk-hero .tk-hero-art {
  position: relative; isolation: isolate; inset: auto; inline-size: 100%; block-size: auto; aspect-ratio: 1.09; margin: 0; overflow: hidden;
}
.tk-hero .hero-plate { background: #092632; border: 1px solid #5a7b7b; }
.tk-hero .hero-plate picture, .tk-hero .hero-plate img { inline-size: 100%; block-size: 100%; display: block; }
.tk-hero .hero-plate img { object-fit: cover; object-position: 57% 47%; filter: grayscale(1) contrast(1.08) brightness(1.08); }
.tk-hero .hero-plate::before { background: linear-gradient(130deg,#6daba7,#acddd0 58%,#5fa39d); mix-blend-mode: color; }
.tk-hero .hero-plate::after { background: linear-gradient(0deg,rgba(5,30,34,.78),transparent 28%); transform: none; }
.tk-hero .hero-plate figcaption { inset-inline-start: 1rem; inset-inline-end: auto; inset-block-end: .85rem; font: 500 .81rem/1.32 var(--sans); color: #f2fff8; letter-spacing: .01em; text-shadow: 0 1px 4px #062b2a; }
.tk-hero-art .hero-plate { block-size: 100%; }
.tk-hero :focus-visible, .tk-dark :focus-visible, .tk-cta :focus-visible { outline-color: #e0ffe8; }

/* Page introductions, editorial spreads, service lists and evidence panels. */
.tk-page-hero, .tk-intro { padding-block: clamp(3.35rem,6.1vw,6.1rem); background: var(--tk-tint); border-block-end: 1px solid var(--tk-rule); }
.tk-page-hero .tk-wrap, .tk-intro .tk-wrap { display: flow-root; }
.tk-page-hero h1, .tk-intro h1 { max-inline-size: 23ch; font-size: clamp(3.15rem,5.8vw,6.05rem); text-wrap: balance; }
.tk-page-hero .tk-lead, .tk-intro .tk-lead { margin-block-start: 1.3rem; max-inline-size: 61ch; color: var(--tk-muted); font-size: clamp(1.13rem,1.6vw,1.38rem); }
.tk-section { padding-block: var(--tk-section-space); }
.tk-section + .tk-section:not(.tk-tint,.tk-dark,.tk-band) { border-block-start: 1px solid var(--tk-rule); }
.tk-tint, .tk-band { background: var(--tk-tint); }
.tk-dark, .tk-cta { background: var(--tk-dark); color: #f1faf4; }
.tk-cta { padding-block: clamp(3rem,5.9vw,5.8rem); }
.tk-cta h2 { max-inline-size: 23ch; }
.tk-cta p:not(.tk-kicker), .tk-dark p:not(.tk-kicker) { color: #dbeae4; }
.tk-cta h2 + p, .tk-section h2 + p { margin-block-start: 1rem; max-inline-size: 59ch; }
.tk-cta .tk-wrap { display: flow-root; }
.tk-section .tk-section-heading, .tk-section .tk-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1rem,5vw,5.2rem); align-items: start; }
.tk-section-heading:has(> .tk-kicker), .tk-section-heading:has(> h2:only-child) { display: block; }
.tk-section .tk-section-heading { align-items: end; }
.tk-section-heading > p:not(.tk-kicker) { color: var(--tk-muted); }
.tk-section-heading > h2 + p { margin-block-start: 0; }
.tk-section .tk-section-heading > .tk-kicker + h2 { margin-block-start: .65rem; }
.tk-section .tk-section-heading > .tk-kicker + h2 + p { margin-block-start: 1rem; }
.tk-section .tk-grid, .tk-section .tk-list, .tk-section .tk-stack, .tk-section .tk-case, .tk-section > .tk-wrap > .tk-proof { margin-block-start: clamp(1.5rem,3.3vw,3rem); }
.tk-section .tk-wrap > :first-child, .tk-section .tk-split > :first-child, .tk-section .tk-split > .tk-stack, .tk-section .tk-split > .tk-list { margin-block-start: 0; }
.tk-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(.95rem,1.75vw,1.65rem); align-items: stretch; }
.tk-grid.tk-two, .tk-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.tk-grid > *, .tk-split > * { margin-block: 0; }
.tk-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; padding: clamp(1.25rem,2.2vw,2.15rem);
  border: 1px solid var(--tk-rule); border-block-start: 3px solid #619c91; background: #fff;
}
.tk-card > h3 { margin-block: 0; }
.tk-card > .tk-kicker + h3 { margin-block-start: 0; }
.tk-card > p:not(.tk-kicker,.tk-card-link) { color: var(--tk-muted); font-size: 1rem; }
.tk-card > .tk-card-link, .tk-card > .wp-block-buttons { margin-block-start: auto; padding-block-start: .55rem; }
.tk-card a, .tk-card-link a { color: var(--tk-teal); font-weight: 620; }
.tk-card-link a, .tk-case a { text-decoration-thickness: 1px; text-underline-offset: .23em; }
.tk-card h3 a, .tk-row h3 a { text-decoration-color: #9bbeb5; }
.tk-section .tk-list { border-block-start: 1px solid var(--tk-rule); }
.tk-row { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: .85rem 2rem; padding-block: 1.5rem; border-block-end: 1px solid var(--tk-rule); }
.tk-row p { color: var(--tk-muted); }
.tk-case, .tk-proof { background: #e4f0e9; padding: clamp(1.45rem,3vw,2.6rem); border-inline-start: 3px solid #387f73; }
.tk-tint .tk-case, .tk-tint .tk-proof { background: white; }
.tk-case > *, .tk-proof > *, .tk-stack > * { margin-block: 0; }
.tk-case > * + *, .tk-proof > * + *, .tk-stack > * + * { margin-block-start: .95rem; }
.tk-case p, .tk-proof p { max-inline-size: 75ch; }
.tk-case h2, .tk-proof h2 { font-size: clamp(1.95rem,2.7vw,3rem); }
.tk-case h3, .tk-proof h3 { max-inline-size: 38ch; }
.tk-section :is(ul,ol) { margin-block: 1rem; padding-inline-start: 1.25em; }
.tk-section li + li { margin-block-start: .68rem; }
.tk-section li::marker { color: var(--tk-teal); }
.tk-dark a:not(.wp-block-button__link) { color: #d4f4e8; text-decoration-color: #a8cfc5; }
.tk-dark .tk-card, .tk-dark .tk-case, .tk-dark .tk-proof { background: #19444b; border-color: #648883; }
.tk-dark .tk-card p, .tk-dark .tk-section-heading > p:not(.tk-kicker), .tk-dark .tk-row p { color: #dbeae4; }
.tk-dark li::marker { color: var(--tk-cyan); }

/* Existing inquiry and policy pages share the new palette and proportions. */
.contact-section { background: #f9fbf8; }
.contact-intro h1 { letter-spacing: -.04em; }
.form-column { background: white; border-color: var(--tk-rule); border-block-start: 3px solid #477f75; }
.form-field input, .form-field select, .form-field textarea { border-color: #758b84; }
.site-footer { background: #102d38; }
.footer-inner { padding-block: 2.7rem 2.25rem; gap: 1.5rem 3rem; }
.site-footer .wordmark { color: #f3faf5; }
.site-footer nav { gap: .45rem clamp(.9rem,2vw,1.9rem); }
.site-footer nav a { display: inline-flex; align-items: center; min-block-size: 2.75rem; }
.tk-colophon { display: flex; justify-content: space-between; align-items: center; gap: .6rem 2rem; border-block-start: 1px solid #446162; padding-block: 1rem 1.35rem; color: #c1d4cf; font-size: .88rem; }
.tk-colophon > div { display: flex; gap: 1.35rem; flex-wrap: wrap; }
.tk-colophon a { display: inline-flex; align-items: center; min-block-size: 2.5rem; }
.tk-colophon a:hover { color: #fff; }

@media (max-width: 62rem) {
  .tk-hero-grid { grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); gap: 2rem; min-block-size: 30rem; }
  .tk-hero .hero-plate, .tk-hero .tk-hero-art { aspect-ratio: .86; }
  .tk-card { padding: 1.3rem 1.1rem; }
}
@media (max-width: 54rem) {
  .mast-inner { min-block-size: 4.2rem; flex-wrap: wrap; gap: 0; }
  .site-nav { inline-size: 100%; align-items: stretch; flex-direction: column; gap: .1rem; padding-block: .1rem 1rem; }
  .site-nav > a { justify-content: flex-start; padding: .6rem .5rem; min-block-size: 2.75rem; }
  .site-nav > .nav-cta { justify-content: center; margin-block-start: .3rem; }
  .has-menu-js .nav-toggle { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid #a6bcb4; background: transparent; color: var(--tk-ink); padding: .5rem .75rem; min-block-size: 2.75rem; font: 600 .98rem/1.35 var(--sans); border-radius: .25rem; }
  .has-menu-js .site-nav:not(.open) { display: none; }
  .menu-icon { inline-size: 1rem; block-size: .57rem; border-block: 2px solid currentColor; }
  .tk-hero-grid { gap: 1.5rem; }
  .tk-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 43.75rem) {
  .tk-hero-grid { grid-template-columns: minmax(0,1fr); min-block-size: 0; gap: .5rem; }
  .tk-hero-copy { padding-block: 2.9rem 1.4rem; }
  .tk-hero h1 { max-inline-size: 15ch; font-size: clamp(3.15rem,10.4vw,4.3rem); }
  .tk-hero .tk-lead { margin-block-start: 1.12rem; }
  .tk-hero .tk-actions { margin-block-start: 1.3rem; }
  .tk-hero .hero-plate, .tk-hero .tk-hero-art { aspect-ratio: 2.2; margin-block-end: 1.35rem; }
  .tk-hero-art .hero-plate { margin-block: 0; }
  .tk-hero .hero-plate figcaption { inset-inline-start: .72rem; inset-block-end: .55rem; }
  .tk-page-hero, .tk-intro { padding-block: 2.9rem; }
  .tk-page-hero h1, .tk-intro h1 { font-size: clamp(2.7rem,9.5vw,4.2rem); }
  .tk-section .tk-section-heading, .tk-section .tk-split, .tk-grid, .tk-grid.tk-two, .tk-grid-2, .tk-row { grid-template-columns: minmax(0,1fr); }
  .tk-section .tk-section-heading, .tk-section .tk-split { gap: 1.2rem; }
  .tk-row { gap: .55rem; }
  .tk-section h2, .tk-cta h2 { font-size: clamp(2.4rem,8.2vw,3.35rem); }
  .tk-card { gap: .64rem; padding: 1.3rem; }
  .tk-case h2, .tk-proof h2 { font-size: 2.15rem; }
  .tk-hero .tk-kicker { font-size: .78rem; }
  .site-footer nav { gap: .1rem 1.4rem; }
  .footer-inner { padding-block: 2rem 1.2rem; }
  .tk-colophon { flex-direction: column; align-items: flex-start; gap: .23rem; }
}
@media (forced-colors: active) {
  .tk-hero .hero-plate { display: block; }
  .tk-hero .hero-plate::before, .tk-hero .hero-plate::after { display: none; }
  .tk-card, .tk-case, .tk-proof, .tk-hero .hero-plate { border: 1px solid CanvasText; }
}
[dir="rtl"] :is(.tk-hero,.tk-section,.tk-page-hero,.tk-cta,.tk-intro) :is(h1,h2,h3,.tk-kicker) { font-family: Tahoma,Arial,sans-serif; letter-spacing: normal; line-height: 1.32; }

/* Specific spacing for editable block groups overrides WordPress global flow
   margins and remains stable if a paragraph or heading is edited in place. */
.tk-section .tk-section-heading:has(> h2:only-child) { display: block; }
.tk-section .tk-split > :is(.tk-stack,.tk-card,.tk-case,.tk-proof) { margin-block: 0; }
.tk-section :is(.tk-case,.tk-proof,.tk-stack) > * + * { margin-block-start: .9rem; }
.tk-section .tk-wrap > .tk-section-heading + p { margin-block-start: 1.05rem; max-inline-size: 72ch; }
.tk-section .tk-wrap > p + p { margin-block-start: .9rem; max-inline-size: 72ch; }
.tk-section :is(.tk-case,.tk-proof) > p + h3 { margin-block-start: 1.7rem; }
.tk-section .tk-proof > .tk-kicker, .tk-section .tk-case > .tk-kicker, .tk-section .tk-stack > .tk-kicker { margin-block: 0; }
.tk-section .tk-card-link a { display: inline-flex; align-items: center; min-block-size: 2.25rem; }
.tk-section .tk-grid > .tk-card { margin-block: 0; }
.tk-section .tk-card > .tk-card-link { margin-block-start: auto; }
.home .tk-section.tk-tint .tk-grid:not(.tk-two) { gap: 0 clamp(1.3rem,3vw,3rem); }
.home .tk-section.tk-tint .tk-grid:not(.tk-two) > .tk-card {
  padding: 1.4rem 0 1.15rem; border: 0; border-block-start: 1px solid #91aea2; background: transparent;
}
@media (max-width: 43.75rem) {
  .tk-section .tk-card-link a { min-block-size: 2.75rem; }
}

/* The project team is presented as an assignment-specific division of work.
   On narrow screens the same role descriptions read as a single column. */
.tk-team-band {
  background: #e0eee7;
  color: #163e3c;
  border-block: 1px solid #b7cec1;
}
.tk-team-band .tk-section-heading { align-items: start; }
.tk-team-band .tk-section-heading h2 { max-inline-size: 19ch; text-wrap: balance; }
.tk-team-band .tk-section-heading p { max-inline-size: 56ch; color: #35534d; }
.tk-team-band .tk-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin-block-start: clamp(1.65rem, 3.3vw, 3rem);
  padding-block: clamp(1.35rem, 2.4vw, 2.1rem);
  border-block: 1px solid #89aa98;
}
.tk-role-grid > .tk-role { min-inline-size: 0; margin: 0; }
.tk-role-grid > .tk-role + .tk-role { border-inline-start: 1px solid #a3bdae; }
.tk-role-grid > .tk-role:not(:first-child) { padding-inline-start: clamp(1.15rem, 2.2vw, 2.2rem); }
.tk-role-grid > .tk-role:not(:last-child) { padding-inline-end: clamp(1.15rem, 2.2vw, 2.2rem); }
.tk-team-band .tk-role h3 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.35vw, 2.65rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.023em;
  text-wrap: balance;
}
.tk-team-band .tk-role .tk-kicker { color: #235e50; }
.tk-team-band .tk-role > * + * { margin-block-start: .65rem; }
.tk-team-band .tk-role p:not(.tk-kicker) { color: #2d4e47; font-size: 1rem; max-inline-size: 43ch; }
.tk-team-band .tk-role a, .tk-team-band .tk-card-link a { color: #154f45; text-decoration-color: currentColor; }
.tk-team-band .tk-card-link { margin-block-start: 1.05rem; }
@media (max-width: 47rem) {
  .tk-team-band .tk-role-grid { grid-template-columns: minmax(0, 1fr); padding-block: 0; }
  .tk-role-grid > .tk-role,
  .tk-role-grid > .tk-role:not(:first-child),
  .tk-role-grid > .tk-role:not(:last-child) { padding: 1.3rem 0; }
  .tk-role-grid > .tk-role + .tk-role { border-inline-start: 0; border-block-start: 1px solid #aec6b8; }
  .tk-team-band .tk-role p:not(.tk-kicker) { max-inline-size: 61ch; }
}
@media (forced-colors: active) {
  .tk-team-band, .tk-team-band .tk-role-grid, .tk-role-grid > .tk-role + .tk-role { border-color: CanvasText; }
}
