:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-soft: #fbfbfb;
  --rail: #f0f0f0;
  --border: #ebebeb;
  --border-accent: #e5937a;
  --border-alpha: rgba(17, 17, 17, 0.07);
  --border-alpha-strong: rgba(17, 17, 17, 0.1);
  --text: #1b1818;
  --text-secondary: #4a4242;
  --text-soft: #4f5059;
  --text-muted: rgba(17, 17, 17, 0.6);
  --text-body: rgba(17, 17, 17, 0.9);
  --accent: #ef6e4c;
  --accent-deep: #e46340;
  --highlight: rgba(84, 183, 164, 0.15);
  --panel-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --tile-shadow: 0 4px 4px rgba(0, 0, 0, 0.04);
  --brand-shadow: 0 4px 4px rgba(0, 0, 0, 0.07);
  --shadow-border:
    0 0 0 1px rgba(17, 17, 17, 0.06),
    0 1px 2px -1px rgba(17, 17, 17, 0.06),
    0 8px 18px -12px rgba(17, 17, 17, 0.09);
  --shadow-border-hover:
    0 0 0 1px rgba(17, 17, 17, 0.08),
    0 1px 2px -1px rgba(17, 17, 17, 0.08),
    0 14px 28px -16px rgba(17, 17, 17, 0.14);
  --shadow-button:
    0 0 0 1px rgba(229, 147, 122, 0.35),
    0 1px 2px -1px rgba(196, 88, 52, 0.28),
    0 10px 18px -14px rgba(239, 110, 76, 0.42);
  --ease-out-productive: cubic-bezier(0.2, 0, 0, 1);
}

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

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  font-optical-sizing: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.75), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  text-rendering: geometricPrecision;
}

button {
  font: inherit;
}

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

::selection {
  background: rgba(239, 110, 76, 0.2);
  color: var(--text);
}

