/* Portfolio layout. */
html { scroll-behavior: smooth; }
#portfolio, #onboarding, #contact { scroll-margin-top: 24px; }
.landing-left-half { min-width: 0; gap: 24px; }
h1.site-header { max-width: 24ch; margin: 0; font-size: clamp(3.6rem, 2.4rem + 2.6vw, 5.4rem); letter-spacing: -.03em; text-wrap: balance; }
p.landing-subtext { max-width: 40ch; margin: 0; font-size: clamp(1.9rem, 1.4rem + .75vw, 2.3rem); line-height: 1.55; text-wrap: pretty; }
#steps-container.replacement-howto { gap: 40px; padding-bottom: 32px; }
.replacement-howto #steps-header { padding-top: 8px; }
.replacement-howto #portfolio { margin: 0; padding: 0 24px; text-align: center; font-size: clamp(2.8rem, 2.5rem + 1vw, 3.6rem); font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.onboarding-note {
  position: absolute;
  bottom: 62px;
  right: calc(100% + 12px);
  color: #fff;
  font-family: "Noteworthy", "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 1;
}
.onboarding-note svg { width: 135px; height: 81px; position: absolute; bottom: 40px; left: 30px; }
.onboarding-note path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.landing-right-half { transform: translateY(-20px); }
.hello-hand { font-size: .88em; }
.diary-appstore { display: block; margin: 0; padding-top: 8px; align-self: flex-start; }
.diary-appstore img { display: block; width: 160px; height: auto; }
@media (max-width: 699px) {
  .landing-left-half { padding: 48px 24px 128px; gap: 20px; }
  .landing-right-half { transform: none; }
  .onboarding-carousel { margin-bottom: 60px; }
  .onboarding-note { top: -76px; bottom: auto; right: auto; left: 12px; font-size: 18px; }
  .onboarding-note svg { width: 112px; height: 67px; left: 112px; top: 16px; bottom: auto; transform: rotate(75deg); }
}

