/* ===== Think Nest – colours and fonts from the Figma design ===== */
:root {
  --blue: #3E4B94;
  --red: #FA7571;
  --red-dark: #e8605c;
  --navy: #1E2352;
  --grey: #696984;
  --light: #F5F6FB;
  --white: #FFFFFF;
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Raleway', Arial, sans-serif; color: var(--grey); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
img.missing { visibility: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: min(1260px, 100% - 48px); margin-inline: auto; }
section { margin-top: 100px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ----- Buttons ----- */
.btn { display: inline-block; font-weight: 700; border-radius: 10px; padding: 12px 32px; font-size: 1.05rem; transition: background .2s, transform .2s; text-align: center; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-white { background: var(--white); color: var(--red); }
.btn-big { padding: 18px 60px; text-transform: uppercase; font-size: 1rem; letter-spacing: .02em; }
.btn-small { padding: 7px 0; width: 100%; font-size: .85rem; border-radius: 6px; }

/* ----- Headings with the red swoosh underline ----- */
.title { color: var(--blue); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.3; display: inline-block; position: relative; padding-bottom: 14px; }
.title::after { content: ''; position: absolute; right: 0; bottom: 0; width: 177px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 177 10'%3E%3Cpath d='M2 8 Q 90 -2 175 6' stroke='%23FA7571' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain; }
.title-white { color: var(--white); }
.title-center { display: table; margin-inline: auto; }
.subtitle { text-align: center; color: var(--navy); font-size: 1.25rem; font-weight: 500; margin-top: 8px; }

/* ----- Hero ----- */
.hero { background: var(--blue); border-radius: 0 0 40px 40px; color: var(--white); overflow: hidden; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 40px 0 0; position: relative; z-index: 10; }
.nav-logo img { height: 79px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 120px; }
.nav-links { display: flex; gap: 70px; font-weight: 700; font-size: 1.1rem; }
.nav-links a:hover { color: var(--red); }
.nav-buttons { display: flex; gap: 16px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 28px; height: 3px; background: var(--white); margin: 5px 0; border-radius: 2px; }

.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 20px; min-height: 600px; }
.hero-text { align-self: center; padding-bottom: 60px; }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.3rem); line-height: 1.5; font-weight: 700; margin-bottom: 28px; }
.hero-image { position: relative; align-self: end; }
.hero-image > img:first-child { width: 100%; max-width: 620px; margin-left: auto; }
.float { position: absolute; width: 62px; }
.float-1 { left: 8%; top: 38%; }
.float-2 { right: 2%; top: 12%; width: 140px; }

/* ----- About ----- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.features { margin-top: 40px; display: grid; gap: 36px; }
.features li { display: flex; gap: 32px; align-items: center; }
.features p { font-size: 1.1rem; font-weight: 500; max-width: 445px; }
.features strong { font-weight: 700; color: var(--grey); }
.feature-icon { flex: 0 0 60px; height: 60px; border-radius: 50%; background: var(--white); box-shadow: 0 10px 30px rgba(62, 75, 148, .15); display: grid; place-items: center; }
.ic-grid { width: 26px; height: 26px; background:
  linear-gradient(var(--blue),var(--blue)) 0 0/11px 11px no-repeat,
  linear-gradient(var(--blue),var(--blue)) 15px 0/11px 11px no-repeat,
  linear-gradient(var(--blue),var(--blue)) 0 15px/11px 11px no-repeat,
  linear-gradient(var(--red),var(--red)) 15px 15px/11px 11px no-repeat; }
.ic-layers { width: 28px; height: 26px; position: relative; }
.ic-layers::before, .ic-layers::after { content: ''; position: absolute; border-radius: 2px; }
.ic-layers::before { width: 20px; height: 20px; left: 8px; top: 6px; background: var(--blue); }
.ic-layers::after { width: 21px; height: 21px; left: 0; top: 0; background: var(--red); }
.ic-users { width: 30px; height: 22px; background:
  radial-gradient(circle at 50% 30%, var(--blue) 5px, transparent 5.5px),
  radial-gradient(circle at 18% 40%, var(--blue) 4px, transparent 4.5px),
  radial-gradient(circle at 82% 40%, var(--blue) 4px, transparent 4.5px),
  radial-gradient(ellipse 8px 5px at 50% 95%, var(--blue) 95%, transparent 100%); }
.about-image img { width: 100%; max-width: 606px; margin-left: auto; }

/* ----- Role cards ----- */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.role-card { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: 0 10px 40px rgba(62, 75, 148, .10); display: flex; flex-direction: column; gap: 10px; transition: transform .2s; }
.role-card:hover { transform: translateY(-4px); }
.role-card img { width: 84px; height: 84px; object-fit: contain; }
.role-card h3 { color: var(--navy); font-size: 1.3rem; margin-top: 8px; }
.role-card p { flex: 1; }
.role-link { color: var(--red); font-weight: 600; display: flex; justify-content: space-between; margin-top: 12px; }

/* ----- Code. Build. Imagine ----- */
.code-panel { background: var(--blue); border-radius: var(--radius); padding: 56px 32px; color: var(--white); }
.code-inner { display: grid; grid-template-columns: 396px 1fr; gap: 64px; align-items: center; margin-top: 56px; }
.code-inner p { font-size: 1.45rem; line-height: 1.75; margin-bottom: 56px; max-width: 743px; }

/* ----- Think Paths ----- */
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.course { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(62, 75, 148, .10); display: flex; flex-direction: column; }
.course-img { width: 100%; aspect-ratio: 334 / 179; object-fit: cover; background: var(--light); }
.course-learners { align-self: center; margin-top: -20px; background: var(--white); border-radius: 30px; padding: 5px 14px 5px 8px; display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--navy); box-shadow: 0 4px 14px rgba(0,0,0,.08); position: relative; }
.course-learners img { height: 26px; width: auto; }
.course-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-date { font-size: .7rem; }
.course h3 { color: var(--blue); font-size: 1.05rem; line-height: 1.3; }
.course p { font-size: .8rem; flex: 1; }
.course .btn { margin-top: 12px; }