.app-window {
  position: relative;
  width: min(100%, 1440px);
  min-height: calc(100vh - 40px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    var(--bg);
}

.sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 60px;
  min-height: 900px;
  padding: 12px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  padding: 2.182px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(229, 147, 122, 0.45);
  border-radius: 8px;
  background: var(--accent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    var(--brand-shadow);
  transition-property: transform, background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.brand-logo {
  width: 28px;
  height: 18.405px;
  transition-property: transform;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.sidebar-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-group-last {
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar-label {
  margin: 0;
  color: #5b5b5b;
  opacity: 0.7;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.sidebar-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border-radius: 12px;
  background: var(--rail);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 0 0 1px rgba(17, 17, 17, 0.035);
}

.nav-tile,
.footer-icon,
.cta-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-tile {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 10px;
  transition-property: transform, background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.nav-tile.is-active {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-border);
}

.nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition-property: transform, opacity, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.nav-icon-logomark {
  width: 18px;
  height: 20px;
}

.app-icon {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 999px;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  outline-offset: -1px;
  transition-property: transform, opacity, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.content {
  min-height: 900px;
  padding: 72px clamp(24px, 4vw, 48px) 72px 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-stack {
  width: min(100%, 974px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

.mobile-chrome {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: flex-start;
}

.brand-mark-mobile {
  width: 34px;
  height: 34px;
}

.hero {
  width: min(100%, 882px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.hero-title {
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.96px;
  text-wrap: balance;
  font-variant-numeric: tabular-nums;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  text-wrap: pretty;
}

.hero-emphasis {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.message-card {
  width: 100%;
  max-width: 100%;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-border);
}

.message-subject {
  min-height: 49px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.message-subject-label {
  flex: none;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.message-subject-value {
  min-width: 0;
  color: #111111;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}

.message-body {
  min-height: 272px;
  padding: 9px 20px 12px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.message-copy {
  max-width: 920px;
  color: var(--text-body);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-wrap: pretty;
}

.message-copy p {
  margin: 0 0 10px;
}

.message-copy p:last-child {
  margin-bottom: 0;
}

.text-highlight {
  background: var(--highlight);
  padding: 1px 4px 2px;
  border-radius: 2px;
}

.attachment-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 138px));
  justify-content: flex-start;
  gap: 8px;
  margin-top: auto;
}

.attachment-card {
  width: 100%;
  min-height: 75px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-border);
}

.attachment-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 53px;
  padding: 0 4px;
}

.attachment-title {
  margin: 0;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.attachment-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  font-variant-numeric: tabular-nums;
}

.attachment-pill {
  min-height: 28px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.045),
    0 1px 2px -1px rgba(17, 17, 17, 0.06);
  color: #111111;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.pill-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.pill-icon-image {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 4px;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  outline-offset: -1px;
}

.message-footer {
  min-height: 49px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-tool-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition-property: transform, opacity;
  transition-duration: 150ms;
  transition-timing-function: var(--ease-out-productive);
}

.footer-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
}

.footer-icon-delete {
  width: 20px;
  height: 20px;
}

.action-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition-property: transform, opacity, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.action-icon-delete {
  width: 20px;
  height: 20px;
}

.action-icon-dots {
  width: 3px;
  height: 14px;
}

.footer-icon-text {
  width: auto;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.formatting-label {
  font-size: 18px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.72px;
}

.formatting-mark {
  font-size: 8px;
  line-height: 1;
  transform: translateY(1px);
}

.cta-button {
  padding: 10px 10px 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border: 1px solid rgba(229, 147, 122, 0.4);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-button);
  transition-property: transform, background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.cta-button-label {
  padding-right: 8px;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cta-icon {
  width: 18px;
  height: 18px;
  transform: translateX(1px);
  transition-property: transform, opacity, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-productive);
}

.nav-tile:focus-visible,
.brand-mark:focus-visible,
.footer-icon:focus-visible,
.cta-button:focus-visible {
  outline: 3px solid rgba(239, 110, 76, 0.8);
  outline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  animation: reveal-in 420ms var(--ease-out-productive) forwards;
  will-change: transform, opacity, filter;
}

.reveal-1 {
  animation-delay: 0ms;
}

.reveal-2 {
  animation-delay: 50ms;
}

.reveal-3 {
  animation-delay: 100ms;
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .brand-mark:hover {
    transform: translateY(-1px);
    background: var(--accent-deep);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22) inset,
      var(--brand-shadow),
      0 6px 14px -6px rgba(239, 110, 76, 0.45);
  }

  .brand-mark:hover .brand-logo {
    transform: scale(1.04);
  }

  .nav-tile:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.36);
  }

  .nav-tile:hover .nav-icon,
  .nav-tile:hover .app-icon {
    transform: scale(1.04);
    filter: saturate(1.05);
  }

  .footer-icon:hover {
    transform: translateY(-1px);
  }

  .footer-icon:hover .action-icon {
    transform: scale(1.05);
    filter: saturate(1.05);
  }

  .cta-button:hover {
    background: var(--accent-deep);
    box-shadow:
      0 0 0 1px rgba(229, 147, 122, 0.42),
      0 1px 2px -1px rgba(196, 88, 52, 0.32),
      0 14px 24px -16px rgba(239, 110, 76, 0.5);
  }

  .cta-button:hover .cta-icon {
    transform: translateX(2px);
  }
}

.nav-tile:active,
.brand-mark:active,
.footer-icon:active,
.cta-button:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
    will-change: auto;
  }

  .brand-mark,
  .brand-logo,
  .nav-tile,
  .nav-icon,
  .app-icon,
  .attachment-card,
  .footer-icon,
  .action-icon,
  .cta-button,
  .cta-icon {
    transition-duration: 0ms;
  }

  .nav-tile:active,
  .brand-mark:active,
  .footer-icon:active,
  .cta-button:active {
    transform: none;
  }
}

@media (max-width: 1160px) {
  .content {
    padding-left: 92px;
    padding-right: 32px;
  }

  .hero-title {
    font-size: 44px;
    letter-spacing: -0.88px;
  }
}

@media (max-width: 1080px) {
  .content {
    padding-left: 84px;
  }

  .hero-title {
    font-size: 40px;
    letter-spacing: -0.8px;
  }

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

@media (max-width: 980px) {
  body {
    padding: 12px;
  }

  .app-window {
    min-height: auto;
  }

  .sidebar {
    display: none;
  }

  .content {
    min-height: auto;
    padding: 28px 20px 36px;
  }

  .content-stack {
    width: 100%;
    gap: 36px;
  }

  .mobile-chrome {
    display: flex;
  }

  .hero {
    width: 100%;
  }

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

@media (max-width: 720px) {
  .hero-title {
    font-size: 36px;
    letter-spacing: -0.72px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .message-subject {
    flex-wrap: wrap;
    gap: 4px;
  }

  .message-body {
    gap: 20px;
  }

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

  .footer-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0;
  }

  .app-window {
    border-radius: 0;
  }

  .content {
    padding: 20px 16px 28px;
  }

  .content-stack {
    gap: 28px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -0.64px;
  }

  .hero-subtitle {
    max-width: 32ch;
  }

  .message-body {
    padding: 12px 16px 10px;
    gap: 18px;
  }

  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .message-footer {
    align-items: stretch;
  }

  .footer-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-tool-row {
    width: 100%;
    justify-content: space-between;
    gap: 10px 12px;
  }

  .cta-button {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .content {
    padding: 16px 12px 24px;
  }

  .content-stack {
    gap: 24px;
  }

  .hero {
    gap: 10px;
  }

  .hero-title {
    font-size: 28px;
    letter-spacing: -0.56px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .message-subject,
  .message-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .message-body {
    padding: 12px;
  }

  .attachment-grid {
    gap: 10px;
  }

  .attachment-card {
    min-height: 84px;
  }

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