:root {
  --ink: #07132f;
  --body: #414b63;
  --paper: #ffffff;
  --hero: #f7f7fd;
  --panel: #f7f7fd;
  --line: #e4e5ec;
  --accent: #693313;
  --accent-hover: #50250c;
  --orange: #f5a000;
  --green: #20bb3e;
  --drawer-width: 390px;
  --shadow: 0 18px 60px rgba(7, 19, 47, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 630px;
  background: var(--hero);
}

.hero__inner,
.gallery {
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
}

.hero__inner {
  padding: 68px 0 64px;
}

.utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(7, 19, 47, 0.05);
  color: #242a39;
  font-size: 14px;
  font-weight: 600;
}

.status-pill__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(32, 187, 62, 0.12);
}

.text-button,
.small-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.text-button {
  padding: 10px 0;
}

.text-button:hover,
.small-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 55px;
}

.brand__mark {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 29px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.brand__word {
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(56px, 6vw, 78px);
  line-height: 0.85;
  letter-spacing: -0.025em;
}

.hero__copy {
  max-width: 700px;
  margin-top: 58px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(28px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.hero__copy > p {
  margin-bottom: 0;
  color: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

.primary-button {
  min-height: 50px;
  margin-top: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.small-button:focus-visible,
.reaction-button:focus-visible,
.work-panel:focus-visible {
  outline: 2px solid #969ca8;
  outline-offset: 1px;
}

.gallery {
  padding: 68px 0 74px;
}

.gallery__hint {
  margin-bottom: 16px;
  color: #747c90;
  font-size: 13px;
}

.work-panel {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: var(--panel);
  color: #a3a8b8;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='21' fill='%23f5a000' stroke='%23ffffff' stroke-width='4'/%3E%3Cpath d='M24 16.5v15M16.5 24h15' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") 18 18,
    crosshair;
  transition: box-shadow 160ms ease, background 160ms ease;
  user-select: none;
}

body.inline-comment-open .work-panel {
  cursor: default;
}

.work-panel:hover {
  background: #f2f3fa;
  box-shadow: inset 0 0 0 1px #e8e9f0;
}

.work-panel__label {
  opacity: 0;
  font-size: 13px;
  transition: opacity 160ms ease;
}

.work-panel:hover .work-panel__label,
.work-panel:focus-visible .work-panel__label {
  opacity: 1;
}

.work-panel--wide {
  aspect-ratio: 16 / 9;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  margin-top: 34px;
}

.work-panel--square {
  aspect-ratio: 1 / 1;
}

.pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.comment-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 10%;
  background: var(--ink);
  box-shadow: 0 7px 18px rgba(7, 19, 47, 0.24);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.comment-pin span {
  transform: rotate(45deg);
}

.inline-comment {
  position: fixed;
  z-index: 40;
  inset: 0;
  pointer-events: auto;
}

.inline-comment__pin {
  position: fixed;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 7px 18px rgba(7, 19, 47, 0.24);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.inline-comment.is-new .inline-comment__pin {
  display: none;
}

.inline-comment__card {
  position: fixed;
  width: min(356px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 24px));
  overflow-y: auto;
  border: 1px solid rgba(7, 19, 47, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(7, 19, 47, 0.2);
  pointer-events: auto;
  overscroll-behavior: contain;
}

.inline-comment__header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 16px 15px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.inline-comment__header.is-dragging {
  cursor: grabbing;
}

.inline-comment__header .icon-button {
  cursor: pointer;
}

.inline-comment__header h2 {
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.inline-comment__header p {
  margin-bottom: 0;
  color: #81889a;
  font-size: 11px;
}

.inline-composer {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.inline-composer[hidden],
.inline-comment__thread[hidden] {
  display: none;
}

.identity-fields {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.identity-fields[hidden] {
  display: none;
}

.field.inline-composer__message {
  margin-top: 0;
}

.first-post-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.first-post-row .inline-composer__message {
  flex: 1 1 auto;
}

.first-post-row .field textarea {
  min-height: 84px;
  max-height: 92px;
  padding: 9px 11px;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  resize: none;
}

.thread-reply-button.first-post-button {
  width: 42px;
  height: 42px;
  transform: translateY(-2px);
}

.first-post-section .form-message {
  margin-top: 8px;
}

.inline-comment__thread {
  padding: 18px;
}

.thread-entry + .thread-entry {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hold-to-delete {
  position: relative;
  -webkit-touch-callout: none;
}

.thread-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.thread-author__name {
  margin-bottom: 1px;
  font-size: 12px;
  font-weight: 800;
}

.thread-author__meta {
  margin-bottom: 0;
  color: #8b91a0;
  font-size: 10px;
}

.thread-message {
  margin: 12px 0 0 40px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.thread-reaction {
  margin: 10px 0 0 40px;
}

.thread-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.thread-reply-identity {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.reply-reaction-row {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.thread-reply-input {
  width: 100%;
  min-height: 42px;
  max-height: 92px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  resize: none;
}

.thread-reply-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  place-items: center;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.comment-drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  display: flex;
  width: min(var(--drawer-width), 100%);
  height: 100dvh;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 35px rgba(7, 19, 47, 0.08);
  transform: translateX(105%);
  transition: transform 240ms ease;
}

.comment-drawer.is-open {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 5px;
  color: #747c90;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer__header h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  background: #fff;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.icon-button--quiet {
  width: 28px;
  height: 28px;
  border: 0;
  font-size: 20px;
}

.drawer__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 28px 40px;
}

.comment-list__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.comment-list__heading h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.comment-list__heading p {
  margin-bottom: 0;
  color: #747c90;
  font-size: 11px;
  line-height: 1.4;
}

.reaction-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.reaction-fieldset legend,
.field > span {
  display: block;
  margin-bottom: 8px;
  color: #31394d;
  font-size: 12px;
  font-weight: 750;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--body);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease,
    box-shadow 150ms ease;
}

.reaction-button__emoji {
  font-size: 16px;
  line-height: 1;
}

.reaction-button:hover,
.reaction-button.is-selected {
  border-color: transparent;
  background: #f1f2f5;
  box-shadow: none;
  color: var(--ink);
}

.reaction-button.is-selected {
  border: 2px solid #c7cbd3;
  outline: none;
}

.field {
  display: block;
  margin-top: 0;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.field input {
  min-height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.thread-reply-input:focus {
  border-color: var(--line);
  outline: none;
  box-shadow: none;
}

.form-message {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  color: #a13b2b;
  font-size: 12px;
}

.form-message.is-success {
  color: #16892c;
}

.primary-button--compact {
  min-height: 36px;
  margin-top: 0;
  padding: 0 15px;
  border-radius: 4px;
  font-size: 12px;
}

.comment-list-section {
  padding-top: 0;
}

.small-button {
  padding: 4px 0;
  color: var(--accent);
  font-size: 12px;
}

.comment-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.comment-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.comment-card:hover {
  border-color: #c7cad3;
  box-shadow: 0 8px 24px rgba(7, 19, 47, 0.07);
  transform: translateY(-1px);
}

.comment-card.is-highlighted {
  border-color: #969ca8;
  box-shadow: 0 0 0 3px rgba(150, 156, 168, 0.14);
}

.comment-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.comment-card__name {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.comment-card__location {
  color: #81889a;
  font-size: 11px;
}

.reaction-tag {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--hero);
  color: var(--body);
  font-size: 10px;
  font-weight: 800;
}

.reaction-tag--emoji {
  display: inline-grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f2f5;
  font-size: 14px;
  line-height: 1;
}

.comment-card__message {
  margin: 12px 0 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.empty-state {
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: #747c90;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
  }

  .hero__inner,
  .gallery {
    width: min(100% - 40px, 1120px);
  }

  .hero__inner {
    padding: 32px 0 50px;
  }

  .brand {
    margin-top: 48px;
  }

  .brand__mark {
    width: 50px;
    height: 50px;
    font-size: 23px;
  }

  .brand__word {
    font-size: 52px;
  }

  .hero__copy {
    margin-top: 44px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero__copy > p {
    font-size: 16px;
  }

  .primary-button {
    margin-top: 36px;
  }

  .gallery {
    padding: 40px 0;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .gallery__hint {
    line-height: 1.4;
  }

  .comment-drawer {
    width: min(360px, 100%);
  }

  .inline-comment__card {
    width: calc(100vw - 24px);
  }

  .identity-fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
