/* Omantel case study, part 1: tokens, hero, meta strip, statement, bento
   and "a day in the service team". Part 2: case-omantel-2.css. */

@keyframes om-pulse {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  30% { opacity: .5; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

@keyframes om-blink {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0; }
}

:root {
  --accent: #f7941d;
  --om-navy: #071a33;
  --cs-ink: #0b1424;
  --cs-muted: #4c5669;
  --cs-faint: #6b7586;
  --cs-line: rgb(11 20 36 / 10%);
  --cs-bg: #f4f6f9;
  --cs-dark: #071a33;
  --cf-dots: rgb(11 20 36 / 9%);
  --cf-glow: rgb(247 148 29 / 22%);
  --cf-shadow: rgb(7 26 51 / 25%);
  --cf-btn: #071a33;
  --cf-btn-icon-fg: #0b1424;
  --cf-sent: #071a33;
  --cf-sent-fg: #f7941d;
}

a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.om-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: clamp(620px, min(100vh, 56vw), 900px);
  overflow: hidden;
  padding: clamp(56px, 7vw, 104px) var(--gutter) 0;
  background: var(--om-navy);
  color: var(--white);
  text-align: center;
}
.om-arc { position: absolute; top: 38%; left: 50%; width: 900px; height: 900px; border: 1.5px solid rgb(31 182 232 / 50%); border-radius: 50%; animation: om-pulse 6s ease-out infinite; pointer-events: none; }
.om-arc--2 { animation-delay: 2s; }
.om-arc--3 { border-color: rgb(247 148 29 / 45%); animation-delay: 4s; }
.om-hero__text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; will-change: transform, opacity; }
.om-hero__logo { width: auto; height: 52px; margin-bottom: 28px; }
.om-hero__title { max-width: 1200px; font-weight: 600; font-size: clamp(40px, 5.6vw, 100px); line-height: .95; letter-spacing: -.05em; text-wrap: balance; }
.om-hero__lead { max-width: 620px; margin-top: 20px; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.6; color: rgb(255 255 255 / 72%); }
.om-hero__media { position: absolute; inset: 0 0 -40px; z-index: 1; will-change: transform; }
.om-hero__img { object-position: center bottom; }
.om-hero__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(7 26 51 / 85%) 0%, rgb(7 26 51 / 40%) 30%, transparent 50%); pointer-events: none; }

/* ---------- meta strip ---------- */

.om-meta { padding: 26px var(--gutter); border-bottom: 1px solid rgb(11 20 36 / 8%); background: var(--white); }
.om-meta__list { justify-content: space-between; gap: 14px 40px; max-width: var(--maxw); margin: 0 auto; font-size: 15px; }
.om-meta__list div { gap: 10px; }
.om-meta__list dt { color: var(--cs-faint); }

/* ---------- statement ---------- */

