/* =========================================================================
 * airbnb-messaging.css — page styles for work/airbnb-messaging.html
 *
 * Visual language: Airbnb's own product/marketing style — flat photo cards
 * with no drop shadow, a warm neutral #F7F7F7 in place of any tinted
 * section background, a single ink colour (#222) for all type instead of a
 * light/dark pair, nothing heavier than a regular (400) weight, generous
 * but tight-margined layout so imagery gets the most room, and the brand's
 * Rausch red used sparingly as the one accent (links, the CTA pill).
 *
 * The header/loader are the shared components (project-nav.css,
 * preloader.css) — nothing here touches them.
 * ========================================================================= */

:root {
  --am-ink: #222222;
  --am-line: rgba(34, 34, 34, 0.1);
  --am-tint: #f7f7f7;
  --am-card-bg: #efefef;
  --am-card-bg-on-tint: #ffffff;
  --am-accent: #ff385c;
  --am-radius: 14px;
  --am-gutter: 15px;
  --am-wrap-max: none;
  --am-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--am-ink);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
video { max-width: 100%; height: auto; display: block; }

/* -------------------------------------------------------------------------
 * Shell
 * Matches Bootstrap 4's .container exactly (same breakpoints, same 15px
 * padding) so this page's side margins line up with tal.html's, which is
 * built on Bootstrap's grid.
 * ---------------------------------------------------------------------- */
.am-wrap {
  max-width: var(--am-wrap-max);
  margin: 0 auto;
  padding-left: var(--am-gutter);
  padding-right: var(--am-gutter);
}

@media screen and (min-width: 576px) {
  :root { --am-wrap-max: 540px; }
}

@media screen and (min-width: 768px) {
  :root { --am-wrap-max: 720px; }
}

@media screen and (min-width: 992px) {
  :root { --am-wrap-max: 960px; }
}

@media screen and (min-width: 1200px) {
  :root { --am-wrap-max: 1140px; }
}

.am-section {
  padding: 84px 0;
}

.am-section--tint {
  padding: 84px 0;
  background: var(--am-tint);
}

@media screen and (max-width: 992px) {
  .am-section, .am-section--tint { padding: 60px 0; }
}

@media screen and (max-width: 768px) {
  .am-section, .am-section--tint { padding: 48px 0; }
}

/* -------------------------------------------------------------------------
 * Type — nothing above 400 weight, one text colour throughout. Hierarchy
 * comes from size and from opacity on the ink colour, never from a second
 * hue or a heavier weight.
 * ---------------------------------------------------------------------- */
.am-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f40060;
}

.am-hero-title {
  margin: 0 0 22px;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--am-ink);
}

.am-section-title {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--am-ink);
}

.am-subhead {
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: #222222;
}

.am-body p {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: #222222;
}

.am-body p:last-child { margin-bottom: 0; }

.am-body b, .am-body strong {
  color: #f40060;
  font-weight: 500;
  text-decoration: none;
}

.am-body a {
  color: var(--am-ink);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: rgba(34, 34, 34, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--am-ease);
}

.am-body a:hover {
  text-decoration-color: var(--am-accent);
}

.am-note {
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(34, 34, 34, 0.55);
}

/* Overview intro — centered, narrow column, same shape as the Airbnb
 * Newsroom release-post treatment (centered headline + centered lede). */
.am-overview-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* The Overview screenshot sits below that narrow column but should read
 * as part of the same block, so it's held to the same width. */
.am-overview-text + img {
  max-width: 720px;
  margin: 32px auto 0;
}

/* Part 1 / Part 2 section intros — same centered-column treatment as
 * .am-overview-text, plus a media block held to the same width so the
 * video reads as part of the same column instead of a full-bleed strip. */
.am-part-intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.am-part-intro .am-subhead {
  margin-left: auto;
  margin-right: auto;
}

/* .am-eyebrow is a flex container, so it ignores the text-align:center it
 * inherits here — flex layout only listens to justify-content. Without
 * this, the eyebrow sits flush left while the heading below it centers. */
.am-overview-text .am-eyebrow,
.am-part-intro .am-eyebrow {
  justify-content: center;
}

/* Unlike .am-part-intro, the media block is meant to fill the page's
 * normal content width (.am-wrap), not the narrow text column — a big
 * screen recording reads better large than boxed to paragraph width. */
.am-part-media {
  margin: 40px auto 0;
}

@media screen and (max-width: 768px) {
  .am-section-title { font-size: 1.4rem; }
  .am-body p { font-size: 1.08rem; }
  .am-subhead { font-size: 1.08rem; }
}

/* -------------------------------------------------------------------------
 * Hero
 * White background, text and art split left/right — same shape as a
 * typical Figma marketing hero, translated to this case study.
 * ---------------------------------------------------------------------- */
.am-hero {
  padding: 152px 0 72px;
  background: #fff;
}

@media screen and (max-width: 768px) {
  .am-hero { padding: 100px 0 40px; }
}

.am-hero__art {
  text-align: center;
}

.am-hero__art img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
}

.am-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--am-line);
}

.am-hero__meta div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.am-hero__meta dt {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, 0.5);
}

.am-hero__meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--am-ink);
}

/* -------------------------------------------------------------------------
 * Placeholder artwork — flat, no shadow, no border.
 *
 * A stand-in image (assets/images/messaging/placeholder.png) is dropped in
 * via background so the page can be reviewed with something photographic
 * in every slot; `cover` + `center` lets one landscape image fill hero,
 * wide, square and tall crops alike without distortion. The icon/label
 * pair stays in the markup (for when the image is swapped back out to a
 * true empty state) but is hidden while the image is showing.
 * ---------------------------------------------------------------------- */
