/* RocketPen Digital Studio — resilient text wrapping and zoom-safe layouts.
   Loaded after page-specific styles so it can protect content at narrow viewports
   and browser zoom levels without disabling user zoom. */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-inline: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

main, section, article, header, footer, nav, aside, form,
.wrap, .inner, .section-inner, .hero-inner, .nav-inner, .nav-right,
.nav-links, .container, .manifesto-grid, .process-grid, .contact-grid,
.topic-grid, .article-card, .article, .cta, .contact-card {
  min-width: 0;
  max-width: 100%;
}

img, svg, canvas, iframe, object, embed {
  max-width: 100%;
}

img, svg, canvas {
  height: auto;
}

video {
  max-width: 100%;
}

.hero-video {
  width: 100%;
  max-width: none;
  height: 100%;
}

h1, h2, h3, h4, h5, h6, .h1, .section-title, .statement h2,
.article h1, .article h2, .article h3 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.12 !important;
  letter-spacing: -0.025em !important;
  text-wrap: pretty;
}

p, li, a, button, label, small, figcaption, blockquote, code,
.tag, .eyebrow, .kicker, .article-no, .manifesto-note, .nav-links a,
.read, .btn, .text-link {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

p, li {
  line-height: 1.65;
}

button, input, select, textarea {
  max-width: 100%;
  white-space: normal;
}

pre, code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

[class*="grid"] > *,
.flex > *,
.nav > *,
.nav-right > *,
.hero-actions > *,
footer > *,
.back > * {
  min-width: 0;
}

.logo {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nav, .nav-right, .nav-links, .hero-actions, .hero-bottom,
footer, .back, .section-head, .contact-links {
  flex-wrap: wrap;
}

.service, .step, .topic, .article-card, .contact-card {
  min-width: 0;
}

.article-card {
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
}

.read {
  white-space: normal;
  text-align: center;
}

.article, .article p, .article li {
  overflow-wrap: anywhere;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .h1,
html[lang="ar"] .section-title,
html[lang="ar"] .statement h2,
html[lang="ar"] .article h1,
html[lang="ar"] .article h2,
html[lang="ar"] .article h3 {
  letter-spacing: normal !important;
  line-height: 1.38 !important;
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .manifesto-grid, .contact-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: clamp(24px, 5vw, 44px) !important;
  }

  .service {
    grid-template-columns: 2rem minmax(0, 1fr) 1.5rem !important;
    gap: 0.8rem !important;
    align-items: start;
  }

  .service p {
    grid-column: 2 !important;
    grid-row: auto !important;
    max-width: 100% !important;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 16px;
  }

  .step {
    margin-right: 0;
    padding-right: 14px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start;
  }

  .read {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
  }

  .section-head {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  h1, .h1 {
    font-size: clamp(2.2rem, 11.5vw, 4rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;
  }

  h2, .section-title, .statement h2 {
    font-size: clamp(1.9rem, 8.8vw, 3.6rem) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.02em !important;
  }

  h3 {
    line-height: 1.2 !important;
    letter-spacing: -0.015em !important;
  }

  .nav, .nav-right, .nav-links {
    max-width: 100%;
  }

  .nav-links {
    white-space: normal;
  }

  .topic-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero:has(.hero-inner) {
    height: auto;
    min-height: max(100svh, 620px);
  }

  .hero-inner, .section-inner, .inner, .wrap {
    width: 100%;
    max-width: 100%;
  }

  .hero-bottom {
    max-width: calc(100% - 2 * var(--pad, 20px));
  }

  .process-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .step {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #d7d8da;
    padding: 18px 0;
  }

  footer, .back {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px 18px;
  }

  .article h1 {
    font-size: clamp(2rem, 8.8vw, 3.2rem) !important;
    line-height: 1.16 !important;
  }

  .article h2 {
    font-size: clamp(1.55rem, 7vw, 2.2rem) !important;
    line-height: 1.22 !important;
  }

  .article p, .article li {
    font-size: 1rem;
    line-height: 1.75;
  }
}

@media (max-width: 420px) {
  .nav, .nav-right {
    gap: 8px;
  }

  .hero-actions {
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions .btn, .hero-actions .text-link {
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
  }

  .btn, .read {
    padding: 12px 14px;
  }

  .topic {
    padding: 18px;
  }

  .article {
    max-width: 100%;
  }

  .article .meta {
    gap: 8px 12px;
    line-height: 1.5;
  }
}

/* Mobile hero content must flow naturally: fixed absolute top offsets collide
   when text reflows, the viewport narrows, or browser zoom is increased. */
@media (max-width: 760px) {
  html body .hero:has(.hero-inner) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: max(100svh, 720px) !important;
    height: auto !important;
    padding: clamp(112px, 17svh, 160px) 20px 24px !important;
    overflow: hidden !important;
  }

  html body .hero-inner {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 680px !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body .hero-inner .eyebrow {
    position: static !important;
    inset: auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 20px !important;
    padding: 6px 8px !important;
    font-size: clamp(8px, 2.1vw, 10px) !important;
    line-height: 1.45 !important;
    letter-spacing: .04em !important;
    white-space: normal !important;
  }

  html body .hero-inner h1 {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-size: clamp(2.15rem, 10.8vw, 3.7rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
    overflow-wrap: anywhere !important;
  }

  html body .hero-inner h1 span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    line-height: inherit !important;
  }

  html body .hero-inner .hero-sub {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 38rem !important;
    height: auto !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    font-size: clamp(14px, 3.8vw, 17px) !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere !important;
  }

  html body .hero-inner .hero-actions {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 12px !important;
    transform: none !important;
  }

  html body .hero-inner .hero-actions .btn,
  html body .hero-inner .hero-actions .text-link {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.5 !important;
  }

  html body .hero-bottom {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-top: auto !important;
    padding-top: 40px !important;
    font-size: clamp(7px, 2vw, 9px) !important;
    line-height: 1.45 !important;
    letter-spacing: .06em !important;
  }

  html body .hero-bottom > span,
  html body .hero-bottom .scroll-indicator {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  html[lang="ar"] body .hero-inner h1 {
    line-height: 1.38 !important;
    letter-spacing: normal !important;
  }
}

@media (max-width: 420px) {
  html body .hero:has(.hero-inner) {
    min-height: max(100svh, 680px) !important;
    padding-top: clamp(108px, 16svh, 138px) !important;
  }
}

/* Premium mobile navigation: no hamburger. Keep the main links visible
   in a quiet, horizontally scrollable row beneath the brand. */
@media (max-width: 760px) {
  html body header.nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    row-gap: 14px !important;
    min-height: 0 !important;
    padding: 14px var(--pad, 20px) 13px !important;
  }

  html body header.nav > .logo,
  html body header.nav > .logo-image,
  html body header.nav > a.logo {
    max-width: calc(100% - 112px) !important;
  }

  html body header.nav .nav-right {
    display: contents !important;
  }

  html body header.nav .mobile-nav-toggle {
    display: none !important;
  }

  html.js-ready html body header.nav .nav-links,
  html body header.nav .nav-links,
  html body header.nav.mobile-open .nav-links {
    order: 3 !important;
    position: static !important;
    display: flex !important;
    flex: 1 0 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(16px, 4vw, 24px) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 4px 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }

  html body header.nav .nav-links::-webkit-scrollbar {
    display: none !important;
  }

  html body header.nav .nav-links a {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    padding: 5px 0 8px !important;
    border: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }

  html body header.nav .language-picker {
    position: absolute !important;
    top: 14px !important;
    right: var(--pad, 20px) !important;
    z-index: 70 !important;
  }

  html[dir="rtl"] body header.nav .language-picker,
  body.arabic header.nav .language-picker {
    right: auto !important;
    left: var(--pad, 20px) !important;
  }

  html body header.nav .nav-links a:last-child {
    padding-inline-end: 4px !important;
  }
}

/* Keep the locale dropdown anchored to the viewport on narrow screens,
   even when the header's logo and menu controls need to wrap. */
@media (max-width: 760px) {
  html body .language-menu {
    position: fixed !important;
    top: 76px !important;
    left: auto !important;
    right: 10px !important;
    width: min(175px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    transform-origin: top right !important;
  }
}

/* Override legacy hero line-height declarations that were too tight at mobile zoom. */
body .hero-inner h1 { line-height: 1.12 !important; }
body .arabic .hero-inner h1, html[lang="ar"] .hero-inner h1 { line-height: 1.38 !important; letter-spacing: normal !important; }


/* Mobile homepage composition: keep the copy in a left-side column so the
   rocket/astronaut artwork stays visible, and tighten the vertical rhythm. */
@media (max-width: 760px) {
  html body .hero:has(.hero-inner) {
    align-items: flex-start !important;
    padding-top: clamp(98px, 10svh, 126px) !important;
  }

  html body .hero:has(.hero-inner) .hero-inner {
    width: min(78%, 34rem) !important;
    max-width: 34rem !important;
    margin: 0 auto 0 0 !important;
    align-items: flex-start !important;
  }

  html body .hero-inner .eyebrow {
    margin-bottom: 12px !important;
  }

  html body .hero-inner h1 {
    font-size: clamp(2.15rem, 8.7vw, 3.8rem) !important;
    line-height: 1.02 !important;
    margin: 0 0 16px !important;
    letter-spacing: -.035em !important;
  }

  html body .hero-inner .hero-sub {
    max-width: 38ch !important;
    font-size: clamp(13px, 2.8vw, 16px) !important;
    line-height: 1.52 !important;
    margin-bottom: 16px !important;
  }

  html body .hero-inner .hero-actions {
    gap: 8px !important;
  }

  html body .hero-inner .hero-actions .btn {
    min-height: 44px !important;
    padding: 11px 14px !important;
    font-size: 11px !important;
  }

  html body .hero-inner .hero-actions .text-link {
    min-height: 0 !important;
    padding: 4px 0 !important;
    font-size: 12px !important;
  }

  html body .hero:has(.hero-inner):before {
    background: linear-gradient(90deg, rgba(4,6,10,.78) 0%, rgba(4,6,10,.44) 54%, rgba(4,6,10,.08) 100%) !important;
  }

  html[dir="rtl"] body .hero:has(.hero-inner) .hero-inner {
    margin: 0 0 0 auto !important;
  }

  html[dir="rtl"] body .hero:has(.hero-inner):before {
    background: linear-gradient(270deg, rgba(4,6,10,.78) 0%, rgba(4,6,10,.44) 54%, rgba(4,6,10,.08) 100%) !important;
  }
}

@media (max-width: 420px) {
  html body .hero:has(.hero-inner) .hero-inner {
    width: min(92%, 34rem) !important;
  }

  html body .hero-inner h1 {
    font-size: clamp(2.15rem, 9vw, 2.65rem) !important;
  }
}

/* Keep the site navigation attached to the top edge after scrolling. */
html body header.nav.is-scrolled {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: rgba(7,9,13,.94) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.24) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  backdrop-filter: blur(18px) !important;
  animation: navIn .25s ease both;
}

@media (max-width: 760px) {
  html body header.nav .lang-label {
    display: none !important;
  }
}

/* Mobile hero hierarchy: keep the heading above and place the paragraph and
   primary actions in the lower area that previously held the scroll prompt. */
.hero-bottom-copy { display:none; }

@media (max-width: 760px) {
  html body .hero:has(.hero-inner) {
    display:flex !important;
    flex-direction:column !important;
    justify-content:space-between !important;
    align-items:stretch !important;
    padding-bottom:clamp(78px, 10svh, 118px) !important;
  }

  html body .hero-inner .hero-sub,
  html body .hero-inner .hero-actions {
    display:none !important;
  }

  html body .hero-bottom-copy {
    display:block !important;
    position:relative !important;
    z-index:3 !important;
    flex:0 0 auto !important;
    width:min(92%, 38rem) !important;
    max-width:38rem !important;
    margin:auto 0 0 !important;
    padding:0 !important;
    transform:none !important;
  }

  html body .hero-bottom-copy .hero-sub {
    display:block !important;
    position:static !important;
    width:100% !important;
    max-width:38ch !important;
    height:auto !important;
    margin:0 0 16px !important;
    padding:0 !important;
    font-size:clamp(14px, 3.7vw, 17px) !important;
    line-height:1.55 !important;
    color:#f0f1f4 !important;
    overflow-wrap:break-word !important;
  }

  html body .hero-bottom-copy .hero-actions {
    display:flex !important;
    position:static !important;
    flex-flow:row wrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px 14px !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    transform:none !important;
  }

  html body .hero-bottom-copy .hero-actions .btn {
    display:inline-flex !important;
    flex:0 1 auto !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    min-height:44px !important;
    height:auto !important;
    margin:0 !important;
    padding:12px 14px !important;
    font-size:11px !important;
    line-height:1.45 !important;
    text-align:center !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  html body .hero-bottom-copy .hero-actions .text-link {
    display:inline-flex !important;
    flex:0 1 auto !important;
    width:auto !important;
    max-width:100% !important;
    min-height:0 !important;
    margin:0 !important;
    padding:5px 0 !important;
    font-size:12px !important;
    line-height:1.5 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  html[dir="rtl"] body .hero-bottom-copy {
    margin-left:0 !important;
    margin-right:auto !important;
  }
}

@media (min-width: 761px) {
  html body .hero-bottom-copy { display:none !important; }
}

/* Make the main greeting more prominent on mobile while preserving a safe
   two-line wrap for the long Turkish headline and the Arabic RTL layout. */
@media (max-width: 760px) {
  html body .hero-inner h1 {
    font-size: clamp(2.55rem, 10.2vw, 3.75rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.04em !important;
    max-width: 100% !important;
  }

  html body .hero-inner h1 span {
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  html[lang="tr"] body .hero-inner h1 {
    font-size: clamp(2.45rem, 9.5vw, 3.5rem) !important;
    letter-spacing: -.045em !important;
  }

  html[lang="ar"] body .hero-inner h1 {
    font-size: clamp(2.65rem, 10.4vw, 3.9rem) !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
  }
}

@media (max-width: 360px) {
  html[lang="tr"] body .hero-inner h1 {
    font-size: clamp(2.3rem, 9vw, 2.65rem) !important;
  }
}
