/*
  The Parikhs of Halol
  Subject: a father and son from Halol, Gujarat, and the three things they run.
  Palette: deep teal and beige. Teal carries the hero, the dark bands and every action.
           Beige is the ground, sand sets off the construction band, mist lifts text on teal.
  Type:    Anek Latin (Ek Type), one variable family. Condensed ExtraBold for names and
           headings, normal width for reading, expanded Light for the one tagline.
  Layout:  left-aligned on a 1200px wrap. The two names fill the hero. Each venture gets
           its own band and its own layout.
*/

@font-face {
  font-family: "Anek Latin";
  src: url("../fonts/anek-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --teal: #0f5c5a;
  --ink: #0d3334;
  --beige: #f1e9da;
  --sand: #e4d8c3;
  --mist: #9ed3cb;
  --white: #fffdf8;
  --slate: #4f6362;
  --hairline: rgba(13, 51, 52, 0.2);

  --font: "Anek Latin", "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);

  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2rem);
  --band: clamp(3.5rem, 2rem + 6vw, 7rem);
  --wrap: 75rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 1.5rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--beige);
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.display {
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title {
  font-size: var(--step-3);
}

.measure {
  max-width: 34rem;
}

/* Buttons and inline actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--teal);
  background: var(--teal);
  color: var(--beige);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--beige);
}

.btn--line {
  background: transparent;
  color: var(--teal);
}

.btn--line:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--beige);
}

.btn--on-dark {
  border-color: var(--beige);
  background: var(--beige);
  color: var(--ink);
}

.btn--on-dark:hover {
  background: var(--mist);
  border-color: var(--mist);
  color: var(--ink);
}

.btn--line-on-dark {
  border-color: var(--beige);
  background: transparent;
  color: var(--beige);
}

.btn--line-on-dark:hover {
  background: var(--beige);
  color: var(--ink);
}

.btn .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Hero */

.hero {
  background: var(--teal);
  color: var(--beige);
  padding-bottom: var(--band);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.wordmark {
  font-weight: 800;
  font-stretch: 75%;
  font-size: var(--step-1);
  line-height: 1.1;
  text-decoration: none;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.nav a {
  display: inline-block;
  padding-block: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.16em;
  text-underline-offset: 0.34em;
}

.names {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin-top: clamp(1.5rem, 5vw, 4rem);
  /* Sized so the longer name fills the wrap on one line at every width. */
  font-size: calc((min(100vw, var(--wrap)) - 2 * var(--gutter)) / 5.3);
  line-height: 0.86;
  letter-spacing: -0.015em;
  text-wrap: wrap;
}

.name {
  display: block;
}

.name .rel {
  display: block;
  margin-bottom: 0.45rem;
  font-size: var(--step-0);
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.2;
  letter-spacing: 0;
}

.name .mark {
  display: inline-block;
  padding: 0.06em 0.09em 0;
  margin-inline: -0.09em 0;
  background: var(--beige);
  color: var(--teal);
}

.name .mark--mid {
  margin-inline: -0.02em 0;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
}

.t-note {
  padding-left: 1rem;
  border-left: 0.375rem solid var(--mist);
  font-weight: 600;
  line-height: 1.4;
  max-width: 26rem;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 30rem;
}

.runs {
  border-top: 2px solid currentColor;
}

.runs li {
  border-bottom: 2px solid currentColor;
}

.runs a {
  display: grid;
  gap: 0.1rem;
  padding-block: 0.7rem;
  text-decoration: none;
}

.runs a:hover .runs-name {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.runs-name {
  font-weight: 800;
  font-stretch: 75%;
  font-size: var(--step-2);
  line-height: 1.05;
}

.runs-what {
  font-size: var(--step--1);
  font-weight: 500;
}

.hero-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: start;
}

.hero-photos figure:last-child {
  margin-top: clamp(1.5rem, 5vw, 4rem);
}

.photo {
  background: var(--ink);
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

figcaption {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  line-height: 1.35;
}

figcaption b {
  display: block;
  font-weight: 700;
}

/* Bands */

.band {
  padding-block: var(--band);
}

.band-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  line-height: 1.4;
}

.facts div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--hairline);
}

.facts dt {
  color: var(--slate);
  font-weight: 500;
}

.facts dd {
  font-weight: 600;
}

/* Printing: laid out like a sheet coming off the press */

.sheet {
  position: relative;
  margin: 2rem clamp(0.75rem, 2.4vw, 2rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--white);
}

.crop {
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  pointer-events: none;
}

.crop::before,
.crop::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.crop::before {
  left: 0;
  bottom: 0;
  width: 1.1rem;
  height: 1px;
}

.crop::after {
  right: 0;
  top: 0;
  width: 1px;
  height: 1.1rem;
}

.crop--tl {
  top: -1.75rem;
  left: -1.75rem;
}

.crop--tr {
  top: -1.75rem;
  right: -1.75rem;
  transform: scaleX(-1);
}

.crop--bl {
  bottom: -1.75rem;
  left: -1.75rem;
  transform: scaleY(-1);
}

.crop--br {
  bottom: -1.75rem;
  right: -1.75rem;
  transform: scale(-1);
}

.colour-bar {
  position: absolute;
  top: -1.4rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0;
  transform: translateX(-50%);
}

.colour-bar i {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
}

.colour-bar .c {
  background: #00aeef;
}

.colour-bar .m {
  background: #ec008c;
}

.colour-bar .y {
  background: #fff200;
}

.colour-bar .k {
  background: #231f20;
}

.colour-bar svg {
  width: 1rem;
  height: 1rem;
  margin-left: 0.6rem;
}

.press-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.press-copy {
  display: grid;
  gap: 1.25rem;
}

.address {
  max-width: 30rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: pretty;
}

.address small {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--slate);
}

