/* Welcome landing page styles — shared by Welcome.html and Welcome.jp.html.
   Japanese-only rules sit at the bottom under :lang(ja). */

:root {
  --indeed-blue: #003a9b;
  /* Hover blue close to indeed.com / IFL bundle (#2557a7 family) */
  --indeed-blue-hover: #2557a7;
  --indeed-blue-active: #1a4a8a;
  --indeed-secondary-hover: #0d5aa3;
  --welcome-radius: 0.5rem;
  --welcome-card-title-em: 1.22;
}

/* Avoid horizontal scroll; keep content within the viewport width */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* Limit iOS text auto-zoom and curb horizontal rubber-banding */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-x: none;
}

main#main-content {
  min-width: 0;
  max-width: 100%;
}

/* Bootstrap .container caps stop at 540/720/960/1140 from sm+; in phone landscape
   that column stays too narrow. Use full width until xl, then 1140px. */
.container.welcome-shell {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-width: 100%;
  /* Side padding plus safe areas so content doesn't sit flush on notched devices */
  padding-left: max(1.15rem, env(safe-area-inset-left, 0) + 0.5rem);
  padding-right: max(1.15rem, env(safe-area-inset-right, 0) + 0.5rem);
}
@media (min-width: 576px) {
  .container.welcome-shell {
    padding-left: max(1.15rem, env(safe-area-inset-left, 0) + 0.4rem);
    padding-right: max(1.15rem, env(safe-area-inset-right, 0) + 0.4rem);
  }
}
@media (min-width: 768px) {
  .container.welcome-shell {
    padding-left: max(1.25rem, env(safe-area-inset-left, 0) + 0.35rem);
    padding-right: max(1.25rem, env(safe-area-inset-right, 0) + 0.35rem);
  }
}
@media (min-width: 1200px) {
  .container.welcome-shell {
    max-width: 1140px;
  }
}