/* Keep the card spacing consistent. */
.container.portfolio-piece { padding: 0; }
.portfolio-piece .steps-row { width: 100%; max-width: none; padding: 32px 24px 0; gap: 28px; }
.portfolio-piece .step-first-half, .portfolio-piece .step-second-half { min-width: 0; margin: 0; padding: 0; }
.portfolio-piece .shift-step { height: 65%; min-height: min-content; margin-top: 0 !important; padding: 0; gap: 16px; }
.portfolio-piece .shift-step h3 { max-width: 30ch; margin: 0; font-size: clamp(2.6rem, 2.1rem + .9vw, 3.2rem); font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.portfolio-piece .shift-step p { max-width: 44ch; margin: 0; font-size: 1.8rem; line-height: 1.6; text-wrap: pretty; }
.portfolio-piece .step-second-half { overflow: hidden; align-items: flex-start; }
.audio-diary-card .steps-row { padding-bottom: 32px; }
.audio-diary-card .step-first-half { display: flex; align-items: center; }
.audio-diary-card .shift-step { height: auto; }
.audio-diary-card .step-second-half { align-items: center; }
.audio-diary-video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: min(4vw, 18px); background: #111; }
.portfolio-iphone { position: relative; flex: none; width: 300px; margin: 0 auto -13px; }
.mockups-card .step-second-half { overflow: visible; }
.mockups-carousel { --arrow-color: #1252a7; display: flow-root; position: relative; width: 100%; }
.mockup-slide { position: absolute; inset: 0; }
.iphone-hardware { display: block; width: 100%; height: auto; }
.iphone-display { position: absolute; left: 7.95%; top: 4.1%; width: 84.1%; height: 92.1%; overflow: hidden; border-radius: 14% / 6.5%; background: #fff; }
.portfolio-screen { display: block; width: 100%; height: 100%; object-fit: fill; }
.iphone-status { position: absolute; top: 0; left: 0; width: 100%; height: auto; }
.more-portfolio { background: white; padding: 0 24px 48px; text-align: center; font-size: 2rem; line-height: 1.5; }
.more-portfolio a { display: block; max-width: 56ch; margin: 0 auto; padding: 16px; background: transparent; color: #1252a7; border-radius: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-wrap: pretty; }
.more-portfolio a:hover { color: #0d3f82; }
.portfolio-footer { padding: 48px 24px 24px; text-align: center; background: #1252a7; }
.personal-footer-links { display: flex; justify-content: center; align-items: center; gap: 28px; margin-bottom: 24px; font-size: 1.8rem; line-height: 1.5; }
.personal-footer-links a { width: auto; min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: white; font-weight: 400; }
.personal-footer-message { max-width: 64ch; margin: 0 auto 24px; font-size: 1.8rem; line-height: 1.65; color: white; text-wrap: pretty; }
.personal-copyright { margin: 0; font-size: 1.6rem; color: white; }
.diary-appstore:focus-visible, .more-portfolio a:focus-visible, .personal-footer-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.onboarding-carousel { position: relative; flex: none; padding: 0 36px; }
.hero-phone { position: relative; width: min(294px, calc(100vw - 96px)); filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, .4)); }
.onboarding-screen { display: block; width: 100%; height: 100%; }
.carousel-slide { opacity: 0; transition: opacity 250ms ease; }
.carousel-slide.is-active { opacity: 1; }
.carousel-arrow { position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--arrow-color, white); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.carousel-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel-prev { left: -36px; }
.carousel-next { right: -36px; }
.carousel-arrow:hover, .carousel-arrow:focus { color: var(--arrow-color, white); }
.carousel-arrow:active { transform: scale(.97); }
.carousel-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.phone-carousel:has(:focus-visible) .carousel-arrow { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .phone-carousel:hover .carousel-arrow { opacity: 1; pointer-events: auto; }
}
@media (hover: none) {
  .carousel-arrow { opacity: 1; pointer-events: auto; }
}
@media (pointer: coarse) {
  .carousel-arrow::before { content: ""; position: absolute; inset: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-slide, .carousel-arrow { transition: none; }
  .carousel-arrow { opacity: 1; pointer-events: auto; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .waves { margin-top: 0; }
  .hero-phone { width: 240px; }
  .onboarding-carousel { padding: 0 24px; }
  .carousel-prev { left: -24px; }
  .carousel-next { right: -24px; }
}
@media (min-width: 800px) {
  .portfolio-piece .steps-row { flex-wrap: nowrap; padding: 40px 40px 0; gap: 32px; }
  .portfolio-piece .step-first-half { flex: 11 1 0; }
  .portfolio-piece .step-second-half { flex: 9 1 0; }
  .portfolio-piece .shift-step p { font-size: 2rem; }
  .audio-diary-card .steps-row { padding-bottom: 40px; }
  .portfolio-iphone { width: min(100%, 330px); margin-right: 0; margin-bottom: -13px; }
  .mockups-card .portfolio-iphone { width: min(100%, 280px); margin-bottom: -88px; }
}
.mockups-carousel .carousel-prev { left: -32px; }
.mockups-carousel .carousel-next { right: -32px; }
@media (max-width: 799px) {
  #steps-container.replacement-howto { gap: 32px; padding-bottom: 24px; }
  .portfolio-piece .shift-step { height: auto; }
  .portfolio-iphone { width: min(300px, 90%); }
  .more-portfolio { font-size: 1.8rem; padding-bottom: 40px; }
  .more-portfolio a { padding: 16px 0; }
  .portfolio-footer { padding-top: 40px; }
}
@media (min-width: 700px) and (max-width: 799px) {
  .mockups-card .steps-row { flex-wrap: nowrap; padding: 32px 32px 0; }
  .mockups-card .step-first-half { flex: 11 1 0; }
  .mockups-card .step-second-half { flex: 9 1 0; }
  .mockups-card .shift-step { height: 65%; }
  .mockups-card .portfolio-iphone { width: min(100%, 240px); margin-right: 0; margin-bottom: -64px; }
}
