/* Image frames shared by the Explore stories and selected Verticals. */
.ed-photo { min-width: 0; margin: 0; }
.ed-photo-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.ed-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* .story-body img caps story images at 26rem; a photo frame is sized by its own aspect ratio, so the photo fills it */
.story-body .ed-photo-frame img { max-width: none; }
.ed-photo-placeholder {
  display: grid;
  height: 100%;
  box-sizing: border-box;
  place-items: center;
  padding: var(--space-2);
  border: 1px dashed var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: var(--fs-small);
  text-align: center;
}
.ed-photo figcaption { margin-top: .6rem; color: var(--muted); font-size: var(--fs-small); line-height: 1.45; }
.ed-photo--breakout .ed-photo-frame { aspect-ratio: 3 / 2; }
.ed-photo--portrait .ed-photo-frame { aspect-ratio: 4 / 5; }
.ed-photo--portrait img { object-fit: contain; }
.ed-photo--pair-small .ed-photo-frame { aspect-ratio: 4 / 5; }
.ed-photo-pair { display: grid; gap: var(--space-2); align-items: start; margin-block: var(--space-4); }
.ed-photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); margin-block: var(--space-4); }
.ed-photo-strip:focus-visible { outline: 2px solid var(--clay); outline-offset: 4px; }
.ed-strip-count { display: none; }
.ed-connect-jump { display: none; }

/* Shared Explore story template. */
.ed-explore .story-head {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-4) var(--space-2);
}
.ed-explore .story-head-media { order: 0; width: 100%; max-width: none; margin: 0; overflow: hidden; }
.ed-explore .story-head-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ed-explore .story-head-media figcaption { margin: .6rem 0 0; line-height: 1.45; }
.ed-explore .story-body { grid-template-columns: minmax(0, 1fr) minmax(0, 16rem); }
.ed-explore .story-body > .prose { min-width: 0; max-width: none; }
.ed-explore .story-body > .prose > p { max-width: var(--measure); }
.ed-explore .ed-photo--breakout { margin-block: var(--space-4); max-width: calc(1.3 * var(--measure)); }
.ed-explore .ed-practice { display: grid; gap: var(--space-3); align-items: start; margin-block: var(--space-4); }
.ed-explore .ed-practice h2 { margin-top: 0; }
.ed-explore .ed-practice li { padding-block: .3em; }
.ed-explore .rail { display: block; }

/* Targeted changes to selected Vertical pages. */
.ed-place .story-head { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-4); }
.ed-place .story-head-media { order: 0; width: 100%; max-width: none; margin: 0; overflow: hidden; }
.ed-place .story-head-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.ed-place--mayavadi .story-head-media img { object-position: 50% 62%; }
.ed-place--dhaanyam .story-head-media img { aspect-ratio: 5 / 4; }
.ed-place .rail .continue { display: grid; }
.ed-architecture-lead { display: grid; gap: var(--space-3); align-items: center; }
.ed-architecture-lead .ed-photo--portrait { max-width: 26rem; width: 100%; justify-self: end; }
.ed-architecture-lead .ed-photo-frame { aspect-ratio: 4 / 5; }
.ed-architecture-lead + .subnav { margin-top: var(--space-3); }
.ed-architecture-consultation { margin-top: var(--space-4); }
.ed-architecture-lead ~ .prose .ed-photo--breakout { margin-block: var(--space-4); }
.ed-vertical-cards.card-grid { grid-template-columns: minmax(0, 1fr); }
.ed-vertical-cards.lab-grid .card.is-hidden { display: none; }
.ed-vertical-cards .card-media .ed-photo-frame { aspect-ratio: 4 / 3; }
.ed-cupboard-photo.opener { margin-inline: 0; overflow: hidden; }
.ed-cupboard-photo.opener img { display: block; width: 100%; max-width: none; height: auto; max-height: none; aspect-ratio: 4 / 3; object-fit: cover; }