/* Visually hidden until focus; avoid left:-9999px (widens scroll width on iOS) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  z-index: 2000;
  background-color: var(--indeed-blue, #003a9b);
  color: #fff;
  font-weight: 600;
  border-radius: var(--welcome-radius, 0.5rem);
  text-decoration: none;
  line-height: 1.4;
}
.skip-link:focus {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left, 0));
  top: max(0.5rem, env(safe-area-inset-top, 0));
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

body {
  color: #212326;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
  line-height: 1.65;
}
@media (max-width: 991.98px) {
  body {
    touch-action: pan-y;
  }
}

.welcome-lede a,
.welcome-lede a:visited {
  color: var(--indeed-blue, #003a9b);
  text-decoration: underline;
  text-underline-offset: 0.24em;
  text-decoration-skip-ink: none;
}
.welcome-lede a:hover,
.welcome-lede a:focus {
  color: var(--indeed-blue-hover, #2557a7);
}
.welcome-lede a:focus {
  outline: 2px solid var(--indeed-blue, #003a9b);
  outline-offset: 2px;
  border-radius: 2px;
}

#page-title {
  line-height: 1.2;
  font-weight: 600;
  font-size: clamp(1.05rem, 0.35rem + 2.5vw, 1.5rem);
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 100%;
  box-sizing: border-box;
}
.welcome-lede h2#page-title {
  margin-bottom: 1rem;
}

.welcome-lede p {
  line-height: 1.8;
  max-width: min(100%, 60rem);
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(0.92rem, 0.1rem + 0.5vw, 1rem);
  text-wrap: balance;
}
@supports (text-wrap: pretty) {
  .welcome-lede p {
    text-wrap: pretty;
  }
}

.welcome-step-img {
  display: block;
  overflow: hidden;
  border-radius: var(--welcome-radius, 0.5rem);
  aspect-ratio: 4 / 3;
  background: #e9ecef;
}
.welcome-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Below the desktop grid: 16:9 step images so they don't dominate the column */
@media (max-width: 991.98px) {
  .welcome-step-img {
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 767.98px) {
  .welcome-step-img {
    max-height: 16rem;
  }
}
/* Tablet / mid-width single-column (e.g. iPad 11" portrait, narrow desktop windows):
   cap step elements so images don't dominate, but stay wide enough to fill the column */
@media (min-width: 768px) and (max-width: 991.98px) {
  .welcome-steps-grid > .welcome-step-img,
  .welcome-steps-grid > .welcome-step-prose-cell,
  .welcome-steps-grid > .action-stack,
  .welcome-steps-grid > .welcome-step-action-secondary {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

.welcome-card-prose {
  line-height: 1.8;
  text-align: left;
  font-size: clamp(0.82rem, 0.1rem + 0.35vw, 0.95rem);
  margin: 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: wrap;
  box-sizing: border-box;
  padding: 1.45em 1.32em;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--welcome-radius, 0.5rem);
}
.welcome-card-prose p {
  max-width: 100%;
  text-wrap: balance;
}
@supports (text-wrap: pretty) {
  .welcome-card-prose p {
    text-wrap: pretty;
  }
}
@media (min-width: 992px) {
  .welcome-card-prose {
    padding: 1.6em 1.45em 1.7em;
  }
  .welcome-step-prose-cell .welcome-card-prose {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-height: 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }
  .welcome-card-prose p + p {
    margin-top: 0.35rem;
  }
}

.welcome-card-title {
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #0f2140;
  font-size: calc(var(--welcome-card-title-em, 1.22) * 1em);
  margin: 0 0 0.6rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(0, 58, 155, 0.2);
  text-rendering: optimizeLegibility;
  max-width: 100%;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* 12 children: lg = images | prose | primary | secondary.
   Narrow: flex+order = one step at a time. */
.welcome-steps-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 991.98px) {
  .welcome-steps-grid > :nth-child(1)  { order: 1; }
  .welcome-steps-grid > :nth-child(2)  { order: 5; }
  .welcome-steps-grid > :nth-child(3)  { order: 9; }
  .welcome-steps-grid > :nth-child(4)  { order: 2; }
  .welcome-steps-grid > :nth-child(5)  { order: 6; }
  .welcome-steps-grid > :nth-child(6)  { order: 10; }
  .welcome-steps-grid > :nth-child(7)  { order: 3; }
  .welcome-steps-grid > :nth-child(8)  { order: 7; }
  .welcome-steps-grid > :nth-child(9)  { order: 11; }
  .welcome-steps-grid > :nth-child(10) { order: 4; }
  .welcome-steps-grid > :nth-child(11) { order: 8; }
  .welcome-steps-grid > :nth-child(12) { order: 12; }
  .welcome-steps-grid > :nth-child(2),
  .welcome-steps-grid > :nth-child(3) {
    margin-top: 1rem;
  }
}
@media (min-width: 992px) {
  .welcome-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto auto;
    row-gap: 0.5rem;
    column-gap: 1.1rem;
  }
  .welcome-steps-grid > * {
    order: 0;
    margin-top: 0;
  }
  .welcome-steps-grid > :nth-child(1)  { grid-column: 1; grid-row: 1; }
  .welcome-steps-grid > :nth-child(2)  { grid-column: 2; grid-row: 1; }
  .welcome-steps-grid > :nth-child(3)  { grid-column: 3; grid-row: 1; }
  .welcome-steps-grid > :nth-child(4)  { grid-column: 1; grid-row: 2; }
  .welcome-steps-grid > :nth-child(5)  { grid-column: 2; grid-row: 2; }
  .welcome-steps-grid > :nth-child(6)  { grid-column: 3; grid-row: 2; }
  .welcome-steps-grid > :nth-child(7)  { grid-column: 1; grid-row: 3; }
  .welcome-steps-grid > :nth-child(8)  { grid-column: 2; grid-row: 3; }
  .welcome-steps-grid > :nth-child(9)  { grid-column: 3; grid-row: 3; }
  .welcome-steps-grid > :nth-child(10) { grid-column: 1; grid-row: 4; }
  .welcome-steps-grid > :nth-child(11) { grid-column: 2; grid-row: 4; }
  .welcome-steps-grid > :nth-child(12) { grid-column: 3; grid-row: 4; }
  .welcome-step-img {
    align-self: stretch;
  }
}

.welcome-step-prose-cell {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  container-type: inline-size;
}
@media (min-width: 992px) {
  .welcome-step-prose-cell {
    min-height: 0;
  }
  .welcome-step-prose-cell .welcome-card-prose {
    flex: 1 1 auto;
  }
}
@supports (font-size: 1cqi) {
  .welcome-step-prose-cell .welcome-card-prose {
    font-size: clamp(0.78rem, 0.1rem + 3.4cqi, 0.95rem);
  }
}
@supports not (font-size: 1cqi) {
  .welcome-step-prose-cell .welcome-card-prose {
    font-size: clamp(0.8rem, 0.1rem + 0.5vi, 0.95rem);
  }
}

.welcome-step-action-secondary:empty {
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.welcome-step-img,
.action-stack,
.welcome-step-action-secondary {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.action-stack {
  margin-top: 0;
}
.action-stack .btn {
  max-width: 100%;
  word-break: break-word;
}
.action-stack .btn-lg {
  padding: 0.65rem 1rem;
  font-size: clamp(0.88rem, 0.1rem + 0.2vw, 1rem);
  font-weight: 700;
  white-space: normal;
  border-radius: var(--welcome-radius, 0.5rem);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.action-stack > .btn + .btn {
  margin-top: 0.5rem;
}

.welcome-banner {
  max-width: 100%;
  height: auto;
}
@media (min-width: 992px) {
  /* Like mobile: use full width and natural aspect ratio; do not crop the banner */
  .welcome-banner-wrap {
    border-radius: var(--welcome-radius, 0.5rem);
    overflow: hidden;
  }
  .welcome-banner-wrap .welcome-banner {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

.btn-welcome-primary {
  background-color: var(--indeed-blue, #003a9b);
  color: #fff;
  border-color: var(--indeed-blue, #003a9b);
}
.btn-welcome-primary:hover,
.btn-welcome-primary:focus {
  background-color: var(--indeed-blue-hover, #2557a7);
  border-color: var(--indeed-blue-hover, #2557a7);
  color: #fff;
}
.btn-welcome-primary:active {
  background-color: var(--indeed-blue-active, #1a4a8a);
  border-color: var(--indeed-blue-active, #1a4a8a);
  color: #fff;
}
.btn-welcome-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 87, 167, 0.4);
}

.btn-welcome-secondary {
  background-color: #0065bd;
  color: #fff;
  border-color: #0065bd;
}
.btn-welcome-secondary:hover,
.btn-welcome-secondary:focus {
  background-color: var(--indeed-secondary-hover, #0d5aa3);
  border-color: var(--indeed-secondary-hover, #0d5aa3);
  color: #fff;
}
.btn-welcome-secondary:active {
  background-color: #0a4d8f;
  border-color: #0a4d8f;
  color: #fff;
}
.btn-welcome-secondary:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 101, 189, 0.4);
}

/* ---------- Japanese page overrides ---------- */
:lang(ja) body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "Noto Sans JP", Meiryo, sans-serif;
  line-break: strict;
  word-break: keep-all;
}
:lang(ja) #page-title {
  line-height: 1.3;
  word-break: keep-all;
  line-break: strict;
}
:lang(ja) .welcome-lede p {
  line-height: 1.85;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
  text-align: center;
}
:lang(ja) .welcome-card-prose {
  word-break: keep-all;
  line-break: strict;
}
/* Relax kinsoku slightly so narrow columns don't drag a long chunk to the next line */
:lang(ja) .welcome-card-prose p {
  line-break: normal;
}
:lang(ja) .welcome-card-title {
  word-break: normal;
  line-break: auto;
}
:lang(ja) .welcome-card-text--note {
  color: #4a4a4a;
  font-size: 0.9em;
  line-height: 1.75;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}
