:root {
  color-scheme: light;

  --yellow: #ffd84d;
  --pink: #ff91ad;
  --blue: #7fd4f7;
  --green: #a9d85e;
  --cream: #fffdf8;

  --ink: #24180f;
  --red: #e23832;

  --border: #493326;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

html {
  background: var(--yellow);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  background: var(--cream);
  color: var(--ink);

  font-family:
    Verdana,
    Arial,
    Helvetica,
    sans-serif;

  font-size: 18px;
  line-height: 1.55;
}

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

button {
  font: inherit;
}

a {
  color: #0000cc;
}

a:visited {
  color: #663399;
}

a:hover {
  color: #cc0000;
}


/* HEADER */

header {
  padding:
    max(24px, env(safe-area-inset-top))
    22px
    18px;

  border-bottom: 4px solid var(--border);

  background: var(--yellow);

  text-align: center;
}

h1 {
  margin: 0;

  color: var(--red);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(68px, 16vw, 150px);
  line-height: 0.85;
  letter-spacing: -0.07em;
}

.subtitle {
  margin: 18px 0;

  font-size: 17px;
  font-weight: bold;
}

nav {
  margin-top: 14px;

  font-size: 16px;
}

nav a {
  margin: 0 5px;
}

nav a::after {
  content: " · ";
  color: var(--ink);
  text-decoration: none;
}

nav a:last-child::after {
  content: "";
}


/* MAIN */

main {
  width: min(1080px, 100%);
  margin: 0 auto;
}

section {
  padding: 46px 24px;
}

h2 {
  margin: 0 0 24px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(30px, 5vw, 46px);
}

.big {
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.3;
}


/* INTRO */

.intro {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;

  background: var(--cream);
}

.main-cat {
  margin: 0;

  transform: rotate(1.2deg);
}

.main-cat img {
  width: 100%;
  min-height: 440px;
  object-fit: cover;

  border: 3px solid var(--border);
}

figcaption {
  margin-top: 5px;

  font-size: 14px;
}

#meow-button {
  margin-top: 15px;

  border: 2px outset #aaa;

  padding: 7px 18px;

  background: #ececec;
  color: #111;

  cursor: pointer;
}

#meow-button:active {
  border-style: inset;
}

#meow-status {
  margin-left: 12px;

  color: #777;

  font-size: 14px;
}


/* GALLERY */

.gallery-section {
  border-top: 4px solid var(--border);
  border-bottom: 4px solid var(--border);

  background: var(--pink);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.cat {
  margin: 0;
}

.cat-one {
  grid-column: span 5;
}

.cat-two {
  grid-column: span 7;
}

.cat-three {
  grid-column: span 4;
}

.cat-four {
  grid-column: span 4;
}

.cat-five {
  grid-column: span 4;
}

.cat-six {
  grid-column: 3 / span 8;
}

.cat-love {
  appearance: none;

  display: block;
  width: 100%;

  border: 0;
  padding: 0;

  background: transparent;

  cursor: pointer;
}

.cat img {
  width: 100%;
  height: 340px;
  object-fit: cover;

  border: 2px solid var(--border);
}

.cat-two img {
  height: 420px;
}

.cat-six img {
  height: 430px;
}

.cat figcaption {
  display: flex;
  justify-content: space-between;

  padding: 6px 2px;

  font-size: 15px;
}

.cat figcaption span {
  color: var(--red);
}


/* FACTS */

.facts {
  background: var(--blue);
}

.facts ul {
  margin: 0;
  padding-left: 28px;

  max-width: 760px;
}

.facts li {
  margin-bottom: 15px;
}

.disclaimer {
  margin-top: 35px;

  color: #555;

  font-size: 13px;
}


/* ASCII CAT */

.interrupt {
  padding: 70px 20px;

  border-top: 3px solid var(--border);
  border-bottom: 3px solid var(--border);

  background: #fff;

  text-align: center;
}

.interrupt p {
  margin: 0;

  font-family:
    "Courier New",
    monospace;

  font-size: 29px;
  line-height: 1.1;
}


/* TABLE */

.sleeping {
  background: var(--green);
}

.sleeping table {
  width: 100%;

  border-collapse: collapse;

  background: #fffde8;

  font-size: 16px;
}

.sleeping th,
.sleeping td {
  border: 1px solid var(--border);

  padding: 9px 10px;

  text-align: left;
}

.sleeping th {
  background: #dedcae;
}

.sleeping td:nth-child(2) {
  white-space: nowrap;

  font-weight: bold;
}


/* WIDE CAT */

.wide-cat {
  padding: 0;

  position: relative;
}

.wide-cat img {
  width: 100%;
  height: min(75dvh, 720px);
  object-fit: cover;
}

.wide-cat p {
  position: absolute;

  left: 28px;
  bottom: 18px;

  margin: 0;

  padding: 4px 8px;

  background: #fff;

  color: #111;

  font-family:
    Georgia,
    serif;

  font-size: 25px;
}


/* LINKS */

.links {
  background: var(--yellow);
}

.links ul {
  margin-bottom: 30px;
}

.links li {
  margin-bottom: 10px;
}


/* LAST CAT */

.final-cat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;

  border-top: 4px solid var(--border);

  background: #fff;
}

.final-cat figure {
  margin: 0;
}

.final-cat img {
  width: 100%;
  min-height: 430px;
  object-fit: cover;

  border: 2px solid var(--border);
}

[data-contact] {
  appearance: none;

  border: 0;
  padding: 0;

  background: transparent;
  color: #0000cc;

  text-decoration: underline;

  cursor: pointer;
}

[data-contact]:hover {
  color: #cc0000;
}


/* THE BOTTOM */

.very-bottom {
  display: flex;
  justify-content: space-between;

  padding:
    12px
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));

  border-top: 2px solid var(--border);

  background: var(--yellow);

  font-size: 13px;
  font-weight: bold;
}


/* PHONE */

@media (max-width: 700px) {
  body {
    font-size: 17px;
  }

  header {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: clamp(70px, 27vw, 115px);
  }

  nav {
    line-height: 2;
  }

  section {
    padding: 38px 17px;
  }

  .intro,
  .final-cat {
    grid-template-columns: 1fr;
  }

  .main-cat img,
  .final-cat img {
    min-height: 55dvh;
  }

  .cat-grid {
    display: block;
  }

  .cat {
    margin-bottom: 30px;
  }

  .cat img,
  .cat-two img,
  .cat-six img {
    height: auto;
    max-height: none;
  }

  .wide-cat img {
    height: 65dvh;
  }

  .sleeping {
    overflow-x: auto;
  }

  .sleeping table {
    min-width: 620px;
  }
}