/* ----- Call to action ----- */
.cta { background: var(--navy); border-radius: var(--radius) var(--radius) 0 0; position: relative; display: flex; align-items: center; min-height: 405px; margin-top: 260px; padding: 60px 74px; }
.cta-text { max-width: 600px; position: relative; z-index: 1; }
.cta h2 { color: var(--white); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.3; font-weight: 700; margin-bottom: 28px; }
.cta-img { position: absolute; right: 8%; bottom: 0; height: 145%; width: auto; }

/* ----- Footer ----- */
.footer { background: var(--navy); color: var(--white); padding: 80px 0 30px; }
.footer-inner { display: flex; align-items: center; gap: 100px; }
.footer-logo { height: 90px; width: auto; }
.footer-middle { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 30px; margin-right: 190px; }
.footer-links { display: flex; gap: 80px; font-weight: 700; font-size: 1.1rem; }
.footer-links a:hover { color: var(--red); }
.social { display: flex; gap: 20px; }
.social img { height: 26px; width: auto; }
.copyright { text-align: center; margin-top: 30px; font-size: 1rem; }

/* ===== Tablet ===== */
@media (max-width: 1100px) {
  .nav-menu { gap: 40px; }
  .nav-links { gap: 32px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .code-inner { grid-template-columns: 1fr 1.4fr; gap: 40px; }
  .footer-middle { margin-right: 0; }
}

/* ===== Phone ===== */
@media (max-width: 820px) {
  section { margin-top: 70px; }
  .nav { padding-top: 24px; }
  .nav-logo img { height: 60px; }
  .nav-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 24px; background: var(--blue); padding: 24px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 14px 30px rgba(0,0,0,.2); }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: 18px; text-align: center; }
  .nav-buttons { flex-direction: column; width: 100%; }
  .hero-inner, .about, .code-inner { grid-template-columns: 1fr; }
  .hero-inner { min-height: 0; padding-top: 40px; text-align: center; }
  .hero-text { padding-bottom: 0; }
  .hero-image > img:first-child { margin: 0 auto; }
  .roles { grid-template-columns: 1fr; }
  .code-inner { text-align: center; }
  .code-inner img { max-width: 280px; margin: 0 auto; }
  .code-inner p { font-size: 1.15rem; margin-bottom: 32px; }
  .btn-big { padding: 16px 40px; }
  .cta { flex-direction: column; padding: 40px 28px 0; margin-top: 120px; text-align: center; }
  .cta-img { position: static; height: auto; max-height: 320px; margin-top: 20px; }
  .footer-inner { flex-direction: column; gap: 30px; }
  .footer-links { gap: 28px; }
}
@media (max-width: 560px) {
  .course-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .role-card { transition: none; }
}