.jobs {
  border-top: 2px solid var(--ink);
}

.jobs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
  padding-block: 0.55rem 0.35rem;
  border-bottom: 2px solid var(--ink);
}

.jobs b {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.jobs span {
  font-size: var(--step--1);
  color: var(--slate);
}

/* Construction */

.band--site {
  background: var(--sand);
}

.tagline {
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  font-weight: 300;
  font-stretch: 125%;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--teal);
}

.project {
  display: grid;
  gap: 1.25rem;
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
}

.project-head h3 {
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.02;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.2vw, 1rem);
}

.gallery li:first-child {
  grid-column: 1 / -1;
}

.gallery li {
  display: flex;
}

.gallery a {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--ink);
  color: var(--beige);
  text-decoration: none;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity 0.15s ease;
}

.gallery li:first-child img {
  aspect-ratio: 1440 / 649;
}

.gallery a:hover img {
  opacity: 0.86;
}

.gallery a:focus-visible {
  outline-color: var(--ink);
}

.gallery .cap {
  display: block;
  flex: 1;
  padding: 0.5rem 0.7rem 0.55rem;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.3;
}

.site-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 2px solid var(--ink);
}

.place {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.place h3 {
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.1;
}

/* School */

.band--school {
  background: var(--ink);
  color: var(--beige);
}

.school-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.school-copy {
  display: grid;
  gap: 1.25rem;
}

.school-photo img {
  width: 100%;
  aspect-ratio: 1065 / 1000;
  object-fit: cover;
}

.band--school .school-photo figcaption {
  color: var(--sand);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.1;
  color: var(--teal);
}

.band--school .values {
  color: var(--mist);
}

.band--school .facts {
  border-top-color: rgba(241, 233, 218, 0.28);
}

.band--school .facts div {
  border-bottom-color: rgba(241, 233, 218, 0.28);
}

.band--school .facts dt {
  color: var(--sand);
}

/* Contact */

.places {
  border-top: 2px solid var(--ink);
}

.places > li {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 0.75rem clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding-block: 1.4rem;
  border-bottom: 2px solid var(--ink);
}

.places h3 {
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.02;
}

.places .what {
  margin-top: 0.3rem;
  font-size: var(--step--1);
  color: var(--slate);
}

.places .reach {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
  font-weight: 600;
}

.places .reach a {
  display: inline-block;
  padding-block: 0.2rem;
}

.places .tel {
  font-size: var(--step-1);
  font-weight: 800;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Footer */

.footer {
  background: var(--teal);
  color: var(--beige);
  padding-block: 2rem;
  font-size: var(--step--1);
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer b {
  font-size: var(--step-1);
  font-weight: 800;
  font-stretch: 75%;
}

.footer .wrap + .wrap {
  margin-top: 1.25rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-nav a {
  display: inline-block;
  padding-block: 0.3rem;
  font-weight: 600;
}

/* Inner page heads */

.hero--page {
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.page-head {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(1.5rem, 5vw, 3.5rem);
}

.page-title {
  font-size: clamp(2.75rem, 1.4rem + 6.4vw, 6.75rem);
  line-height: 0.9;
}

.hero .tagline {
  color: var(--mist);
}

.page-head .lede {
  max-width: 40rem;
}

/* Home page: construction teaser */

.teaser {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.teaser-copy {
  display: grid;
  gap: 1.25rem;
}

.teaser-photo img {
  width: 100%;
  aspect-ratio: 1440 / 649;
  object-fit: cover;
}

/* Father and son page */

.profiles {
  display: grid;
  gap: var(--band);
}

.profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.profile-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: start;
}

.profile-photos figure:last-child {
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.profile-text {
  display: grid;
  gap: 1.25rem;
}

.profile--flip .profile-photos {
  order: 2;
}

/* Printing page: old and new address */

.moved {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 2px solid var(--ink);
}

.moved .earlier .address {
  font-weight: 400;
  color: var(--slate);
}

/* Construction page: who to meet at the office */

.meet {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.meet-copy {
  display: grid;
  gap: 1rem;
}

/* Phone numbers block */

.numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.numbers li {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--ink);
}

.numbers .tel {
  justify-self: start;
  font-size: clamp(2.25rem, 1.4rem + 3.8vw, 4rem);
  font-weight: 800;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.numbers .tel:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
}

.numbers span {
  color: var(--slate);
}

/* Links to the other pages */

.more {
  padding-block: 0 var(--band);
}

.band--site + .more {
  padding-top: clamp(2.5rem, 2rem + 3vw, 4rem);
}

.more h2 {
  margin-bottom: 1rem;
  font-size: var(--step-1);
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.3;
  letter-spacing: 0;
}

.more .runs {
  max-width: 34rem;
}

/* Photo viewer */

.viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--beige);
}

.viewer::backdrop {
  background: var(--ink);
}

.viewer-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  height: 100%;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.viewer-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.viewer-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.viewer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.viewer-cap {
  font-weight: 600;
}

.viewer-nav {
  display: flex;
  gap: 0.6rem;
}

.viewer .btn {
  border-color: var(--beige);
  background: transparent;
  color: var(--beige);
}

.viewer .btn:hover {
  background: var(--beige);
  color: var(--ink);
}

/* Not found page */

.notfound {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  background: var(--teal);
  color: var(--beige);
  padding-block: var(--band);
}

.notfound h1 {
  font-size: clamp(2.75rem, 10vw, 7rem);
}

/* Narrower screens */

@media (max-width: 62rem) {
  .places > li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .places > li > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 52rem) {
  .hero-body,
  .press-grid,
  .school-grid,
  .teaser,
  .profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile--flip .profile-photos {
    order: 0;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-photo {
    order: 2;
  }
}

@media (max-width: 36rem) {
  .site-foot,
  .moved,
  .meet,
  .numbers,
  .places > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .meet .photo {
    max-width: 14rem;
  }

  .sheet {
    margin-inline: 0.25rem;
  }

  .crop {
    width: 1.1rem;
    height: 1.1rem;
  }

  .crop::before {
    width: 0.7rem;
  }

  .crop::after {
    height: 0.7rem;
  }

  .crop--tl,
  .crop--tr {
    top: -1.1rem;
  }

  .crop--bl,
  .crop--br {
    bottom: -1.1rem;
  }

  .crop--tl,
  .crop--bl {
    left: -1.1rem;
  }

  .crop--tr,
  .crop--br {
    right: -1.1rem;
  }

  .facts div {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .viewer .btn {
    width: auto;
  }
}

@media print {
  .nav,
  .footer-nav,
  .more,
  .skip,
  .viewer,
  .actions {
    display: none !important;
  }

  .hero,
  .footer,
  .band--site,
  .band--school {
    background: none;
    color: #000;
  }

  .band {
    padding-block: 1.5rem;
  }
}
