:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #60646c;
  --line: #dfe3ea;
  --paper: #ffffff;
  --mist: #f5f7fa;
  --green: #1f7a5a;
  --green-dark: #145940;
  --blue: #315f9f;
  --yellow: #ffd76a;
  --shadow: 0 20px 60px rgba(31, 42, 68, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 215, 106, 0.22), transparent 32rem),
    var(--mist);
}

button,
input,
textarea {
  font: inherit;
}

button,
.file-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  text-align: center;
  font-weight: 700;
}

button:hover,
.file-button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  align-items: center;
  min-height: 42vh;
  gap: 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 42rem;
  font-size: 1.15rem;
  line-height: 1.6;
}

.hero__phone {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 11.5rem;
  aspect-ratio: 9 / 16;
  border: 0.65rem solid #1d2938;
  border-radius: 2rem;
  background: linear-gradient(160deg, #eff6ff, #ffffff 54%, #dcf5e9);
  box-shadow: var(--shadow);
}

.phone__camera {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  width: 3.3rem;
  height: 0.45rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #1d2938;
}

.phone__sheet {
  position: absolute;
  inset: 3rem 1.4rem 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--paper);
  box-shadow: 0 10px 25px rgba(31, 42, 68, 0.18);
}

.phone__sheet span {
  display: block;
  height: 0.35rem;
  margin-bottom: 0.55rem;
  border-radius: 999px;
  background: #9db0c7;
}

.phone__sheet span:nth-child(2) {
  width: 78%;
}

.phone__sheet span:nth-child(3) {
  width: 88%;
}

.phone__sheet strong {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  color: var(--blue);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.capture-panel,
.send-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.capture-panel {
  padding: 1rem;
}

.camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #e7edf5;
}

.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101820;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.camera-icon {
  width: 4.5rem;
  height: 3.2rem;
  margin: 0 auto;
  border: 0.35rem solid #8091a8;
  border-radius: 0.55rem;
}

.camera-icon::before {
  content: "";
  display: block;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0.42rem auto;
  border: 0.32rem solid #8091a8;
  border-radius: 50%;
}

.toolbar,
.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.send-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.actions button:first-child {
  background: var(--blue);
}

.actions button:nth-child(2) {
  background: #6c4b1d;
}

.status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 1rem 0 1.4rem;
  }

  .hero__phone {
    justify-content: flex-start;
  }

  .phone {
    width: 8.5rem;
  }

  .toolbar,
  .actions {
    grid-template-columns: 1fr;
  }
}