.am-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border-radius: var(--am-radius);
  background: var(--am-card-bg) url(../images/messaging/placeholder.png) center / cover no-repeat;
  color: rgba(34, 34, 34, 0.4);
  overflow: hidden;
}

.am-section--tint .am-placeholder {
  background-color: var(--am-card-bg-on-tint);
}

.am-placeholder svg, .am-placeholder span { display: none; }

.am-placeholder img,
.am-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.am-placeholder--hero  { aspect-ratio: 16 / 9; }
.am-placeholder--wide  { aspect-ratio: 16 / 10; }
.am-placeholder--square{ aspect-ratio: 1 / 1; }
.am-placeholder--tall  { aspect-ratio: 4 / 5; }

/* -------------------------------------------------------------------------
 * Two-column feature rows (image + text)
 * ---------------------------------------------------------------------- */
.am-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.am-grid-2 + .am-grid-2 {
  margin-top: 88px;
}

.am-grid-2--reverse .am-grid-2__text { order: 2; }
.am-grid-2--reverse .am-grid-2__art  { order: 1; }

.am-grid-2--40-60 {
  grid-template-columns: 4fr 6fr;
}

@media screen and (max-width: 900px) {
  .am-grid-2 {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .am-grid-2--reverse .am-grid-2__text,
  .am-grid-2--reverse .am-grid-2__art { order: initial; }
  .am-grid-2 + .am-grid-2 { margin-top: 48px; }
}

.am-grid-2 ul {
  margin: 0;
  padding-left: 1.15em;
}

.am-grid-2 li {
  margin-bottom: 0.75em;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.82);
}

.am-grid-2 li:last-child { margin-bottom: 0; }

.am-grid-2__art video {
  border-radius: 24px;
}

/* -------------------------------------------------------------------------
 * Three-across image grid — image on top, a short label underneath.
 * ---------------------------------------------------------------------- */
.am-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

@media screen and (max-width: 900px) {
  .am-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 560px) {
  .am-grid-3 { grid-template-columns: 1fr; }
}

.am-grid-3__item .am-placeholder {
  aspect-ratio: 1 / 1;
  margin-bottom: 18px;
}

.am-grid-3__item h3 {
  margin: 0 0 6px;
  padding-top: 12px;
  font-size: 1.02rem;
  font-weight: 400;
  color: var(--am-ink);
}

.am-grid-3__item p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(34, 34, 34, 0.68);
}

/* -------------------------------------------------------------------------
 * Three-across grid variant — a small fixed-size icon beside its title/body
 * instead of a wide image on top.
 * ---------------------------------------------------------------------- */
.am-grid-3--icon-row .am-grid-3__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.am-grid-3--icon-row .am-grid-3__item img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}

.am-grid-3--icon-row .am-grid-3__item h3 {
  padding-top: 0;
}

/* -------------------------------------------------------------------------
 * Compare row — two large images side by side, each with its own title
 * and bullet list underneath. Same shape as a spec-sheet "A vs B" layout.
 * ---------------------------------------------------------------------- */
.am-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

@media screen and (max-width: 768px) {
  .am-compare { grid-template-columns: 1fr; gap: 40px; }
}

.am-compare__item .am-placeholder {
  aspect-ratio: 4 / 3;
  margin-bottom: 22px;
}

.am-compare__item h3 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--am-ink);
}

.am-compare__item ul {
  margin: 0;
  padding-left: 1.15em;
}

.am-compare__item li {
  margin-bottom: 0.6em;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.72);
}

.am-compare__item li:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------
 * Outcome badges
 * ---------------------------------------------------------------------- */
.am-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

@media screen and (max-width: 768px) {
  .am-badges { grid-template-columns: 1fr; gap: 14px; }
}

.am-badge {
  padding: 26px 24px;
  border-radius: var(--am-radius);
  background: #ffffff;
  border: 1px solid var(--am-line);
}

.am-badge p {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--am-ink);
}

/* -------------------------------------------------------------------------
 * Buttons / links — the one place brand red shows up.
 * ---------------------------------------------------------------------- */
.am-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--am-accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.25s var(--am-ease), transform 0.25s var(--am-ease);
}

.am-btn:hover {
  background: #e31c5f;
  transform: translateY(-2px);
  color: #fff;
}

.am-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--am-ink);
  text-decoration: underline;
  text-decoration-color: rgba(34, 34, 34, 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s var(--am-ease), text-decoration-color 0.2s var(--am-ease);
}

.am-link:hover {
  color: var(--am-accent);
  text-decoration-color: var(--am-accent);
}

.am-cta {
  text-align: center;
}

.am-cta .am-section-title { margin-bottom: 30px; }

/* -------------------------------------------------------------------------
 * FAQ accordion
 * ---------------------------------------------------------------------- */
.am-faq {
  max-width: 760px;
}

.am-faq details {
  border-bottom: 1px solid var(--am-line);
  padding: 24px 0;
}

.am-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--am-ink);
  list-style: none;
}

.am-faq summary::-webkit-details-marker { display: none; }

.am-faq summary::after {
  content: '+';
  flex: 0 0 auto;
  font-size: 1.4rem;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.45);
  transition: transform 0.3s var(--am-ease);
}

.am-faq details[open] summary::after {
  transform: rotate(45deg);
}

.am-faq .am-body {
  margin-top: 14px;
}

/* -------------------------------------------------------------------------
 * Accessibility
 * ---------------------------------------------------------------------- */
.am-btn:focus-visible,
.am-link:focus-visible,
.am-faq summary:focus-visible {
  outline: 2px solid var(--am-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .am-btn { transition: none; }
}
