/* Orlando Cliff Studios */

/* ---------- Fonts (self-hosted, latin subset) ---------- */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #f7f4ef;
  --ink: #1a1917;
  --ink-2: #5c5853;           /* 6.4:1 on paper */
  --green: #2c4a3e;           /* bottle green, 8.9:1 on paper */
  --on-green-2: rgb(247 244 239 / 0.8);
  --line: rgb(26 25 23 / 0.14);
  --line-strong: rgb(26 25 23 / 0.3);
  --line-on-green: rgb(247 244 239 / 0.22);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  /* One 12-column grid for the whole page. Every left edge sits on
     column 1, 4, 7 or 10, so sections line up with each other. */
  --max: 80rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --col-gap: clamp(1rem, 2.4vw, 2rem);
  --section: clamp(5rem, 11vw, 9rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 64em) {
  body {
    font-size: 1.125rem;
  }
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

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

h2, h3, h4 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--green);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 3px;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

.grid > * {
  grid-column: 1 / -1;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Display headings. Large serif capitals carry their own side space,
   so they are pulled left a touch to line up with the text below. */
.title {
  margin-left: -0.04em;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
}

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness 0.2s var(--ease);
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Header ---------- */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
}

.nav {
  display: none;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  transition: text-decoration-color 0.3s var(--ease);
}

.nav a:hover {
  text-decoration-color: currentColor;
}