.om-statement { padding-block: 160px; }
.om-statement__text { max-width: 1240px; margin: 0 auto; font-weight: 500; font-size: clamp(26px, 3.5vw, 58px); line-height: 1.22; letter-spacing: -.03em; text-wrap: pretty; }
.om-statement__text span { transition: color .3s ease; }
.om-statement__text span.is-dim { color: #c7ced9; }

/* ---------- bento ---------- */

.om-bento-wrap { padding-top: 0; padding-bottom: 160px; }
.om-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 16px; max-width: var(--maxw); margin: 0 auto; }
.om-tile { position: relative; overflow: hidden; border-radius: 32px; background: #e6eef8; }
.om-tile--map { grid-column: span 2; grid-row: span 2; }
.om-tile--map img { object-position: 58% 50%; }
.om-tile--story { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; grid-column: span 2; padding: 32px; }
.om-tile--story img { object-position: right center; pointer-events: none; }
.om-tile--story h2 { position: relative; max-width: 50%; font-weight: 600; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.02em; }
.om-tile--story p { position: relative; max-width: 46%; font-size: 15px; }
.om-tile--navy { background: var(--om-navy); color: var(--white); }
.om-tile--navy p { color: rgb(255 255 255 / 70%); }
.om-tile--orange { background: var(--accent); color: var(--cs-ink); }
.om-tile--orange h2 { max-width: 52%; }
.om-tile--orange p { color: rgb(11 20 36 / 80%); }
.om-tile--icon { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; background: var(--white); box-shadow: 0 0 0 1px rgb(11 20 36 / 6%); }
.om-tile--icon h2 { font-weight: 600; font-size: 19px; line-height: 1.25; }
.om-tile__icon { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 24px; background: #fef0de; }
.om-tile--fibre { background: #dceffa; }
.om-tile--fibre img { object-position: 40% 45%; }
.om-tile--building { background: #fef0de; }
.om-tile--building img { object-position: 52% 50%; }
.om-tile--tower img { object-position: 72% 50%; }

/* ---------- a day in the service team ---------- */

.om-day { padding-block: 140px; }
.om-day__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 96px; }
.om-day__art { position: relative; }
.om-day__frame { position: sticky; top: 12vh; height: 76vh; overflow: hidden; border-radius: 32px; background: #0c2547; }
.om-day__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1s cubic-bezier(.4, 0, .2, 1), transform 1.4s var(--ease); }
.om-day__frame img.is-on { opacity: 1; transform: none; }
.om-day__dots { position: absolute; bottom: 24px; left: 24px; display: flex; gap: 8px; }
.om-day__dots span { width: 10px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / 35%); transition: all .4s ease; }
.om-day__dots span.is-on { width: 32px; background: var(--accent); }
.om-day__copy { display: flex; flex-direction: column; }
.om-day__title { margin-bottom: 40px; }

.om-day__list li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 52vh;
  border-top: 1px solid rgb(255 255 255 / 12%);
  opacity: .3;
  transition: opacity .8s cubic-bezier(.4, 0, .2, 1);
}
.om-day__list li.is-on { opacity: 1; }
.om-day__when { display: flex; align-items: center; gap: 10px; font-size: 15px; color: rgb(255 255 255 / 50%); transition: color .5s ease; }
.om-day__when::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.is-on .om-day__when { color: var(--accent); }
.om-day__list h3 { font-weight: 600; font-size: clamp(26px, 2.6vw, 42px); line-height: 1.12; letter-spacing: -.03em; }
.om-day__list h3 + p { max-width: 480px; font-size: 17px; line-height: 1.65; color: rgb(255 255 255 / 70%); }

@media (max-width: 1024px) {
  .om-statement,
  .om-day { padding-block: 104px; }
  .om-bento-wrap { padding-bottom: 104px; }
}

@media (max-width: 1000px) {
  .om-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}

@media (max-width: 900px) {
  .om-day__grid { grid-template-columns: 1fr; }
  .om-day__art { display: none; }
  .om-day__list li { min-height: 0; padding: 40px 0; }
}

@media (max-width: 720px) {
  .om-hero { height: auto; min-height: 640px; padding-top: 56px; }
  .om-hero__media { top: 56px; }
  .om-hero__img { object-position: 28% bottom; }
  .om-statement,
  .om-day { padding-block: 72px; }
  .om-bento-wrap { padding-bottom: 72px; }
}

@media (max-width: 600px) {
  .om-bento { grid-template-columns: 1fr; grid-auto-rows: minmax(180px, auto); }
  .om-bento > * { grid-column: auto; grid-row: auto; }
  .om-bento > :first-child { aspect-ratio: 4 / 3; }

  /* Story tiles: text across the top, the illustration below it rather than under the text. */
  .om-tile--story { justify-content: flex-start; min-height: 340px; padding: 28px 24px; }
  .om-tile--story img { inset: auto 0 0; height: 58%; object-position: right bottom; }
  .om-tile--story h2,
  .om-tile--story p,
  .om-tile--orange h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .om-arc { opacity: .2; animation: none; }
}