/* Connect keeps its existing type, colours and form fields. */
.ed-connect-text .ed-connect-head { margin-bottom: 0; }
.ed-connect-head a, .ed-connect-press a { text-decoration: underline; text-underline-offset: .2em; }
.ed-connect :is(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
.ed-connect a:hover { color: var(--clay); }
.ed-connect-text .ed-connect-information { display: grid; gap: var(--space-3); margin-bottom: var(--section-space); }
.ed-connect-directory { display: grid; gap: var(--space-4); min-width: 0; }
.ed-connect-directory h2, .ed-connect-press h2 { margin: 0; }
.ed-connect-channels, .ed-connect-doors { list-style: none; margin: 0; padding: 0; }
.ed-connect-channels li, .ed-connect-facts > div {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--space-1);
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-1);
}
.ed-connect-channels li > span:first-child, .ed-connect-facts dt {
  grid-column: 1 / -1;
  color: var(--clay);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
}
.ed-connect-channels a, .ed-connect-press a, .ed-connect-door a {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.ed-connect-channels a { font-size: var(--fs-lead); line-height: var(--lh-heading); }
.ed-connect-arrow { display: inline-block; flex: none; color: var(--clay); }
.ed-connect-facts { margin: 0; }
.ed-connect-facts dd { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; }
.ed-connect-facts dd .ed-copy { margin-inline-start: .5rem; }
.ed-copy {
  min-height: 44px;
  padding-inline: .6rem;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}
.ed-copy[hidden] { display: inline-block; visibility: hidden; }
.ed-copy:hover { border-color: var(--clay); color: var(--clay); }
.ed-copy-status { grid-column: 1 / -1; margin: 0; min-height: 1lh; font-size: var(--fs-small); color: var(--clay); }
.ed-connect-press { padding-block: var(--space-2); border-block: 1px solid var(--line); }
.ed-connect-press p { margin: 0; }
.ed-connect-routes { margin-block: var(--section-space); }
.ed-connect-text .ed-connect-doors { display: grid; grid-auto-rows: 1fr; gap: var(--space-2); }
.ed-connect-door { position: relative; border: 1px solid var(--line); min-width: 0; }
.ed-connect-door:is(:hover, :focus-within) { border-color: var(--clay); }
.ed-connect-text .ed-connect-door {
  display: grid;
  align-items: center;
  min-height: 7rem;
}
.ed-connect-text .ed-connect-door > div { padding: var(--space-1) var(--space-2); }
.ed-connect-text .ed-connect-door-single a { display: flex; justify-content: space-between; }
.ed-connect-text .ed-connect-door:focus-within { outline: 2px solid var(--clay); outline-offset: 3px; }
.ed-connect-door a { font-family: "Source Serif 4", Georgia, serif; font-size: var(--fs-h3); line-height: var(--lh-heading); }
.ed-connect-door-single a::after { position: absolute; inset: 0; content: ""; }
@media (min-width: 768px) {
  .ed-connect-text .ed-connect-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: var(--space-1) var(--space-4);
  }
  .ed-connect-text .ed-connect-directory > section { display: grid; grid-template-rows: auto 1fr; }
  .ed-connect-text :is(.ed-connect-channels, .ed-connect-facts) {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
  }
}
.ed-connect-accordion summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  list-style: none;
  cursor: pointer;
  padding-block: var(--space-2);
  font: 500 var(--fs-h3)/var(--lh-heading) "Source Serif 4", Georgia, serif;
}
.ed-connect-accordion summary::-webkit-details-marker { display: none; }
.ed-connect-accordion summary::before, .ed-connect-accordion summary::after { content: ""; position: absolute; right: 0; top: 50%; width: 1rem; height: 1px; background: currentColor; }
.ed-connect-accordion summary::after { rotate: 90deg; }
.ed-connect-accordion[open] summary::after { display: none; }
.ed-connect-accordion summary:hover { color: var(--clay); }
.ed-connect-accordion-body { padding-block: var(--space-1) var(--space-3); }
.ed-connect-message { display: grid; gap: var(--space-3); align-items: start; }
.ed-connect-message h2 { margin-top: 0; }
.ed-connect-message .dek { margin-bottom: var(--space-3); }
.ed-connect-write :is(input:not([type=hidden]), textarea) { min-height: 56px; border: 1px solid var(--line); }
.ed-connect-write .field-error { color: var(--clay); }
.ed-connect-write button[type="submit"]::after { content: ""; display: inline-block; width: .55em; height: .55em; margin-inline-start: .55em; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }

