/* Vacation Mode. Change the colors here. */
:root {
  --bg: #eef6f9;
  --card: #fffdf7;
  --ink: #26364a;
  --muted: #5d6d80;
  --line: #d9e4ea;
  --sky: #cfe8f2;
  --sun: #ffcf7a;
  --sea: #7fbfd6;
  --sand: #f2dfbd;
  --coral: #e07a5f;
  --leaf: #5b9a74;
  --stamp: #e07a5f;
  --hand: "Bradley Hand", "Segoe Print", "Comic Neue", "Chalkboard SE", "Marker Felt", cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 20% 20%, #fff 0, transparent 40%),
    var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: #2b6f8e; }
:focus-visible { outline: 3px solid #2b6f8e; outline-offset: 2px; border-radius: 6px; }

.postcard {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(980px, 100%);
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--line), 0 30px 60px rgb(38 54 74 / 0.12);
  transform: rotate(-0.6deg);
  overflow: hidden;
}

.picture { position: relative; min-height: 320px; border-right: 2px dashed var(--line); }
.picture svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky { fill: var(--sky); }
.sun { fill: var(--sun); }
.sea { fill: var(--sea); }
.wave { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; opacity: 0.8; animation: drift 6s ease-in-out infinite alternate; }
.sand { fill: var(--sand); }
.trunk { fill: none; stroke: #9a6b45; stroke-width: 7; stroke-linecap: round; }
.leaves { fill: var(--leaf); }
.palm { transform-origin: 96px 268px; animation: breeze 5s ease-in-out infinite; }
.hull { fill: var(--coral); }
.sail { fill: #fff; }
.boat { animation: bob 4s ease-in-out infinite; }
.greeting { position: absolute; left: 20px; bottom: 16px; margin: 0; padding: 4px 12px; background: rgb(255 253 247 / 0.9); border-radius: 4px; color: var(--ink); font-family: var(--hand); font-size: 1.15rem; transform: rotate(-3deg); }

.message { position: relative; padding: clamp(28px, 5vw, 48px); }
.stamp { position: absolute; top: 22px; right: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 78px; height: 92px; border: 3px dotted var(--stamp); background: #fff4ef; color: var(--stamp); transform: rotate(4deg); }
.stamp svg { width: 34px; height: 34px; }
.stamp small { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.postmark { position: absolute; top: 46px; right: 96px; display: grid; place-items: center; width: 74px; height: 74px; border: 2px solid rgb(38 54 74 / 0.35); border-radius: 50%; color: rgb(38 54 74 / 0.5); font-size: 0.7rem; font-weight: 800; line-height: 1.2; text-align: center; transform: rotate(-14deg); }

.hello { margin: 0 0 8px; padding-right: 180px; font-family: var(--hand); font-size: 1.3rem; color: var(--muted); }
h1 { margin: 0 0 14px; padding-right: 100px; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; }
.message > p { margin: 0 0 18px; color: var(--muted); }

.details { margin: 0 0 22px; border-top: 1px solid var(--line); }
.details div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.details dd { margin: 0; font-weight: 600; }

.code-box { margin-bottom: 22px; padding: 16px 18px; border: 1px dashed var(--coral); border-radius: 10px; background: #fff8f4; }
.code-box > p:first-child { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.code-box > p:first-child svg { flex: none; width: 18px; height: 18px; color: var(--coral); }
.reveal, .copy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.copy { padding: 6px 12px; background: var(--coral); }
.copy svg { width: 16px; height: 16px; }
.code { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.code[hidden] { display: none; }
.code span { padding: 6px 14px; border: 2px solid var(--ink); border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.08em; }
.copied { min-height: 1.4em; margin: 8px 0 0; color: #2b6f8e; font-size: 0.9rem; font-weight: 600; }

.sign { margin: 0 0 12px; font-family: var(--hand); font-size: 1.3rem; color: var(--ink); }
.contact { margin: 0; color: var(--muted); font-size: 0.95rem; }
.contact a { display: inline-flex; align-items: center; gap: 6px; }
.contact svg { width: 16px; height: 16px; }

.foot { margin-top: 24px; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 820px) {
  .postcard { grid-template-columns: 1fr; transform: none; }
  .picture { border-right: 0; border-bottom: 2px dashed var(--line); min-height: 220px; }
}
@media (max-width: 520px) {
  .postmark { display: none; }
  .hello { padding-right: 90px; }
  h1 { padding-right: 0; }
}

@keyframes drift { to { transform: translateX(14px); } }
@keyframes breeze { 50% { transform: rotate(2deg); } }
@keyframes bob { 50% { transform: translateY(3px); } }

@media (prefers-reduced-motion: reduce) {
  .wave, .palm, .boat { animation: none; }
}