.nav .nav__cta {
  padding: 0.45rem 1.15rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.nav .nav__cta:hover {
  background: var(--green);
  color: var(--paper);
}

.nav__wide {
  display: none;
}

@media (min-width: 22.5em) {
  .nav {
    display: block;
  }
}

@media (min-width: 40em) {
  .site-header__inner {
    padding-block: 1.5rem;
  }

  .nav__wide {
    display: list-item;
  }
}

/* ---------- Hero ---------- */

.hero__inner {
  --size: clamp(3rem, 21vw - 0.5rem, 10rem);
  row-gap: clamp(1.75rem, 4vw, 2.75rem);
  padding-block: clamp(2.25rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem);
}

.hero__line {
  display: block;
}

.hero__title {
  font-family: var(--serif);
  font-size: var(--size);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.hero__side {
  display: grid;
  justify-items: start;
  gap: 1.75rem;
}

.hero__lede {
  max-width: 30ch;
  color: var(--ink-2);
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.3s var(--ease);
}

.button:hover {
  background: var(--ink);
}

/* Laptops and up: "Websites for authors" on a single line that runs
   exactly from the left edge to the right edge of the page. The size is
   set just under a full fit, and justification closes the last few pixels.
   The tagline and button sit beneath it on the same left edge. */
@media (min-width: 64em) {
  .hero__inner {
    container-type: inline-size;
  }

  .hero__title {
    /* letter-spacing trails the final "s", so its ink would poke past the
       edge; this inset brings it back onto the line. */
    padding-right: 0.016em;
    font-size: calc(100cqw / 6.6);
    text-align: justify;
    text-align-last: justify;
  }

  .hero__line {
    display: inline;
  }

  .hero__side {
    grid-column: 1 / 8;
    gap: 2rem;
  }
}

/* ---------- The work, shown in a browser and on a phone ---------- */

.showcase {
  background: linear-gradient(to bottom, transparent 56%, var(--green) 56%);
}

.stage {
  /* Column maths so the frames sit exactly on the page grid. */
  --col: calc((100% - 11 * var(--col-gap)) / 12);
  position: relative;
  padding-bottom: 12%;
}

.browser {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(26 25 23 / 0.08),
    0 24px 48px -16px rgb(14 26 21 / 0.3),
    0 60px 120px -40px rgb(14 26 21 / 0.45);
}

.browser__bar {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  height: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  padding-inline: clamp(0.5rem, 0.3rem + 0.8vw, 0.875rem);
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.browser__dots {
  width: clamp(0.375rem, 0.3rem + 0.25vw, 0.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d9d2c6;
  box-shadow: 1.6em 0 0 #d9d2c6, 3.2em 0 0 #d9d2c6;
  font-size: 0.5rem;
}

.browser__url {
  justify-self: center;
  width: min(100%, 15rem);
  overflow: hidden;
  padding: 0.1em 0.75em;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: clamp(0.625rem, 0.55rem + 0.25vw, 0.75rem);
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.stage .browser {
  width: calc(11 * var(--col) + 10 * var(--col-gap));
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(4 * var(--col) + 3 * var(--col-gap));
  container-type: inline-size;   /* everything inside scales with the phone */
}

/* A modern phone: metal band, thin black bezel, tall rounded screen,
   Dynamic Island, status bar and Safari's bottom toolbar. */
.phone__body {
  position: relative;
  padding: 0.9cqw;
  border-radius: 16cqw;
  background: linear-gradient(150deg, #5a5753 0%, #2a2927 22%, #1d1c1b 50%, #2a2927 78%, #4a4844 100%);
  box-shadow:
    0 1px 2px rgb(26 25 23 / 0.25),
    0 30px 60px -20px rgb(10 20 16 / 0.55);
}

/* Side buttons: action and volume on the left, power on the right. */
.phone__body::before,
.phone__body::after {
  content: "";
  position: absolute;
  width: 0.9cqw;
}

.phone__body::before {
  top: 26cqw;
  left: -0.7cqw;
  height: 44cqw;
  border-radius: 0.6cqw 0 0 0.6cqw;
  background: linear-gradient(to bottom, #3a3835 0 8cqw, transparent 8cqw 14cqw, #3a3835 14cqw 27cqw, transparent 27cqw 31cqw, #3a3835 31cqw 44cqw);
}

.phone__body::after {
  top: 38cqw;
  right: -0.7cqw;
  height: 21cqw;
  border-radius: 0 0.6cqw 0.6cqw 0;
  background: #3a3835;
}

.phone__screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2.1cqw solid #0b0b0b;
  border-radius: 15.1cqw;
  background: #f4f1ea;
}

.phone__status {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 12.9cqw;
  padding-inline: 8.5cqw 6.5cqw;
  background: #eae9e5;
  color: #111;
}

.phone__time {
  font-family: var(--sans);
  font-size: 4.1cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.phone__island {
  position: absolute;
  top: 2.4cqw;
  left: 50%;
  width: 29cqw;
  height: 8.4cqw;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.phone__icons {
  width: 17cqw;
  height: auto;
}

.phone__screen img {
  width: 100%;
}

.phone__toolbar {
  display: grid;
  flex: none;
  justify-items: center;
  gap: 4.2cqw;
  padding: 3cqw 5cqw 2.4cqw;
  border-top: 1px solid rgb(26 25 23 / 0.08);
  background: #f4f1ea;
}

.phone__url {
  width: 100%;
  padding-block: 2.3cqw;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0.3cqw 1.2cqw rgb(26 25 23 / 0.08);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 3.6cqw;
  line-height: 1;
  text-align: center;
}

.phone__home {
  width: 36cqw;
  height: 1.4cqw;
  border-radius: 999px;
  background: #111;
}

@media (min-width: 48em) {
  .stage {
    padding-bottom: 6%;
  }

  .stage .browser {
    width: calc(10 * var(--col) + 9 * var(--col-gap));
  }

  .phone {
    width: calc(3 * var(--col) + 2 * var(--col-gap));
  }
}

/* One entrance: the work rises into place as the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .stage .browser {
    animation: rise 1.2s var(--ease) 0.1s both;
  }

  .phone {
    animation: rise 1.2s var(--ease) 0.35s both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(3rem);
  }
}

/* ---------- Featured work ---------- */

.work {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) var(--section);
  background: var(--green);
  color: var(--paper);
}

.work :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--paper);
}

.work ::selection,
.contact ::selection {
  background: var(--paper);
  color: var(--green);
}

.work__title {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.case__intro,
.case__built {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-on-green);
}

.case__built {
  margin-top: 2.75rem;
}

.case__title {
  margin-left: -0.04em;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case__lede {
  max-width: 32ch;
  margin-top: 1rem;
  color: var(--on-green-2);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
}

.case__intro .text-link {
  display: inline-block;
  margin-top: 1.5rem;
}

.case__minor {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.built {
  margin-top: 0.35rem;
}

.built li:first-child {
  border-top: 0;
}

.built li {
  padding-block: 0.8rem;
  border-top: 1px solid var(--line-on-green);
  color: var(--on-green-2);
}

@media (min-width: 60em) {
  .case__intro {
    grid-column: 1 / 7;
  }

  .case__built {
    grid-column: 7 / 13;
    margin-top: 0;
  }
}

.plates {
  display: grid;
  gap: 2.5rem var(--col-gap);
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

.plate figcaption {
  margin-top: 0.9rem;
  color: var(--on-green-2);
  font-size: 0.9375rem;
}

.browser--small {
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgb(10 20 16 / 0.2),
    0 30px 60px -24px rgb(10 20 16 / 0.6);
}

@media (min-width: 48em) {
  .plates {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .plate:nth-child(2) {
    margin-top: clamp(3rem, 9vw, 7.5rem);
  }
}

.quote {
  margin-top: clamp(4.5rem, 11vw, 8.5rem);
}

.quote blockquote p {
  max-width: 19em;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.15rem + 2.5vw, 3.375rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-indent: -0.31em;   /* the opening quote mark hangs in the margin */
}

@supports (hanging-punctuation: first) {
  .quote blockquote p {
    text-indent: 0;
    hanging-punctuation: first;
  }
}

.quote figcaption {
  margin-top: 1.75rem;
  color: var(--on-green-2);
  font-size: 1rem;
}

.quote cite {
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  white-space: nowrap;
}

@media (min-width: 64em) {
  .quote {
    grid-column: 1 / 11;
  }
}

/* ---------- Sections on paper ---------- */

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

.section--ruled {
  border-top: 1px solid var(--line);
}

.section__intro {
  max-width: 32ch;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
}

@media (min-width: 60em) {
  .section__title {
    grid-column: 1 / 7;
  }

  .section__intro {
    grid-column: 1 / 7;
  }
}

/* "W" carries less side space than other capitals. */
#included-title {
  margin-left: -0.012em;
}

/* ---------- How it works: a timeline ---------- */

/* Phones and tablets: the stops run down the page on a vertical line. */
.steps {
  position: relative;
  display: grid;
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

/* The line joining the stops. It fades at the end, because hosting carries on. */
.steps::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 0;
  left: calc(1.5rem - 0.5px);
  width: 1px;
  background: linear-gradient(to bottom, var(--ink) 80%, rgb(26 25 23 / 0));
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 1.25rem;
  padding-bottom: 2.75rem;
}

.step > * {
  grid-column: 2;
}

.step__node {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--green);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-variant-numeric: lining-nums;
  line-height: 1;
}

.step__title {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.25rem + 0.4vw, 1.625rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.step__text {
  max-width: 34ch;
  color: var(--ink-2);
}

.step__cost {
  margin-top: 0.9rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.step__figure {
  margin-right: 0.2em;
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.875rem;
  font-variant-numeric: lining-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Desktop: four stops along one horizontal line. Subgrid keeps every
   title, description and cost on a shared row. */
@media (min-width: 64em) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--col-gap);
  }

  .steps::before {
    top: 1.5rem;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(to right, var(--ink) 85%, rgb(26 25 23 / 0));
  }

  .step {
    grid-row: span 4;
    grid-template-rows: subgrid;
    grid-template-columns: none;
    row-gap: 0;
    padding-bottom: 0;
  }

  .step > * {
    grid-column: auto;
  }

  .step__node {
    grid-row: auto;
    margin-bottom: 1.75rem;
  }

  .step__title {
    display: block;
    min-height: 0;
  }

  .step__text {
    margin-top: 0.6rem;
  }

  .step__cost {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
  }
}

/* ---------- What's included: a ruled list on the same columns as the steps ---------- */

.inc {
  display: grid;
  column-gap: var(--col-gap);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.inc li {
  padding-block: 1.1rem 1.2rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.55vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

@media (min-width: 30em) {
  .inc {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64em) {
  .inc {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Contact ---------- */

.contact {
  padding-block: var(--section) clamp(4rem, 9vw, 7rem);
  background: var(--green);
  color: var(--paper);
}

.contact__title {
  margin-left: -0.055em;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.3rem + 2vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.contact__email {
  margin-top: 0.75rem;
  margin-left: -0.006em;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 9.4vw - 0.15rem, 9.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

/* On narrower screens the "h" needs a hair more pull to sit on the line. */
@media (max-width: 47.99em) {
  .contact__email {
    margin-left: -0.015em;
  }
}

.contact__email a {
  text-decoration-line: underline;
  text-decoration-color: rgb(247 244 239 / 0.6);
  text-decoration-thickness: max(1px, 0.012em);
  text-underline-offset: 0.14em;
  transition: text-decoration-color 0.3s var(--ease);
}

.contact__email .at {
  font-weight: 380;
}

.contact__email a:hover {
  text-decoration-color: var(--paper);
}


/* ---------- Footer ---------- */

.site-footer {
  background: var(--green);
  color: var(--on-green-2);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem 2.25rem;
  font-size: 0.875rem;
}

.site-footer__inner::before {
  content: "";
  flex-basis: 100%;
  height: 1px;
  margin-top: -1.75rem;
  margin-bottom: 1rem;
  background: var(--line-on-green);
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-footer img {
  width: 1.5rem;
  height: 1.5rem;
}

.site-footer__top {
  display: inline-block;
  padding-block: 0.25rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.3s var(--ease);
}

.site-footer__top:hover {
  text-decoration-color: currentColor;
}

/* ---------- 404 ---------- */

.not-found {
  padding-block: clamp(3.5rem, 11vw, 9rem);
}

.not-found .hero__lede {
  margin-top: 2rem;
}

.not-found .hero__lede a {
  color: var(--green);
  text-underline-offset: 0.2em;
}

/* ---------- Motion ---------- */

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

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