@media (min-width: 640px) {
  .ed-vertical-cards.card-grid, .ed-connect-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-photo-pair { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .ed-photo-pair .ed-photo--pair-small { margin-top: 48px; }
  .ed-connect-press { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
  .ed-connect-message { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
@media (min-width: 900px) {
  .ed-explore .ed-practice { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
  .ed-explore .ed-practice .ed-photo { position: sticky; top: calc(var(--header-height) + var(--space-2)); }
  .ed-explore .ed-practice > div { min-height: 31rem; }
  .ed-architecture-lead { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .ed-connect-doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 899.98px) {
  .ed-explore .story-body { grid-template-columns: minmax(0, 1fr); }
  .ed-architecture-lead .ed-photo--portrait { justify-self: start; }
}
@media (max-width: 639.98px) {
  .ed-explore .wrap, .ed-connect .wrap, .ed-place .wrap { width: calc(100% - 32px); }
  .ed-explore .story-head-media img { aspect-ratio: 4 / 3; }
  .ed-explore .story-head-media, .ed-explore .ed-photo--breakout { width: auto; margin-inline: -16px; }
  .ed-explore .story-head-media figcaption, .ed-explore .ed-photo--breakout figcaption { margin-inline: 16px; }
  .ed-photo-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .ed-photo-strip .ed-photo { scroll-snap-align: start; }
  .ed-strip-count { display: block; margin: calc(-1 * var(--space-3)) 0 var(--space-3); font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
  .ed-place .story-head { grid-template-columns: minmax(0, 1fr); }
  .ed-connect-channels a { font-size: var(--fs-body); }
  /* Architecture: the description, then the section links, then a landscape crop of the lead photo. The photo is not
     focusable, so the keyboard order (heading block, links, content) matches what is on screen. */
  .page-top:has(> .ed-architecture-lead) { display: flex; flex-direction: column; }
  .page-top > .ed-architecture-lead { display: contents; }
  .ed-architecture-lead > div { order: 1; }
  .page-top:has(> .ed-architecture-lead) > .subnav { order: 2; margin-top: 0; }
  .ed-architecture-lead > .ed-photo--portrait { order: 3; max-width: none; justify-self: stretch; margin-block: var(--space-3) 0; }
  .page-top:has(> .ed-architecture-lead) > .prose { order: 4; }
  .ed-architecture-lead .ed-photo-frame { aspect-ratio: 3 / 2; }
  .ed-architecture-lead .ed-photo--portrait img { object-fit: cover; }
  /* Connect: a jump to the message form sits right under the introduction */
  .ed-connect-jump { display: block; margin: 0 0 var(--space-2); }
  .ed-connect-jump a { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-weight: 600; }
}
@media (prefers-reduced-motion: no-preference) {
  .ed-explore .story-head-media img, .ed-place .story-head-media img, [data-ed-hero] img { animation: ed-hero-scale 2200ms ease-out both; }
  .ed-revealing { animation: ed-photo-rise 440ms cubic-bezier(.23, 1, .32, 1) both; }
  .ed-connect-arrow, .ed-connect-write button[type="submit"]::after { transition: translate 160ms ease-out; }
  @media (hover: hover) and (pointer: fine) {
    .ed-connect a:hover .ed-connect-arrow, .ed-connect-write button[type="submit"]:hover::after { translate: 3px 0; }
  }
  @supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    .ed-connect-accordion { interpolate-size: allow-keywords; }
    .ed-connect-accordion::details-content { block-size: 0; overflow: clip; transition: block-size 200ms cubic-bezier(.23, 1, .32, 1), content-visibility 200ms allow-discrete; }
    .ed-connect-accordion[open]::details-content { block-size: auto; }
  }
}
@keyframes ed-hero-scale { from { scale: 1.025; } to { scale: 1; } }
@keyframes ed-photo-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