/* ===== Careers page ===== */
.hero-image .float-3 { left: 4%; top: 22%; width: 62px; }
.hero-image .float-4 { right: 10%; top: 2%; width: 120px; }
.jobs .job-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 21px; margin-top: 40px; }
.job-card { background: var(--white); border: 1px solid #BFBFC4; border-radius: 24px; padding: 24px; box-shadow: 0 4px 18px rgba(211,211,211,.25); transition: background .2s; }
.job-card h3 { color: #2F3241; font-size: 1.5rem; margin-bottom: 8px; }
.job-card p { color: #8B8B8B; font-size: 1.05rem; font-weight: 500; max-width: 420px; }
.job-card:hover, .job-card:focus-visible { background: #384485; border-color: var(--white); }
.job-card:hover h3, .job-card:hover p, .job-card:focus-visible h3, .job-card:focus-visible p { color: var(--white); }

/* ===== Job details + application form ===== */
.hero-slim { border-radius: 0 0 24px 24px; padding-bottom: 24px; }
.hero-slim .nav { padding-top: 24px; }
.job-page { padding-top: 50px; }
.back-link { color: var(--blue); font-weight: 700; display: block; width: fit-content; margin-bottom: 16px; }
.back-link:hover { color: var(--red); }
#job-details { color: #2F3241; max-width: 900px; margin-top: 16px; }
.job-intro { font-size: 1.15rem; font-weight: 500; margin-bottom: 28px; }
#job-details h3 { font-size: 1.15rem; margin: 20px 0 8px; }
#job-details ul { list-style: disc; padding-left: 22px; color: var(--grey); }
.apply { margin-top: 60px; }
.apply h2, .thanks h2 { color: var(--blue); font-size: 1.8rem; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 24px; }
.apply label { display: flex; flex-direction: column; gap: 10px; font-weight: 600; color: #2F3241; font-size: .95rem; }
.apply input, .apply select, .apply textarea { font: inherit; font-weight: 500; color: #2F3241; border: 1px solid #7A7A8C; border-radius: 6px; padding: 13px 16px; background: var(--white); width: 100%; }
.apply textarea { resize: vertical; min-height: 131px; }
.apply input::placeholder, .apply textarea::placeholder { color: #A0A0B0; }
.upload-box { position: relative; min-height: 131px; border-radius: 6px; background: #E9EAF4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--blue); font-weight: 500; cursor: pointer; text-align: center; padding: 12px; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 2rem; line-height: 1; }
.upload-box:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.submit { display: block; margin: 40px auto 0; width: min(654px, 100%); border: 0; cursor: pointer; font-family: inherit; }
.thanks { margin: 60px 0 20px; padding: 40px; border-radius: var(--radius); background: #E9EAF4; text-align: center; }
.thanks p { margin-bottom: 24px; color: #2F3241; }
.job-page + .footer, main.job-page ~ .footer { margin-top: 100px; }

@media (max-width: 820px) {
  .jobs .job-grid, .form-grid, .form-grid-2 { grid-template-columns: 1fr; }
}
.jobs { margin-bottom: 100px; }
/* keep the logo full size: it must never shrink when the menu is busy */
.nav-logo { flex: 0 0 auto; display: block; }
.nav-logo img { height: 72px; width: auto; min-width: 130px; object-fit: contain; display: block; }
@media (max-width: 900px) { .nav-logo img { height: 56px; min-width: 100px; } }
